# Solving an equation for combined multiple variables

I would like to Solve an equation so that the solution is in terms of multiple variables.

Solve[((30 e i L^2 + k L^5) p0)/(48 e i (3 e i + k L^3))*
x^2 - ((L (12 e i + k L^3) p0)/(48 e i (3 e i + k L^3))) * x^3 == w,
e*i*w/(p0*L^4)]


In the above equation it is solved for "w" but I would like to get the equation so that if I had "eiw/(p0*L^4)" on one side of the equation it would tell me what the other side of the equation should be. Any help would be appreciated.

• The expression you showed contains incorrect syntax. You also probably meant to use E for the base of the natural logarithms and I for the imaginary unit. Mathematica is case sensitive. I recommend that you take a look at the syntax examples provided in the documentation for Solve first (highlight Solve, press F1). – MarcoB Feb 3 '17 at 14:28
• No, e and i are variables. In this equation e represents a Young's modulus and i represents an area moment of inertia. – user46333 Feb 3 '17 at 14:42

You can always solve for a new variable that contains exactly the combination of the other unknowns you're after. That adds one equation to the original equation, so that you now have the freedom to eliminate one of the original unknowns. Here I choose to eliminate e:

eqn = ((30 e i L^2 + k L^5) p0)/(48 e i (3 e i + k L^3))*
x^2 - ((L (12 e i + k L^3) p0)/(48 e i (3 e i + k L^3)))*x^3 == w;

Solve[Eliminate[{eqn, e*i*w/(p0*L^4) == RHS}, e], RHS]


I think something like that can help:

allSols =
GroebnerBasis[{((30 e i L^2 + k L^5) p0)/(48 e i (3 e i + k L^3))*
x^2 - ((L (12 e i + k L^3) p0)/(48 e i (3 e i + k L^3)))*x^3 ==
w, e*i*w/(p0*L^4) == W}, {W}, {w},
MonomialOrder -> EliminationOrder];

allSols[[1]]


Out[2]:
-(1/(i L^2)) + (3 e)/(L^2 (3 e i + k L^3)) + (k L)/(i (3 e i + k L^3))

You can use any form listed in allSols, here I took the first one.