Menu ▾ ▴

#5886 taylor gives wrong results for expressions with several exponential kernels

None
open
nobody
taylor (77)
5
3 days ago
3 days ago
No

By Claude:

At a point where several exponentials become singular, taylor returns wrong expansions. With y : %e^(-1/x)*%e^(1/x^2), y tends to inf as x -> 0+, so 1/(y+1) should start with 1/y, and (y+2)/(y+1) with 1:

(%i1) display2d : false$
(%i2) y : %e^(-1/x)*%e^(1/x^2)$
(%i3) taylor(1/(y+1), x, 0, 1);
(%o3) 1+(+(-1/%e^-(1/x^2)))*%e^-(1/x)
(%i4) taylor((y+2)/(y+1), x, 0, 1);
(%o4) 2+(+(-1/%e^-(1/x^2)))*%e^-(1/x)

These are 1-y and 2-y. The display shows %e^-(1/x) as the main variable, although %e^-(1/x^2) is the stronger one.

Products with a function of such kernels go wrong too. Here w tends to inf and log(w) = -(1+log(x))/x, so the result should start with -(1+log(x))/x*w:

(%i5) w : %e^(-1/x)/%e^(log(x)/x)$
(%i6) taylor(w*log(w+3/2), x, 0, 1);
(%o6) +(+(-log(2)+log(3))*%e^-(1/x))/%e^(log(x)/x)

The same happens for Stirling's formula for (1/x)!:

(%i7) u : sqrt(2)*%e^(-1/x-1)*sqrt(%pi)*(1/x+1)^(1/x+1/2)$
(%i8) taylor((u+1)*log(u+3/2), x, 0, 1);
(%o8) +(+(+((-log(2)+log(3))*sqrt(2)*sqrt(%pi))/sqrt(x))*%e^-(1/x))/%e^(log(x)/x)
(%i9) taylor((u+3/2)/(u+1), x, 0, 1);
(%o9) +0

The first should start with u*log(u) + log(u) + 3/2, the second with 1 + 1/(2*u).

Discussion


Log in to post a comment.