Comment #3 on issue 2716 by [email protected]: solve cannot handle systems
involving roots and constants
http://code.google.com/p/sympy/issues/detail?id=2716
With unrad added, it now handles more. Here is the commit message:
unrad added to _tsolve
Although it would be better if polys would identify radical
generators a
not reject such systems as multivariate polynomials, systems of
equation
that fail polification will get to the fallback which will use
_tsolve
(and hence unrad) so they will now work.
unrad allows such equations to be solved:
>>> solve(sqrt(x) - sqrt(x + 1) + sqrt(1 - sqrt(x)))
[0, 9/16]
>>> Poly(sqrt(x) - sqrt(x + 1) + sqrt(1 - sqrt(x)))
Poly(sqrt(-sqrt(x) + 1) - sqrt(x + 1) + sqrt(x), \
sqrt(-sqrt(x) + 1), sqrt(x + 1), sqrt(x), domain='ZZ')
>>> roots(_)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "sympy\polys\polyroots.py", line 517, in roots
raise PolynomialError('multivariate polynomials are not
supported')
sympy.polys.polyerrors.PolynomialError: multivariate polynomials,
etc.
Perhaps unrad should live in simplify.py, though? I'm tempted to call
it rootdenest, but it's not really denesting, it's re-writing an
expression to a form that shares characteristics with the original but
is not the same as the original.
--
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.