Consider :

from sympy import symbols, Eq, solve, I
L1, L2, L3, L4, C1, C2, C3, C4, M23, I1, I2, I3, I4, U, w, p, RL, J = \
symbols("L1, L2, L3, L4, C1, C2, C3, C4, M23, I1, I2, I3, I4, U, w, p, RL, J")
Sys = [Eq(I1*(J*L1*w - J/(C1*w)) + I2*J/(C1*w), U),
           Eq(I2*(J*L2*w - J/(C2*w) - J/(C1*w)) + I3*(J*M23*w + J/(C2*w)) + 
I1*J/(C1*w), 0),
           Eq(I2*(J*M23*w + J/(C2*w)) + I3*(J*L3*w - J/(C3*w) - J/(C2*w)) + 
I4*J/(C3*w), 0),
           Eq(I4*RL + I3*J/(C3*w) - I4*J/(C3*w), 0)]
IVars = [I1, I2, I3, I4]
Sol = solve(Sys, IVars)
Chk = [u.subs(Sol).simplify() for u in Sys]

This system is solved in a matter of milliseconds, and the (unique) 
solution is correct :

>>> Chk [True, True, True, True]

However, this :

>>> Sys0 = [u.subs({J:I}) for u in Sys]>>> Sol0 = solve(Sys0, IVars)

“never” returns (i. e. didn’t return after >90 minutes).

WTF ?
​

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/fb2649d3-cba4-4919-bd05-d9de178bb561n%40googlegroups.com.

Reply via email to