Comment #2 on issue 2750 by smi...@gmail.com: solve could do a better job with over determined systems
http://code.google.com/p/sympy/issues/detail?id=2750

When you don't tell it what to do, it gives you the first valid solution it finds. It used to give *all* valid solutions for symbols it could find but Ronan said this wasn't the job of solve (and I agree). If solve were an object, not giving symbols is like using the pop() method: you get something. The same applies to systems: if you don't supply symbols you just get *some* solution:

    >>> for e in eqs:
    ...  print Eq(e, 0)
    ...
    I1 - I2 - I3 == 0
    I3 - I4 - I5 == 0
    I4 + I5 - I6 == 0
    -I1 + I2 + I6 == 0
    -2*I1 - 2*I3 - 2*I5 - 3*I6 - dI1/2 + 12 == 0
    -I4 + dQ4 == 0
    -I2 + dQ2 == 0
    2*I3 + 2*I5 + 3*I6 - Q2 == 0
    I4 - 2*I5 + 2*Q4 + dI4 == 0
    >>> ans=solve(eqs)
    >>> for k in sorted(ans.keys()):
    ...  print Eq(k, ans[k])
    ...
    I1 == -dI1/18 + 7*dQ2/9 + 2*dQ4/9 + 4/3
    I2 == dQ2
    I3 == -dI1/18 - 2*dQ2/9 + 2*dQ4/9 + 4/3
    I4 == dQ4
    I5 == -dI1/18 - 2*dQ2/9 - 7*dQ4/9 + 4/3
    I6 == -dI1/18 - 2*dQ2/9 + 2*dQ4/9 + 4/3
    Q2 == -7*dI1/18 - 14*dQ2/9 - 4*dQ4/9 + 28/3
    Q4 == -dI1/18 - dI4/2 - 2*dQ2/9 - 23*dQ4/18 + 4/3


--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To post to this group, send email to sympy-issues@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