- labels: --> Lisp Core - Taylor
expr: atan(1/sqrt(1-b))/sqrt(1-b);
taylor(expr,b,1,2) =>
SIGN called on an imaginary argument: %I
(bizarrely, it says this twice....)
I suspected that this was because of %i introduced by
using logarc on expr internally, BUT:
taylor(logarc(expr),b,1,2) =>
works just fine
Maxima 5.9.0 gcl 2.5 Windows 2000
Logged In: YES
user_id=1797506
Originator: NO
In hayat.lisp rev 1.34, generalized try-expansion to handle complex arg:
(%i9) expr: atan(1/sqrt(1-b))/sqrt(1-b);
(%o9) atan(1/sqrt(1-b))/sqrt(1-b)
(%i10) t:taylor(expr,b,1,2);
Is b-1 positive, negative, or zero?
n;
(%o10) %pi*%i/(2*sqrt(b-1))-1-(b-1)/3-(b-1)^2/5
(%i11) t:taylor(expr,b,1,2);
Is b-1 positive, negative, or zero?
p;
(%o11) %pi*%i/(2*sqrt(b-1))-1-(b-1)/3-(b-1)^2/5
(%i12) float(rectform(expr)),b:.9;
(%o12) 3.998760050557662
(%i13) float(rectform(t)),b:.9;
`rat' replaced -.968666666666667 by -1453/1500 = -.968666666666667
`rat' replaced 1.58113883008419 by 11468/7253 = 1.581138839101062
(%o13) 3.998627494558723
Unfortunately, for b>1 the taylor series is on a different root
from the original expression:
(%i14) float(rectform(expr)),b:1.1;
(%o14) -4.967294132898049*%i-1.035488294914062
(%i15) float(rectform(t)),b:1.1;
`rat' replaced -1.03533333333333 by -1553/1500 = -1.03533333333333
`rat' replaced 1.581138830084189 by 11468/7253 = 1.581138839101062
(%o15) 4.967294161225389*%i-1.035333333333333
Nevertheless, marking as closed.
Log in to post a comment.