Here is an example equation:
Solve[{a*x + b*y == c}, {a}]
It gives me:
a -> (c - b*y)/x
To solve the same equation for b
, I need to write:
Solve[{a*x + b*y == c}, {b}]
It will give me:
b -> (c - a*x)/y
Similarly, I will have to repeat the steps for all variables like x
and y
. Is there an easier to tell Mathematica to solve an equation for all variables one by one?
Thanks.
Flatten@Table[ Solve[a x + b y == c, {z}], {z, {a, b, c, x, y}}]
is an easy-to-read method that uses two of the most basic list manipulation functions. $\endgroup$