separation of variables / parameterizing equations in sage math
Hi,
I've sometimes run into the situation where sage math is unable to solve a system of equations that I then rearrange and am subsequently able to solve. The question is, Is sage able to do this re-arranging itself?
Example:
Given a contraint eq1, and eq2 for an op amp subtractor that mixes variables together
eq1 = vout == (2*v1 - 3*v2)
eq2 = vout == (v1*(R4/(R3+R4))-(((v2-(v1*(R4/(R3+R4))))/R1)*R2))
can sage somehow rewrite this as an parameterized equation in terms of v1 and v2
eq2 = vout == v1*( (R4/(R3+R4)+((R4/(R3+R4))/R1)*R2)) + v2*((-1/R1)*R2)
Without my manual intervention?
I'd like to know if sage can detect that
2 == ( (R4/(R3+R4)+((R4/(R3+R4))/R1)*R2)) and -3 == ((-1/R1)*R2)
and solve those.
Can it also automatically detect if an equation can be safely separated in this way along some given variables??
Thanks to anyone who tries to answer this!
I'd've recommend You to read 'symbolic expression' of reference manual. Take a look at `collect`, lhs(), rhs() there.