# Finding the real root of a cubic algebraically

I'm sorry if this is a very easy question but my brain is fried tonight and I can't think how to do it.

I need to solve $x^3 = 2 - x$.

Obviously by eyeballing the equation you can see that the only real root is $x = 1$. But eyeballing doesn't work for more complicated equations. Is there a way to arrive at this solution algebraically?

EDIT: Yes, I know how to work out the other roots ($x=\frac{-1\pm i\sqrt{7}}{2}$), but that's not what I was asking ;)

-
You have below, in the answers the only really sure method, and that is to solve the equation and to find the real root. In general cases, usually when someone asks you to solve a given cubic equation, one obvious small root exists. Try $0,\pm 1,\pm 2, \pm \frac{1}{2}$, or try all integer divisors of the free term. If these don't work, it is highly unlikely to find the real root by guessing. The only sure method is to use the solving formula. – Beni Bogosel Oct 5 '11 at 20:00
@Qiaochu Yuan: Thanks, I didn't know about that theorem. That'll come in handy in the future I'm sure. – James Robinson Oct 6 '11 at 1:16
possible duplicate of Inverse of $y = x^3 + x$? – J. M. Oct 6 '11 at 8:34
@J. M.: Thanks for the link - the top-voted answer on that question was really helpful. – James Robinson Oct 6 '11 at 11:12

The general method has quite a history, and is usually called Cardano's Method. The gist is as follows:

When you have a cubic of the form $ax^3 + bx + c = 0$ (which you do), substitute $u + v = x$ in for $x$ subject to $3uv = -b$. Plugging this in and simplifying, you see that $u^3$ and $v^3$ are the two roots of the equation $z^2 +cz - \frac{b^3}{27} = 0$. Then you may solve for $u$ and $v$ with the quadratic formula and a cubic root.

At the end of the day, you do a lot of work to get a scary-looking expression that has a root in it - dividing out gives you a quadratic, which gives you the other two roots (that's how I usually use it, anyway). More detail can be found in the link above if this brief overview is too unclear.

I highly recommend looking into the history of Cardano's formula, though, as it gives an interesting look at how mathematics has changed. In Cardano's day, for example, mathematicians were in the personal retinues of kings and they would compete - likely the inspiration for Cardano's formula itself.

-
What does Cardano's formula give as the final answer for this polynomial? The scary-looking expression does not look like "x=1" but requires additional analysis to put in that form. It is not clear how to recognize from Cardano's formula that you have an integer solution. – zyx Oct 5 '11 at 19:28
@zyx: Cardano's method doesn't know about integers any more than the usual quadratic formula does. It gives the roots, and the result is an integer but may take simplification to see that. The rational root theorem that you cite is very useful for exactly that reason-it gives you a finite list of rationals to try, which might be roots. – Ross Millikan Oct 5 '11 at 19:34
@Ross: I posted what Cardano's method or an equivalent gives for this problem. You could certainly say that it "may take simplification to see that" it is another name for x=1. In the case of the quadratic formula one can simply test, and often see without calculation, whether the discriminant is a perfect square. In the cubic case there is no simple way of detecting that a simplification occurs. – zyx Oct 5 '11 at 20:06
I'm afraid you lost me at "u3 and v3 are the two roots of the equation $z^2+cz−\frac{b^3}{27}=0$". Could you break it down a bit further so idiots like me can understand? :P – James Robinson Oct 5 '11 at 20:14
The trick to seeing that Cardano's equation gives you $1$ is to figure out that $1 + \frac{2}{3}\sqrt{\frac{7}{3}} = (\frac{1}{2} + \frac{1}{2}\sqrt{\frac{7}{3}})^3$ and similarly that $1 - \frac{2}{3}\sqrt{\frac{7}{3}} = (\frac{1}{2} - \frac{1}{2}\sqrt{\frac{7}{3}})^3$. So the sum of the (real) cube roots of these two values is $1$. However, I only arrived at these representations because I assumed there was such a representation. – Thomas Andrews Oct 5 '11 at 21:32

Recognizing $x=1$ as an exact root is not something you "arrive at algebraically" so much as a search process through a discrete space of possibilities, followed by a computation to verify that it is a root. The algebraic solution formula for cubic equations expresses $1$ as one of three possible values of a complex expression involved nested imaginary square and cube roots and it is hard to recognize $1$ from looking at that. A numerical equation solver would find $1.00000....$ as an answer strongly hinting that $x=1$ is a solution.

Here is what Wolfram Alpha says about the real root of $x^3 + x = a$ using some form of the cubic formula:

$$x = \left\{\frac{\sqrt[3]{9 a+\sqrt{3} \sqrt{27 a^2+4}}}{\sqrt[3]{2} 3^{2/3}}-\frac{\sqrt[3]{\frac{2}{3}}}{\sqrt[3]{9 a+\sqrt{3} \sqrt{27 a^2+4}}}\right\}$$

which for $a=2$ is the nice expression $$x = \left\{\frac{\sqrt[3]{18+\sqrt{3} \sqrt{112}}}{\sqrt[3]{2} 3^{2/3}}-\frac{\sqrt[3]{\frac{2}{3}}}{\sqrt[3]{18+\sqrt{3} \sqrt{112}}}\right\}$$

Imagine here a computer and calculator-equipped generation of students solving algebra homework by machine and submitting those as answers... (By the way, there are factors of 2 and 3 in the solution formula that Mathematica treats as additional cube root extractions, which are not part of the cubic formula in its usual presentation. This is wrong from the Galois-theoretic point of view where solving a cubic needs only one square root operation and one cube root of something built from the square root. It might be necessary in a computer algebra system where Sqrt and CubeRoot are interpreted as unique functions and not abstract roots whose placement into the complex plane involves some choices.)

There are two facts behind the simplicity of this problem that are useful to understand:

Because the equation is $x^3 + x - 2=0$ with a first coefficient of $1$ and a last coefficient of $-2$ one knows that any rational solution is an integer dividing $-2$ and $x=\pm 1$ are the easiest cases to check. I think this principle is called the "rational root theorem".

Once you have a root $x=a$ then $(x-a)$ is a factor of the given degree 3 polynomial. I think this is called "factor theorem" or "remainder theorem" for polynomials (sorry for not knowing the terminology but certainly the Wikipedia will have it, under polynomials). This implies the preceding principle about divisibility. Anyway, $(x^3 + x - 2)/(x-1)$ is a quadratic polynomial and there are several ways to see that it is positive everywhere for real values of $x$.

If you know calculus you can check that $f(x) = x^3 + x -2$ is increasing as a function of $x$ so that $f(x)=2$ can have only one real solution.

-

Recall the Factor Theorem:

$(x-c)$ is a factor of a polynomial $f(x) \Longleftrightarrow c$ is a root of $f$

You know one of the roots of the polynomial $x^3+x-2$, so you know a linear factor. Now, divide, and you're left with a quadratic polynomial, whose roots can be found with, say, the quadratic formula.

-
I know, that's how I got the complex roots. Please go back and read my question again ;) – James Robinson Oct 5 '11 at 19:36