... and all is not fresh in Sympy's realm either.Full details in [this ask.sagematjh.org question](https://ask.sagemath.org/question/64344/solving-a-system-of-linear-equations-with-complex-numbers-yields-false-solution/?answer=64363#post-id-64363).
Advoce requested on how to file tickets/bug reports efficiently.
It turns out that the original author has also posted this problem in sage-devel, wher we should continue…
Le jeudi 3 novembre 2022 à 12:59:48 UTC+1, axio…@yahoo.de a écrit :
@Emmanuel, why are you saying that FriCAS returns the same as sage?
I tried solve(Sys0, IVars) and got the same result as the one given by the default solver…
For me, fricas.solve works as expected.
Could you give us your execution especially how to convert the result back to Sage ?
Never mind : I reconstituted something similar :
# ****************** General system ******************
Vars = var('L1 L2 L3 L4 C1 C2 C3 C4 M23 I1 I2 I3 I4 U w p RL J')
IVars = [I1, I2, I3, I4]
Sys = [I1*(w*J*L1 + 1/(w*J*C1)) + I2*(-1/(w*J*C1) ) == U,
I2*(w*J*L2 + 1/(w*J*C1) + 1/(w*J*C2)) + I3*(w*J*M23 - 1/(w*I*C2)) + I1*(- 1/(w*J*C1)) == 0,
I3*(1/(w*J*C3) + w*J*L3 + 1/(w*J*C2)) + I2*(w*J*M23 - 1/(w*J*C2)) - I4/(w*J*C3) == 0,
I4/(w*J*C3) + I4*RL - I3/(w*J*C3) == 0]
Sol = solve(Sys, IVars, solution_dict=True)
Chk = all([u.subs(Sol).simplify_full() for u in Sys])
# ****************** Specialization to J=I ******************
Sys0 = [u.subs(J=I) for u in Sys]
Sol0 = solve(Sys0, IVars, solution_dict=True)
Chk0 = all([u.subs(Sol0).simplify_full() for u in Sys0])
# ****************** Fricas ******************
Sys0f = fricas(Sys0)
Sol0ff = fricas.solve(Sys0f, fricas(IVars))
# Here, no automatic backconversion to Sage : manual conversion necessary...
Sol0f = [{fricas.lhs(u).sage():fricas.rhs(u).sage() for u in v}
for v in Sol0ff]
Chk0f = all([u.subs(Sol0f[0]).simplify_full() for u in Sys0])
And, of course :
sage: Chk
True
sage: Chk0
False
sage: Chk0f
True
You are right….