Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

This is a problem of convention : is the order of a development the largest explicit power or the degree of the big-Oh term ?

Sage isn't always consistent. Contrast :

sage: R1.<t>=PowerSeriesRing(QQ, default_prec=6)
sage: t.exp()
1 + t + 1/2*t^2 + 1/6*t^3 + 1/24*t^4 + 1/120*t^5 + O(t^6)

with :

sage: exp(x).maxima_methods().taylor(x,0,5)
1/120*x^5 + 1/24*x^4 + 1/6*x^3 + 1/2*x^2 + x + 1

And, by the way,

sage: t.tan().pade(2,2)
-3*t/(t^2 - 3)

whereas

sage: maxima.pade(maxima.taylor(tan(x),x,0,4),2,2).sage()
[-3*x/(x^2 - 3)]
sage: maxima.pade(maxima.taylor(tan(x),x,0,4),3,2).sage()
[-3*x/(x^2 - 3), 1/3*x^3 + x]
sage: maxima.pade(maxima.taylor(tan(x),x,0,4),2,3).sage()
[-3*x/(x^2 - 3)]
sage: maxima.pade(maxima.taylor(tan(x),x,0,5),3,2).sage()
[1/3*(x^3 - 15*x)/(2*x^2 - 5)]
sage: maxima.pade(maxima.taylor(tan(x),x,0,5),2,3).sage()
[]

A look at maxima.pade? shows that the conventions are different...

HTH,