Comment #100 on issue 1694 by asmeurer: solve has many issues with fractions
http://code.google.com/p/sympy/issues/detail?id=1694

So, if output value is more complicated, it may be better that simplify simply returns input value (at least by default).

I thought I remember Chris saying that he had implemented something like this in one of his branches. I am +1 for it too. If you are going to use the general simplify() instead of a specific one (like cancel()), you just want a simpler expression, without caring how it is done.

Aaron implemented metrics for this, which are already used by dsolve. I think it mixes several approaches, but also counting operations.

Actually, it takes into account 3 things, if the solution has an unevaluated Integral, if the solution is solved for f(x), and the length of the string representation of the solution (in that order; see the docstring of ode_sol_simplicity() in ode.py). For solve(), this would reduce to just the last one. For dsolve(), if the solution is solved for f(x) and doesn't have Integral's, I have found almost always that shorter str() representations corresponds to simpler expressions. On the other hand, .count_ops() is faster and close to as accurate.

--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To post to this group, send email to sympy-iss...@googlegroups.com.
To unsubscribe from this group, send email to 
sympy-issues+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy-issues?hl=en.

Reply via email to