I am trying to solve a set of two equations for two complex variables in terms of the other terms.
I put the two equations in a list and tried to solve for both the variables together, but this kept giving me incorrect results. However, if I can manually separate out the terms in each equation and substitute them, I'm able to obtain the right answer. This is extremely puzzling and I don't understand if this is a bug in maxima or something's wrong in what I'm doing. Any guidance/comments will be appreciated.
Here's a minimal example that does what I'm speaking about (along with final output). In the following, sol1
gives me incorrect solutions and sol2
gives me the right solution.
(%i2) kill(all)$
declare([R0, a, b, x, y], complex)$
eqs:[(2*%i*x*ω+24*R0^2*conjugate(R0)*b^2*conjugate(b)-48*R0^2*conjugate(R0)*a*b*conjugate(b)+24*R0^2*conjugate(R0)*a^2*conjugate(b)-24*R0^2*conjugate(R0)*conjugate(a)*b^2+48*R0^2*conjugate(R0)*a*conjugate(a)*b+%i*x-2*x-24*R0^2*conjugate(R0)*a^2*conjugate(a)), (6*%i*y*ω+8*R0^3*b^3-24*R0^3*a*b^2+24*R0^3*a^2*b+3*%i*y-2*y-8*R0^3*a^3)]$
(%i4) sol1:factor(solve(eqs, [x, y])[1])$
sol2:factor([solve(eqs[1],x)[1],solve(eqs[2],y)[1]])$
(%i6) factor(subst(sol1,eqs));
factor(subst(sol2,eqs));
(%o5) [0,-24*R0^3*(b-a)^3*(2*%i*ω+%i-1)]
(%o6) [0,0]
Here's a screenshot on wxmaxima, if that helps you to see better :