1
$\begingroup$

i have the following expression

(w3^2 
   (3 t5 w2^2 w3^2 w4^2 y3^2 + 
     w5^2 (3 t4 w2^2 w3^2 y3^2 + 
       w4^2 (12 t3 w2^2 y3^2 + 3 t2 w3^2 y3^2 - 12 t3^2 w2^2 y3 θ5 + 
               4 t3^3 w2^2 θ5^2)))) /
(4 t3^3 (t5 w2^2 w3^2 w4^2 + (t4 w2^2 w3^2 + (t3 w2^2 + t2 w3^2) w4^2) w5^2))

I want to rewrite it to the form

θ5^2/A - (3*y3*θ5)/A^2 + (3*y3^2)/A^3

where A must be properly defined. Is there a way to find a proper A?

$\endgroup$
1
  • $\begingroup$ you have syntax error in your code t4 \ w2^2 so I removed that extra \ you have. $\endgroup$
    – Nasser
    Apr 24 '20 at 22:55
2
$\begingroup$

how about

expr = (w3^2*(3*t5*w2^2*w3^2*w4^2*y3^2 + 
      w5^2*(3*t4*w2^2*w3^2*y3^2 + 
         w4^2*(12*t3*w2^2*y3^2 + 3*t2*w3^2*y3^2 - 
            12*t3^2*w2^2*y3*θ5 + 
            4*t3^3*w2^2*θ5^2))))/(4*
    t3^3*(t5*w2^2*w3^2*
       w4^2 + (t4*w2^2*w3^2 + (t3*w2^2 + t2*w3^2)*w4^2)*w5^2));

Mathematica graphics

expr2 = θ5^2/A - (3*y3*θ5)/A^2 + (3*y3^2)/A^3;
sol = First@Solve[expr == expr2, A];

expr3 = expr2 /. sol

Mathematica graphics

 Simplify@(expr3 - expr)
 (* 0 *)
$\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.