0
$\begingroup$

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.

$\endgroup$
2
  • $\begingroup$ 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). $\endgroup$
    – MarcoB
    Feb 3 '17 at 14:28
  • $\begingroup$ No, e and i are variables. In this equation e represents a Young's modulus and i represents an area moment of inertia. $\endgroup$
    – user46333
    Feb 3 '17 at 14:42
3
$\begingroup$

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]

output

$\endgroup$
1
$\begingroup$

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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.