# Proof verification: $x^3 + px - q = 0$ has three real roots iff $4p^3 < -27q^2$

I'm trying to prove the problem in the title. I'm not sure if my proof is clear, or even correct. It seems rather long, so I am not sure. Any advice would be great, especially on parts I might need to expand.

Let $f(x) = x^3 + px - q = 0$, then $f'(x) = 3x^2 + p$. Clearly, if $p \geq 0$ then $f'(x) > 0, \forall x$. Since $f(x) < 0$ as x approaches $-\infty$ (can I just state this?) and since $f(x) > 0$ as x approaches $\infty$ and $f'(x) >0, \forall x$ then by the Intermediate Value Theorem there exists only one solution on the interval $(-\infty, \infty)$ if $p \geq 0$.

Therefore, $f(x)$ [Edited: can only have] has three real roots iff $p < 0$. If $p <0$, then $f'(x) = 0$ for $x = \pm \sqrt{\frac{-p}{3}}$. Now, since $f(x) < 0, x \rightarrow -\infty$ and $f'(x) > 0$ for $x < \sqrt{\frac{-p}{3}}$ then by the IVT there exists one real solution on the interval $\left (-\infty, -\sqrt{\frac{-p}{3}}\right)$ iff $f(-\sqrt{\frac{-p}{3}}) > 0$. Likewise, since $f'(x) < 0$ on $\left (\sqrt{\frac{-p}{3}}, -\sqrt{\frac{-p}{3}}\right)$ then by the IVT there exists only one solution on that interval iff $f(-\sqrt{\frac{-p}{3}}) > 0$ and $f(\sqrt{\frac{-p}{3}}) < 0$. Lastly, since $f(x) > 0, x \rightarrow \infty$ and $f(x) > 0$ for $x > \sqrt{\frac{-p}{3}}$ then there exists only one solution on the interval $\left(\sqrt{\frac{-p}{3}}, \infty\right)$ iff $f(\sqrt{\frac{-p}{3}}) < 0$.

Since $f(x)$ has three roots iff there exists the one such root in each interval mentioned above, we require:

$f(\sqrt{\frac{-p}{3}}) < 0$ and $-f(\sqrt{\frac{-p}{3}}) > 0 \implies -2\left(\frac{-p}{3}\right)^{\frac{3}{2}} + q > 0, -2\left(\frac{-p}{3}\right)^{\frac{3}{2}} - q > 0.$ Multiplying the inequalities we get:

$-4\frac{p^3}{27} - q^2 > 0 \implies 4p^3 < -27q^2.$

• Since you have put an proof-verification tag to your question, please leave your proof as it was so that you would not invalidate any "proof-verification" answer. If you would like make adjustment to what you wrote, please make a note next to what has been edited. – Jack Sep 7 '17 at 2:04
• A less clumsy statement is "If $f(x)$ has three real roots, then $p<0$". – user14972 Sep 7 '17 at 2:12
• This is definitely a correct statement, it comes from my textbook, and I'm sure the authors have it correct. – student_t Sep 7 '17 at 2:59

I think your statement is wrong.

Try, $p=-3$ and $q=-2$.

We have $$x^3+px-q=x^3-3x+2=(x-1)^2(x+2),$$ which says that the equation $$x^3+px-q=0$$ has three real roots, but $4p^3<-27q^2$ gives $-108<-108$, which is wrong.

• Do you have an example for the three "distinct" real roots case? – Jack Sep 7 '17 at 2:34
• – Jack Sep 7 '17 at 2:45
• @Jack You say about another problem. The starting statement is wrong. – Michael Rozenberg Sep 7 '17 at 3:16

(This is an "if and only if" statement. You would make your proof much more readable by explicitly writing out which direction you are proving.)

Let $f(x) = x^3 + px - q = 0$, then $f'(x) = 3x^2 + p$. (I assume that you are talking about $x\in{\bf R}$.) Clearly, if $p \geq 0$ then $f'(x) > 0, \forall x$ (in $\bf R$).

Since $f(x) < 0$ as $x$ approaches $-\infty$ (can I just state this? (One can guess what you mean thought, this argument is not precise: you mean there exists $M>0$ such that $f(x)<0$ for all $x<-M$.))

and since $f(x) > 0$ as $x$ approaches $\infty$ (again, this should be turned into a precise statement.) and $f'(x) >0, \forall x$ ($\in{\bf R}$).

