deftaylor works OK for expansion at zero, but don't
try to expand anywhere else:
(%i1) deftaylor(f(x), sum(x^k,k,0,inf));
(%o1) [f]
(%i2) taylor(f(x),x,0,2);
(%o2) 1+x+x^2+...
(%i3) taylor(f(x),x,1,2);
`taylor' unable to expand at a point specified in:
sum(x^*index,*index,0,inf)
-- an error. Quitting. To debug this try debugmode(true);
Notice the garabage in the error message. For
an expansion at a nonzero number, it would
be better if Maxima used the differentiate and
evaluate scheme instead of trying to use the
deftaylor info.
Chip Eastham
2013-06-08
Since sum(x^k,k,0,inf) is singular (a simple pole) precisely at x=1, it seems unlikely that deftaylor or taylor should succeed in providing a series expansion there.
A better example of the failure, which can be demonstrated with taylor only (not deftaylor), would be expansion at x=1/2:
taylor(sum(x^k,k,0,inf),x,1/2,15);
taylor: unable to expand at a point specified in: (etc.)
If the limit of summation inf is changed to a finite value, e.g. 30, then the above expansion succeeds. However expansion around x=1 also succeeds in this case (as the infinite sum has been demoted to a high degree polynomial).
Maxima version: "5.28.0-2"
Maxima build date: "2012-08-27 23:16:48"
Host type: "i686-pc-mingw32"
Lisp implementation type: "GNU Common Lisp (GCL)"
Lisp implementation version: "GCL 2.6.8"