Comment #7 on issue 3698 by [email protected]: Piecewise does solving with
subs
http://code.google.com/p/sympy/issues/detail?id=3698
No, that's the whole point of blocking this on issue 3699. Solve makes *no
guarantees whatsoever* about how many of the solutions of an expression is
has found. In general, this is a very hard problem. We can, in certain
cases, assert that our algorithm does find all the solutions (like when the
input is a polynomial), but most of solve is just heuristics.
So I would remove this functionality by default (it's arguably too much
magic for subs/constructor anyway), but leave it in for now only as a
special method to Piecewise, or maybe some option to piecewise_fold or
simplify().
And by the way, to make solve(sin(x)) return more than [0], we need support
for infinitely many solutions, in addition to the ability to actually find
them. If that doesn't convince you that issue 3699 is the only way to go,
here's another example:
In [14]: Piecewise((1, Eq(z, 0)), (0, True)).subs(z, f(x)*log(x))
Out[14]:
⎧1 for x = 1
⎨
⎩0 otherwise
f(x) is an undefined function. It could very well be a user-defined
function (custom subclass of Function). solve() obviously can't invert
f(x) = 0, but it also can't assert that there are no solutions to it.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy-issues?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.