5
$\begingroup$
exp = (1 + x)^30 + (1 - x)^30;
Factor[exp]
    (*2 (1 + x^2) (1 + 14 x^2 + x^4) (1 + 44 x^2 + 166 x^4 + 44 x^6 + 
   x^8) (1 + 376 x^2 + 4380 x^4 + 15944 x^6 + 24134 x^8 + 
   15944 x^10 + 4380 x^12 + 376 x^14 + x^16)*)
FullSimplify[%]
(*returns above factorized expression*)
Expand[%]//FullSimplify
(*returns above factorized expression*)

Any ideas how to instruct Mathematica to get the original exp expression? Thanks!

$\endgroup$
5
$\begingroup$
Clear["Global`*"]

exp = (1 + x)^30 + (1 - x)^30;

exp2 = Factor[exp]

(* 2 (1 + x^2) (1 + 14 x^2 + x^4) (1 + 44 x^2 + 166 x^4 + 44 x^6 + x^8) (1 + 
   376 x^2 + 4380 x^4 + 15944 x^6 + 24134 x^8 + 15944 x^10 + 4380 x^12 + 
   376 x^14 + x^16) *)

If you assume that exp2 can be expressed in the form (a*x+b)^30+(c*x+d)^30

(sol = (a*x + b)^30 + (c*x + d)^30 /. 
      Solve[Thread[
        CoefficientList[exp2, x] == 
         CoefficientList[(a*x + b)^30 + (c*x + d)^30, x]], {a, b, c, 
        d}, Reals] // Simplify // Union)[[1]]

(* (-1 + x)^30 + (1 + x)^30 *)
$\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.