To any great Mathematica-matician. Why Mathematica can’t factor this


I know that Factor mainly targets polynomials but in the "Generalization" section of the help page, there is a quite similar example:

Factor[x^(2/3 s) + 2 x^s + 1]
(* (1 + x^(s/3)) (1 - x^(s/3) + 2 x^(2 s/3)) *)

I would expect it to handle my case as well and that it gives a result like this one:

  • 3
    $\begingroup$ What result would you expect from it? $\endgroup$ – MarcoB May 25 '18 at 16:03
  • $\begingroup$ It's not quite clear what result you expect as this is not a polynomial. Factor works with polynomials. $\endgroup$ – Szabolcs May 25 '18 at 16:06
  • $\begingroup$ Wow, so quick. I will study this answer. I think is fine. Thank you Akku14. $\endgroup$ – Sanmuten May 25 '18 at 16:38
  • $\begingroup$ Why is the expected result not (x^(1/6)-1)*(x^(1/6)+1)*(x^(1/3)+1)? $\endgroup$ – Daniel Lichtblau May 26 '18 at 16:04
  • $\begingroup$ I will vote to close this because it a simple mistake. The wrong assumption you made is that your function is a polynomial in x which it is not: PolynomialQ[-1 + x^(2/3), x]. The reference page of Factor clearly says that it factors polynomials. With @Akku's answer you have a good start to dig deeper but in its current form, the question makes no sense. $\endgroup$ – halirutan May 26 '18 at 22:51

How about that

-1 + x^(2/3) // ComplexExpand[#, TargetFunctions -> {Re, Im}] & // 
             FullSimplify // Factor // PowerExpand

(*   (-1 + x^(1/3)) (1 + x^(1/3))   *)
  • $\begingroup$ Surprisingly your method also works even for very large rational exponents such as 128/173 $\endgroup$ – yarchik May 27 '18 at 4:49

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.