log(log(1+a*x))

1 Ansicht (letzte 30 Tage)
Xiaoge Liu
Xiaoge Liu am 9 Jun. 2018
Kommentiert: Xiaoge Liu am 9 Jun. 2018
syms x a;
f=log(log(1+a*x));
y=taylor(f,x)
error
Error using symengine
Cannot compute a Taylor expansion of the input.
Error in sym/taylor (line 128)
tSym = mupadmex('symobj::taylor',f.s,x.s,a.s,options);

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 9 Jun. 2018
You do not specify an expansion point so it assumes you want to expand around x = 0. It needs to calculate f(x_initial) as the first term of the taylor expansion. f(0) is log(log(1+a*0)) which is log(log(1)) which is log(0) which is -inf .
The next term involves diff(f) evaluated at 0, which is a/(log(a*x + 1)*(a*x + 1)) a/(log(a*0+1)*(a*0+1) which is a/(log(1)*1) which is a/0 which is sign(a)*inf . If taylor assumes sign(a) is positive, then the first two terms would involve -inf + inf which is indeterminate.
You need to expand around non-negative point.
  1 Kommentar
Xiaoge Liu
Xiaoge Liu am 9 Jun. 2018
tks, you are right.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by