exp-form property (was Taylor series of elliptic_kc(m) about m=0 fails with error)
Subject: exp-form property (was Taylor series of elliptic_kc(m) about m=0 fails with error)
From: Raymond Toy
Date: Fri, 28 Sep 2012 09:10:02 -0700
On Fri, Sep 28, 2012 at 7:24 AM, David Billinghurst <dbmaxima at gmail.com>wrote:
> 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.
>
Presumably you meant the taylor series at some point other than 0 here.
This is interesting. I haven't had a chance to try it out, but I was
thinking of modifying taylor so that if there was a powerseries or
deftaylor form (the sp2 property is set), then taylor would check to see if
the expansion was at 0 or not. If so, then the deftaylor form could be
used. If not, then taylor would continue as if deftaylor didn't exist.
I think this would make sense since deftaylor says the expansion is always
about 0.
Ray