I have some equations that depend on a number of variables. I would like to solve the equations in python. Here is one of the simpler equations:
f(x,y,theta,w) = x - y + theta * (w - y)
How can I solve/find the roots of this equation for a particular variable, given values for the rest of the arguments. Sometimes I want to solve for x
, sometimes I want to solve for theta
.
Is there an elegant way of solving this without having to rewrite the function for each dependant variable?