Status: Accepted
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 1397 by ondrej.certik: solve fails for a sum of two fractions
http://code.google.com/p/sympy/issues/detail?id=1397
In [28]: A = x**2/(7-x)
In [29]: A.diff(x)
Out[29]:
2
2⋅x x
───── + ────────
7 - x 2
(7 - x)
In [30]: solve(A.diff(x), x)
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
/home/ondrej/repos/sympy/<ipython console> in <module>()
/home/ondrej/repos/sympy/sympy/solvers/solvers.pyc in solve(f, *symbols,
**flags)
175 if strategy == GS_POLY:
176 poly = f.as_poly( symbol )
--> 177 assert poly is not None
178 result = roots(poly, cubics=True, quartics=True).keys()
179
AssertionError:
In [31]: solve(simplify(A.diff(x)), x)
Out[31]: [14, 0]
As you can see, [30] fails, but if you help the solver by first simplifying
in [31], it works and returns the correct result.
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---