Status: Accepted
Owner: ----
Labels: Type-Enhancement Priority-Medium Simplify Sets Solvers
New issue 3195 by [email protected]: Simplification of the sets, trying
picewise.
http://code.google.com/p/sympy/issues/detail?id=3195
Consider the equation with a real parameter:
r = Symbol('r', real=True)
eq = x**2 + (-r - 1)*x + r
and solve it
solve(x**2 + (-r - 1)*x + r, x)
⎡r │r - 1│ 1 r │r - 1│ 1⎤
⎢─ - ─────── + ─, ─ + ─────── + ─⎥
⎣2 2 2 2 2 2⎦
We obtain the list (a set by meaning) of the roots.
But if we consider Abs as Piecewise in details then we determine that this
result can be simplified: If r>= 0, then this list is "[1, r]" else list
is "[r, 1]".
Therefore the simplified result (as set) is "[1, r]".
In common cases it can be hard.
But we can can think how to join it with the procedure "solve" which
directly could tell as what the cases are. Especially since it is used
there and is needed for roots finding.
--
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.