thenThen by the Intermediate Value Theorem there exists only one solution on the interval $(-\infty, \infty)$ if $p \geq 0$. (This is too quick. You might want to explain more: how is the intermediate value theorem applied and why is the solution(to what equation) unique.)

Therefore, $f(x)$ has three real roots iff $p < 0$. (What you really want to conclude is "if f has three real roots, then we must have p<0 by the argument above".)

If $p <0$, then $f'(x) = 0$ for $x = \pm \sqrt{\frac{-p}{3}}$.

Now, since $f(x) < 0$ (for $x<-M$(with the M mentioned above)) and $f'(x) > 0$ for $x < \sqrt{\frac{-p}{3}}$,

then by the IVT there exists one real solution on the interval $\left (-\infty, -\sqrt{\frac{-p}{3}}\right)$ iff $f(-\sqrt{\frac{-p}{3}}) > 0$. (This "iff" is very confusing. I don't understand this sentence.)

Likewise, since $f'(x) < 0$ on $\left (\sqrt{\frac{-p}{3}}, -\sqrt{\frac{-p}{3}}\right)$ then by the IVT there exists only one solution on that interval iff $f(-\sqrt{\frac{-p}{3}}) > 0$ and $f(\sqrt{\frac{-p}{3}}) < 0$. (This "iff" is very confusing. I don't understand this sentence.)

Lastly, since $f(x) > 0, x \rightarrow \infty$ and $f(x) > 0$ for $x > \sqrt{\frac{-p}{3}}$ then there exists only one solution on the interval $\left(\sqrt{\frac{-p}{3}}, \infty\right)$ iff $f(\sqrt{\frac{-p}{3}}) < 0$. (This "iff" is very confusing. I don't understand this sentence and I shall stop reading from here.)

Since $f(x)$ has three roots iff there exists the one such root in each interval mentioned above, we require:

$f(\sqrt{\frac{-p}{3}}) < 0$ and $-f(\sqrt{\frac{-p}{3}}) > 0 \implies -2\left(\frac{-p}{3}\right)^{\frac{3}{2}} + q > 0, -2\left(\frac{-p}{3}\right)^{\frac{3}{2}} - q > 0.$ Multiplying the inequalities we get: $$-4\frac{p^3}{27} - q^2 > 0 \implies 4p^3 < -27q^2.$$

• Sorry! In the last line I meant that $f(x)$ can only have three roots if $p > 0$ because otherwise $f(x)$ would only have one solution since it would always be increasing. – student_t Sep 7 '17 at 2:02
• Also, why cannot I not just state the IVT? If I use the precise definition that $\exists M_1, M_2$ so that if $x < -M_1, f(x) < 0$ and if $x > M_2, f(x) > 0$ then $f(x) = 0$ on $(-M_1, M_2)$ so there must be at least one solution on the interval, but since $f'(x) > 0$ then there can only be one solution? – student_t Sep 7 '17 at 2:12
• @danny: you mention at the beginning that "especially on parts I might need to expand." That's what you should add into the proof, not what the reader should guess, isn't it? – Jack Sep 7 '17 at 2:15
• Yeah that makes sense. Although I am not sure how to prove this in each direction, since the proof depends on inequalities? – student_t Sep 7 '17 at 2:20
• – student_t Sep 7 '17 at 2:44

If you take the "del Ferro - Cardano" equations for the solution of a third degree polynomial:

$$x = \sqrt{-\frac{q}{2}\enspace+\enspace \sqrt{\frac{q^2}{4}+\frac{p^3}{27}}}\enspace\enspace+\enspace \sqrt{-\frac{q}{2}\enspace-\enspace \sqrt{\frac{q^2}{4}\enspace+\enspace \frac{p^3}{27}}}$$

The only way you get three real solutions is if the argument of the square root is positive , so by saying:

$$\frac{q^2}{4}+\frac{p^3}{27} >0\enspace \Rightarrow\enspace 4p^3 > -27q^2$$

look at the discriminant of a cubic, $$f(x)=x^3+ax^2+bx+c$$, with roots $$\alpha, \beta, \gamma$$.

Then the $$\Delta(f)=(\alpha-\beta)^2(\beta-\gamma)^2(\gamma-\alpha)^2=a^2b^2 + 18abc − 4b^3 − 4a^3c − 27c^2$$ (follows by Vieta's formulas).

The discriminant is positive iff $$f$$ has 3 real roots according to this:Why does the discriminant of a cubic polynomial being less than $0$ indicate complex roots?

For your cubic, the discriminant is $$-4(p)^3-27(-q)^2=-4p^3-27c^2.$$