Status: Accepted
Owner: smichr
CC: mattpap
Labels: Type-Defect Priority-Medium polys

New issue 2087 by smichr: solver treats a nonlinear expression as linear and mis-solves a true nonlinear system; fixed in polys11 but slow
http://code.google.com/p/sympy/issues/detail?id=2087

The following is the wrong solution to the equation set:

a=solve([x+x*y-3,y+x*y-4]);a
{x: 3, y: 1}

Although this satisfies the second equation, it does not satisfy the first.

In solve, this is identified as being linear since:

Poly(x+x*y-3).is_linear
True

If mixed terms are tested for in the multi-equation handling portion of solve then the correct solution is obtained.

BUT for the nonlinear system

[-10 + x + y**2, 20 - y + x*y + x**2] the wrong solution is obtained from solve_poly_system and it takes almost longer to solve than it does to solve the system manually with sympy and confirm the correctness of the solution.

Everything is corrected in polys11 --is_linear returns False for the example from above, and the right answers are obtained for both systems, but it takes an excruciatingly long time to obtain the solution to this relatively trivial system -- even with simplified=False. There's got to be some better way to use polys to obtain a solution.


--
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.

Reply via email to