I have a lot of equations of a form similar to $$\frac{x(\frac{4}{3} + 4x^4)}{(x - \sqrt{\frac{2}{3}}e^{i\pi/4})(x - \sqrt{\frac{2}{3}}e^{-i\pi/4})}.$$

All of these equations can for non-zero denominator be rewritten as a real polynomial. When I am using the command WolframAlpha, I am indeed getting this as an alternative form. I was wondering if there is some command (like 'Simplify' but that one doesn't work) which gives this specific form as output directly instead of me having to search for it in WolframAlpha. Alternatively a command that would take the Euler form of a complex number and give something in the form $a + bi$ would also be really helpful.

Edit: My question could have been more specific. Currently I have the form

(x (4/3 + 3 x^4))/((-Sqrt[(2/3)] e^(-((3 I [Pi])/4)) + x) (-Sqrt[(2/3)] e^((3 I [Pi])/4) + x))

I would like Mathematica to return

x (2 - 2 Sqrt[3] x + 3 x^2)

Second edit: My mistake was just using e instead of E. Someone commented FullSimplify might work, which it indeed did. I marked another answer pointing this out as correct. Thanks everyone :)

  • 5
    $\begingroup$ it is better to also show the input using Mathematica plain code (OK to also show the latex) and also show for the example you have what output do you want. An example is worth 1000 words. Saying rewritten as a real polynomial. is ok, but an example will always make things much more clear. So what do you want the above to be transformed to? $\endgroup$
    – Nasser
    Mar 9, 2023 at 16:50
  • $\begingroup$ Welcome to the Mathematica Stack Exchange. Could you please load Mathematica code for this expression as well as the specific alternate form that you want. It will make the Q&A process more focused. Thanks. $\endgroup$
    – Syed
    Mar 9, 2023 at 17:01
  • 2
    $\begingroup$ Try FullSimplify $\endgroup$
    – Michael E2
    Mar 9, 2023 at 17:34
  • $\begingroup$ @Nasser and Syed, thank you for the explanation as to how I should rephrase the question! Unfortunately I am not in the position to do this right now, so I will do it tomorrow and see if the suggestions others have mentioned already help me :) $\endgroup$ Mar 9, 2023 at 17:36

1 Answer 1


I am not sure if this answers your question, but you can use a combination of ComplexExpand, Factor and Expand to bring it to a different form:

 x (4/3 + 4 x^4)/(x - Sqrt[2/3] Exp[I \[Pi]/4])/(x - Sqrt[
       2/3] Exp[-I \[Pi]/4]) // ComplexExpand // Factor // Expand

enter image description here


Hi again, having seen your clarification, then I think you can get your answer using PolynomialQuotient.

The trick is to see whether a slightly different expression is more suitable for reduction. You can do this by breaking down the pieces a bit first, and then simplifying each expression first before doing any futher processing. Mathematica can be a bit tricky with how it preserves ratios.

nom = (4 x/3 + 4 x^5);
denom = FullSimplify[(x - Sqrt[2/3] Exp[I \[Pi]/4]) (x - 
      Sqrt[2/3] Exp[-I \[Pi]/4])];
PolynomialQuotient[nom, denom, x] // Factor

enter image description here

  • $\begingroup$ Thank you for your answer and help! ComplexExpand was one of the commands I was looking for. However, this is not the final form I hoped to achieve, I just clarified my question $\endgroup$ Mar 10, 2023 at 8:57
  • $\begingroup$ I have editted my answer in light of your comments :) $\endgroup$
    – alex
    Mar 10, 2023 at 9:47

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