Status: Accepted
Owner: asmeurer
CC: [email protected]
Labels: Type-Defect Priority-Medium
New issue 2454 by asmeurer: Mul._eval_derivative should use the quotient
rule when possible
http://code.google.com/p/sympy/issues/detail?id=2454
Right now, we have
In [1]: diff((x + 1)/(x - 2), x)
Out[1]:
1 x + 1
───── - ────────
x - 2 2
(x - 2)
This is because it applied the product rule to (x+ 1)*(x - 2)**-1. But it
would be nice if it used the quotient rule
(http://en.wikipedia.org/wiki/Quotient_rule), returning instead
In [2]: together(diff((x + 1)/(x - 2), x))
Out[2]:
-3
────────
2
(x - 2)
This should be easy enough to do. Just modify Mul._eval_derivative() to
use the quotient rule if there is a denominator and the product rule
otherwise. I don't know off the top of my head what the standard function
for determining this and getting the numerator and denominator parts is
(Chris, do you know?).
The only thing is, I'm not sure if this will break anything. The only way
to find out is to implement it and run the tests.
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sympy-issues?hl=en.