# Why does Wolfram Alpha say the roots of a cubic involve square roots of negative numbers, when all three roots are real?

Can someone please explain Wolfram Alpha's response to the equation $x^3-3x-1=0$? The roots are real and graphic Wolfram itself shows them (they are approximately equal to $-1.5321, -0.3473$ and $1.8794$). However the roots explicitly given by Wolfram seem not to be real.

• The imaginary bits cancel out. Oct 31, 2016 at 20:41
• Please write a more descriptive title, thanks! Nov 1, 2016 at 7:06
• @DougM Any insight as to why Wolfram Alpha wouldn't simplify the equations if the imaginary bits do cancel out? Nov 1, 2016 at 12:47
• @IanBoyd That's the big plot twist in the story of the cubic formula: the question only involves real numbers, and the answer is real, but to write the answer using radicals, you have to use some complex intermediates. The fact that the imaginary parts add up to 0 and the end doesn't mean there's some way of rearranging the expression to get rid of them. If you try, you mess up the real part, which you need.
– user141452
Nov 2, 2016 at 1:03
• @WumpusQ.Wumbley #unlesstrig Nov 2, 2016 at 11:35

This is an example of the casus irreducibilis: the formulas for solving cubics need complex numbers when the cubic has three real roots.

• I knew that my God! Why I did not remember it? Oct 31, 2016 at 21:03

When the discriminant of the equation is negative, there are $$3$$ real roots. It's precisely in this case that Cardano's formulæ do not work, because the radicands are negative.

It is even historically the reason why square roots of negative numbers were introduced: the formulae become valid in all cases.

• I feel like the wording "Cardano's formulae do not work" is somewhat misleading - they do work, but you have to think about complex numbers at this point. Nov 1, 2016 at 12:30
• That's what I meant: their plain use doesn't work. I think this is clear from the following comment. Nov 1, 2016 at 13:56

For your interest, the real representation of the roots is given by

$$x_k=2\cos\left(\frac\pi9+\frac{2\pi k}3\right)\qquad k=0,1,2$$

I always find these trigonometric representations nicer.

This comes directly from the following identity:

$$\cos(3a)=4\cos^3(a)-3\cos(a)$$

$$\cos(3\arccos(a))=4a^3-3a$$

And lastly the fact that cosine is periodic.

• Absolutely. And it is known too. Regards. Nov 1, 2016 at 10:48
• Could you add a few words on how you calculated these roots?
– user88319
Nov 1, 2016 at 15:35
• @Strants there you go. The trick to this particular problem was the substitution $x=2y$, then dividing both sides by $2$. Then everything is in the perfect form. Nov 1, 2016 at 16:42
• How in the world did you know that identity I wish to be able to recognize this like you. Jan 8, 2017 at 4:27
• @AhmedS.Attaalla It's just my favorite way to factor cubic polynomials :D Comes with practice mate. Jan 8, 2017 at 12:54

Solving equation $x^3-3x-1=0$ with free CAS Maxima:

• What is solvet? Solve using trig? Sep 11, 2018 at 12:48