Status: Accepted
Owner: [email protected]
Labels: Type-Defect Priority-Medium Solvers

New issue 2750 by [email protected]: solve could do a better job with over determined systems
http://code.google.com/p/sympy/issues/detail?id=2750

I think this first item is actually a bug, considering the current state of solve:

In [77]: solve(Eq(I3 - I4, -5*I3/2 + Q2/2))
Out[77]:
⎡⎧    2⋅I₄   Q₂⎫⎤
⎢⎨I₃: ──── + ──⎬⎥
⎣⎩     7     7 ⎭⎦

Why did it pick I3 to solve for (other than that it read my mind, because that was actually the one I wanted)?

More generally, I'd like to be able to tell solve to give me any valid expression for some variable based on the system, to help me eliminate variables by substitution:

In [78]: print system
(I1 - I2 - I3, I3 - I4 - I5, I4 + I5 - I6, -I1 + I2 + I6, -2*I1 - 2*I3 - 2*I5 - 3*I6 - dI1/2 + 12, -I4 + dQ4, -I2 + dQ2, 2*I3 + 2*I5 + 3*I6 - Q2, I4 - 2*I5 + 2*Q4 + dI4)

In [79]: solve(system, I3)

Or better, it would be nice if I could just tell solve that I want everything in terms of I1, I4, Q2, Q4, dI1, and dI4, and it would just do it, eliminating the other four variables. If the system is completely linear (as it is here), this is just a matter of getting the null space in terms of the right free variables. For non-linear systems, you can still sometimes do it by substitution.

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