Updates:
Summary: evaluating series() twice for a generic function at a generic
point fails
Status: Valid
Labels: Series Caching
Comment #1 on issue 4132 by [email protected]: evaluating series() twice
for a generic function at a generic point fails
http://code.google.com/p/sympy/issues/detail?id=4132
It does work for x0=0, see this:
f(x).series(x)
f(0) + x*Subs(Derivative(f(_x), _x), (_x,), (0,)) +
x**2*Subs(Derivative(f(_x), _x, _x), (_x,), (0,))/2 +
x**3*Subs(Derivative(f(_x), _x, _x, _x), (_x,), (0,))/6 +
x**4*Subs(Derivative(f(_x), _x, _x, _x, _x), (_x,), (0,))/24 +
x**5*Subs(Derivative(f(_x), _x, _x, _x, _x, _x), (_x,), (0,))/120 + O(x**6)
_.series(x)
f(0) + x*Subs(Derivative(f(_x), _x), (_x,), (0,)) +
x**2*Subs(Derivative(f(_x), _x, _x), (_x,), (0,))/2 +
x**3*Subs(Derivative(f(_x), _x, _x, _x), (_x,), (0,))/6 +
x**4*Subs(Derivative(f(_x), _x, _x, _x, _x), (_x,), (0,))/24 +
x**5*Subs(Derivative(f(_x), _x, _x, _x, _x, _x), (_x,), (0,))/120 + O(x**6)
However
f(x).series(x, y)
f(y) + x*Subs(Derivative(f(_xi_1), _xi_1), (_xi_1,), (y,)) +
x**2*Subs(Derivative(f(_xi_1), _xi_1, _xi_1), (_xi_1,), (y,))/2 +
x**3*Subs(Derivative(f(_xi_1), _xi_1, _xi_1, _xi_1), (_xi_1,), (y,))/6 +
x**4*Subs(Derivative(f(_xi_1), _xi_1, _xi_1, _xi_1, _xi_1), (_xi_1,),
(y,))/24 + x**5*Subs(Derivative(f(_xi_1), _xi_1, _xi_1, _xi_1, _xi_1,
_xi_1), (_xi_1,), (y,))/120 + O(x**6)
_.series(x, y)
...
NotImplementedError: Don't know how to calculate the mrv
of 'Subs(Derivative(f(_xi_1), _xi_1, _xi_1), (_xi_1,), (1/_p,))'
And also, there is a cache problem:
f(x).series(x, y) # type again
f(y) + x*Subs(Derivative(f(_xi_1), _xi_1), (_xi_1,), (_x + y,)) + O(x**6)
from sympy.core.cache import clear_cache
clear_cache()
f(x).series(x, y)
f(y) + x*Subs(Derivative(f(_xi_1), _xi_1), (_xi_1,), (y,)) +
x**2*Subs(Derivative(f(_xi_1), _xi_1, _xi_1), (_xi_1,), (y,))/2 +
x**3*Subs(Derivative(f(_xi_1), _xi_1, _xi_1, _xi_1), (_xi_1,), (y,))/6 +
x**4*Subs(Derivative(f(_xi_1), _xi_1, _xi_1, _xi_1, _xi_1), (_xi_1,),
(y,))/24 + x**5*Subs(Derivative(f(_xi_1), _xi_1, _xi_1, _xi_1, _xi_1,
_xi_1), (_xi_1,), (y,))/120 + O(x**6)
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy-issues.
For more options, visit https://groups.google.com/groups/opt_out.