exp-form property (was Taylor series of elliptic_kc(m) about m=0 fails with error)



On 18/09/2012 8:30 PM, David Billinghurst wrote:
> Taylor series of elliptic_kc(m) about m=0 fails with 
> maxima-5.28.0/gcl/windows and clisp/windows.
>
> taylor(elliptic_kc(m),m,0,1);
>
> Maxima encountered a Lisp error:
>  Error in MACSYMA-TOP-LEVEL [or a callee]: Bind stack overflow.
> Automatically continuing.
> To enable the Lisp debugger set *debugger-hook* to nil.
>
> According to A&S 17.3.11
>
> K(m) ~= 1 + (1/2)^2 m + (1.3/2.4)^2 m^2 + ....

I have been having a look at this problem.   I seem to be able to define 
a separate Taylor series about 0 using the exp-form property, without 
breaking the existing definition.  The exp-form function is defined for 
some trig and exponential functions in hayat.lisp.  Just borrowing the 
expression for sin, as a proof of concept, I see

(%i2) :lisp (get '%sin 'exp-form)
(EXPEXP-FUNS ((1 . 1) 1 . 1) (-1 . 1) (-1 . 1) (2 . 1))

(%i2) :lisp (putprop '%elliptic_kc (get '%sin 'exp-form) 'exp-form)
(EXPEXP-FUNS ((1 . 1) 1 . 1) (-1 . 1) (-1 . 1) (2 . 1))

(%i4) taylor(elliptic_kc(x),x,0,4);
                                      3
                                     x
(%o4)/T/                        x - -- + . . .
                                     6

and taylor(elliptic_kc(x),x,0,4) still works.  I don't think this is 
useable for series about x # 0 or for multivariate functions.