Menu ▾ ▴

#5885 taylor() loses exp(x) in exp(x)+exp(-x) at minf

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

By Claude:

At minf, taylor drops terms of sums of exponentials, while the mirror image at inf works:

(%i1) display2d : false$
(%i2) taylor(exp(x)+exp(-x), x, minf, 2);
(%o2) +1/%e^x
(%i3) taylor(exp(x)+exp(-x), x, inf, 2);
(%o3) 1/%e^-x+%e^-x
(%i4) taylor(exp(x)+exp(-x), x, minf, 0);
(%o4) +0
(%i5) taylor(log(exp(x)+exp(-x)), x, minf, 2);
(%o5) +1/(-1/x)

Expected are %e^x+%e^-x, %e^-x and %e^(2*x)-x (here 1/(-1/x) is -x). The 0 of (%o4) is wrong even in the leading term, since exp(-x) tends to infinity.

The same happens at inf when an exponent tends to minf there:

(%i6) assume(a < 0)$
(%i7) taylor(exp(a*x)+exp(-a*x), x, inf, 2);
(%o7) +1/%e^(a*x)

Expected is %e^(a*x)+%e^(-a*x).

Discussion


Log in to post a comment.