New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Series of Derivative #11313

Open
Upabjojr opened this Issue Jun 29, 2016 · 0 comments

Comments

Projects
None yet
1 participant
@Upabjojr
Copy link
Contributor

Upabjojr commented Jun 29, 2016

Given that

d                  
──(sin(x)) = cos(x)
dx   

I suppose the series expansion of the derivative should be identical, but:

In [8]: Derivative(sin(x), x).series(x, n=3)
Out[8]: 
d        ⎛ 3⎞
──(x) + O⎝x ⎠
dx           

In [9]: _.doit()
Out[9]: 
     ⎛ 31 + O⎝x ⎠

In [10]: cos(x).series(x, n=3)
Out[10]: 
     2        
    x     ⎛ 31 - ── + O⎝x ⎠
    2  

It looks like the expansion of Derivative is one order less than the computed derivative.

Is this a bug?

skirpichev added a commit to skirpichev/diofant that referenced this issue Jun 30, 2016

Fix broken _eval_as_leading_term helper for Derivative
This closes sympy/sympy#11313.

Also reuse expr/variables obj properties instead of args.

skirpichev added a commit to skirpichev/diofant that referenced this issue Jun 30, 2016

Fix broken _eval_as_leading_term helper for Derivative
We adapt test_issue_5223 (Derivative(exp(x)) test
was just wrong).  This closes sympy/sympy#11313.

Also reuse expr/variables obj properties instead of args.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment