0
$\begingroup$

I know that this expression:

-(m-2 r+b^2 (-7 m+6 r)) ((-m+r)^2+b^4 (-2 m+3 r)^2+b^2 (-3 m^2+10 m r-6 r^2))+(1+b^2)^2 m^3 Cos[t]^2

Is equal to this one:

(1-3 b^2)^3 (-m+r)^2 (-m+2 r)+(1+b^2)^2 m^3 (b^2+Cos[t]^2)

I couldn't get Mathematica to reach this simpler later form. FullSimplify and other functions combinations like FullSimplify with PowerExpand didn't work. I even used VOISImplify, and no success. Any thoughts?

$\endgroup$
  • $\begingroup$ Why do you think the latter one is "simpler", because it is shorter? $\endgroup$ – vapor Mar 14 '15 at 14:49
  • $\begingroup$ Change simpler for shorter then. I want a shorter version. $\endgroup$ – Giovanni F. Mar 14 '15 at 16:24
3
$\begingroup$
expr = -(m - 2 r + b^2 (-7 m + 6 r)) ((-m + r)^2 + 
      b^4 (-2 m + 3 r)^2 + 
      b^2 (-3 m^2 + 10 m r - 6 r^2)) + (1 + b^2)^2 m^3 Cos[t]^2;

expr2 = (Collect[expr1 /. Cos[t]^2 -> x - b^2, x] // FullSimplify) /. 
  x -> (b^2 + Cos[t]^2)

(-1 + 3 b^2)^3 (m - 2 r) (m - r)^2 + (1 + b^2)^2 m^3 (b^2 + Cos[t]^2)

expr == expr2 // Simplify

True

LeafCount /@ {expr, expr2}

{76, 42}

| improve this answer | |
$\endgroup$
  • $\begingroup$ How did you end with that substitution? $\endgroup$ – Giovanni F. Mar 14 '15 at 16:46
  • 2
    $\begingroup$ @Giovanni - (b^2 + Cos[t]^2) was the "odd" factor in the last term of the target result so I made the expression a polynomial of that factor. $\endgroup$ – Bob Hanlon Mar 14 '15 at 16:53
  • $\begingroup$ Any general procedure for these cases? $\endgroup$ – Giovanni F. Mar 14 '15 at 20:32
  • $\begingroup$ @Giovanni - Not that I know of. $\endgroup$ – Bob Hanlon Mar 14 '15 at 21:54

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.