I just looked at Doron Zeilberger's latest paper
http://www.math.rutgers.edu/~zeilberg/mamarim/mamarimPDF/babushkas.html
and implemented the differential operator from page 5:
D2(f: POLY INT): POLY INT == z2*D(f, z2) + 1/2*z1^4*D(f, z2, 2) + z1^3*D(D(f,
z2), z1) + 1/2*z1^2*D(f, z1, 2) + z1^3*D(f, z2)+z1^2*D(f,z1)+z2*f
p2(0)==1; p2(n) == D2 p2(n-1)
But to my great surprise I get
(3) -> eval(p2 17, [z1=1, z2=1])
(3) 47609742627231823142148
whereas Doron (and maple) gives
47609742627231823142029
the other first 17 values coincide...
----------------------------------------------------------------------
An hour later:
----------------------------------------------------------------------
the bug is in the coercion routines:
D2chk(f: POLY INT): POLY FRAC INT == z2*D(f, z2) + 1/2*z1^4*D(f, z2, 2)+
z1^3*D(D(f, z2), z1) + 1/2*z1^2*D(f, z1, 2) + z1^3*D(f,z2)+z1^2*D(f,z1)+z2*f
gives the correct result.
This is quite terrible, I think.
Martin
D2(f: POLY INT): POLY INT == z2*D(f, z2) + 1/2*z1^4*D(f, z2, 2) + z1^3*D(D(f,
z2), z1) + 1/2*z1^2*D(f, z1, 2) + z1^3*D(f, z2)+z1^2*D(f,z1)+z2*f
p2(0)==1; p2(n) == D2 p2(n-1)
D2chk(f: POLY INT): POLY FRAC INT == z2*D(f, z2) + 1/2*z1^4*D(f,z2, 2) +
z1^3*D(D(f, z2), z1) + 1/2*z1^2*D(f, z1, 2) + z1^3*D(f,z2)+z1^2*D(f, z1)+z2*f
p2chk(0)==1; p2chk(n) == D2chk p2chk(n-1)
----------------------------------------------------------------------
(5) -> [p2 n - p2chk n for n in 1..17]
Compiling function D2 with type Polynomial(Integer) ->
Polynomial(Integer)
Compiling function p2 with type Integer -> Polynomial(Integer)
Compiling function p2 as a recurrence relation.
Compiling function D2chk with type Polynomial(Integer) ->
Polynomial(Fraction(Integer))
Compiling function p2chk with type Integer ->
Polynomial(Fraction(Integer))
Compiling function p2chk as a recurrence relation.
(5)
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
14 13 12 11 10 9 16 13
12 9
(2z1 + 8z1 + 17z1 + 14z1 + 5z1 + z1 )z2 + 4z1 + 32z1 +
32z1 + 4z1 ]
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/fricas-devel?hl=en
-~----------~----~----~----~------~----~------~--~---