[Math] the condition for the first root of a cubic function to be positive

algebra-precalculuscubicspolynomialsroots

Is there any way to determine if the "first root" of a cubic equation is positive, assuming that it's real, given coefficients $a,b,c,$ and $d$?

I tried following along with Wikipedia's explaination for Cardano's method for finding the first root of the equation $ax^3+bx^2+cx+d=0$, where, assuming that it's a real root:

$$
t_1=\sqrt[3]{-\frac{q}{2}+\sqrt{\frac{q^2}{4}+\frac{p^3}{27}}}+\sqrt[3]{-\frac{q}{2}-\sqrt{\frac{q^2}{4}+\frac{p^3}{27}}}
$$

(Source: http://en.wikipedia.org/wiki/Cubic_function#Cardano.27s_method)

Changing it to an inequality where $t_1=0$, I tried to simplify this down:

$$
\begin{align}
-\sqrt[3]{-\frac{q}{2}+\sqrt{\frac{q^2}{4}+\frac{p^3}{27}}}&<\sqrt[3]{-\frac{q}{2}-\sqrt{\frac{q^2}{4}+\frac{p^3}{27}}}\\\\
-(-\frac{q}{2}+\sqrt{\frac{q^2}{4}+\frac{p^3}{27}})&<(-\frac{q}{2}-\sqrt{\frac{q^2}{4}+\frac{p^3}{27}})\\\\
\frac{q}{2}&<-\frac{q}{2}\\\\
q&<-q
\end{align}
$$
According to wikipedia:
$$
q=\frac{2b^3-9abc+27a^2d}{27a^3}
$$
So I tried substituting this back, and I get:
$$
\begin{align}
\frac{2b^3-9abc+27a^2d}{27a^3}&<-\frac{2b^3-9abc+27a^2d}{27a^3}\\\\
2b^3-9abc+27a^2d&<-(2b^3-9abc+27a^2d)\\\\
4b^3-18abc+54a^2d&<0
\end{align}
$$
I'm not sure if my way is correct. Are there any better ways to determine if the real "first root" of a cubic equation is positive, given coefficients $a,b,c,$ and $d$? Thank you for your time.

Best Answer

In your question and comment there are a few different things that might warrant addressing. I'll try to respond to them separately, starting with some minor points of clarification, and then answering the closest thing to what you want.


"I'm not sure if my way is correct."

Unfortunately, your work seems to be looking for when the "first $t$" is positive in the solution of the depressed cubic equation $t^3+pt+q=0$. But since $x=t-\frac{b}{3a}$, answering that question is not the same as answering when $x$ is positive, because of the shift by $\dfrac{b}{3a}$. (It turns out that when the equation has three real roots, the $\frac{b}{3a}$ shift makes the biggest $t$ root positive no matter what.)


I am talking about specifically $x_1$.

Unfortunately, there's a significant issue with this idea. When there's exactly one real root, it's $x_1$, and then you're asking "is the real root positive?", which is a very sensible question. But when there are more real roots, then you're taking cube roots of non-real numbers (and you can't really avoid it: you're likely in the casus irreducibilis), which sort of depends on how you how you define them.

Now, if you arbitrarily pick a particular definition of complex cube root, you can answer this, or if you arbitrarily pick an ordering of the trigonometric formulas for the solutions then you have a concrete question. But since you didn't mention either of those approaches in your question I'm going to assume that you didn't really have them in mind. If you're interested in something like that, I suppose you could ask a separate question about it.


The real question:

What I am primarily looking to identify are these cases: where the polynomial could have 1 real positive root and 2 imaginary roots, and the case where it has 3 real roots with at least one of them positive.

Two key facts that can help us answer your question.

  1. For a cubic polynomial with real coefficients, there is a number called the discriminant (which I will denote by $\Delta$) which is positive when the polynomial has three distinct real roots, is zero when the polynomial has three real roots with a repeated root, and is negative when the polynomial has exactly one real root. If the cubic equation is $ax^3+bx^2+cx+d=0$, then it turns out $\Delta=-27 a^2 d^2+18 a b c d-4 a c^3-4 b^3 d+b^2 c^2$.
  2. There is a simple algebraic rule of thumb called Descartes' Rule of Signs that can help you count the positive and negative roots of a polynomial. Luckily, a cubic doesn't have that many roots, so Descartes' Rule of Signs will be extremely helpful. You count the number of sign changes (positive to negative or vice versa) in the coefficients, and the number of positive roots is either that number, or that number minus 2.

What do these two facts tell us?

  1. If there are no sign changes in the coefficients, there cannot be any positive roots.
  2. If there is exactly one sign change, then there must be exactly one positive root (and if $\Delta>0$ it's your "$x_1$").
  3. If there are two sign changes, then there might be two positive roots or zero positive roots. If $\Delta>0$ then there's only one real root, so there can't be two and there must be zero so the real root isn't positive. But if $\Delta\le0$ so that there are three roots, then by applying the Rule of Signs to the polynomial with $-x$ substituted in for $x$ we see that there is at most one negative root, and since we can't have $c=d=0$ in a case like this, there is at most one root equal to zero: there must be two positive roots.
  4. If there are three sign changes, then there might be one positive root or three positive roots. If $\Delta>0$ then the unique real root is positive. If $\Delta\le0$ then the rule of signs applied to the polynomial with $-x$ substituted in tells us there are no negative roots, and since we can't have $d=0$ in a case like this: there must be three positive roots.

What are all the cases, though?

For simplicity, divide through your polynomial $ax^3+bx^2+cx+d$ by the leading coefficient $a$ to give the the form $x^3+bx^2+cx+d$. The roots will be the same, but now we have cut the cases in half since we don't have to worry about $a$ being negative. (The discriminant is now a little simpler, too: $\Delta=-4 b^3 d+b^2 c^2+18 b c d-4 c^3-27 d^2$.)

Now we can make a table of possibilities for the signs of the coefficients. I'll use inequality symbols as shorthand for comparison with $0$, so that $\ge$ will mean $\ge0$ in this table. The numbers of sign changes come from that fact that the leading coefficient has been made $1$. The last column is the number of positive roots.

\begin{array}{cccc} b & c & d & \text{#}\\ \ge & \ge & \ge & 0\\ \ge & \ge & < & 1\\ \ge & < & \le & 1\\ \ge & < & > & 0\text{ or }2\\ < & \le & \le & 1\\ < & \le & > & 0\text{ or }2\\ < & > & \ge & 0\text{ or }2\\ < & > & < & 1\text{ or }3 \end{array} And from our notes above, every single one of those "or" cases is distinguished by the discriminant: If $\Delta>0$ then it's the lower number, and if $\Delta\le0$ then it must be the higher number.

Closing remarks

The discriminant is kind of an ugly expression, and this table has a bunch of cases, but unfortunately there's not much you can do about that. You can regroup the cases a bit if you like, but I don't think it can really be reduced in general. One general rewriting that still has 8 cases is: \begin{array}{cccc} b & c & d & \text{#}\\ \ge & \ge & \ge & 0\\ \ge & ? & < & 1\\ ? & < & = & 1\\ < & \le & \le & 1\\ \ge & < & > & 0\text{ or }2\\ < & ? & > & 0\text{ or }2\\ < & > & = & 0\text{ or }2\\ < & > & < & 1\text{ or }3 \end{array}

That said, if you happen to know that $\Delta>0$ so that there's only one real root (and hence it's $x_1$), then things do simplify somewhat nicely: \begin{array}{cccc} b & c & d & x_1>0\text{?}\\ ? & ? & > & \text{no}\\ ? & > & = & \text{no}\\ \ge & = & = & \text{no}\\ ? & ? & < & \text{yes}\\ ? & < & = & \text{yes}\\ < & = & = & \text{yes} \end{array}

Related Question