# Finding the condition for root of a third degree polynomial

I've a third degree polynomial (in $$s$$):

$$as^3+bs^2+cs+d\tag1$$

I need to find the roots of the polynomial, so I can use the code:

Solve[a*s^3 + b*s^2 + c*s + d == 0, s]


Now, there are three solutions because it is a third degree polynomial.

Now, the question: I need to find the condition for which all three of the roots of the polynomial have a real part that is strictly smaller then zero. Can I find that condition?

• This might take a very long time: Resolve[ForAll[s, s^3 + b*s^2 + c*s + d == 0, Re[s] < 0], s]. Apr 22, 2018 at 14:06
• It would be worth knowing more about how the problem arises (my guess would be this is a stability test for a control system). The Routh test determines whether all the roots of the characteristic polynomial of a linear system have negative real parts, and there are easy ways to apply the Routh–Hurwitz stability criterion (en.wikipedia.org/wiki/Routh–Hurwitz_stability_criterion). May 6, 2018 at 7:12

Assuming real coefficients and a=1, following Daniel Lichtblau comment, conditions are quickly found by:

Resolve[ForAll[s, s^3 + b*s^2 + c*s + d == 0, Re[s] < 0] && Element[d, Reals] && Element[c, Reals] && Element[b, Reals]]

b > 0 && c > 0 && 0 < d < b c.

Quantifier elimination is known to work for problems like this.

• Nice (and an upvote). It did not occur to me to add those real variable specifications. Apr 22, 2018 at 20:04

Since a != 0 then without loss of generality you can set a == 1

poly = #^3 + b*#^2 + c*# + d &;


The conditions can be found very rapidly if the three roots are real. Further, assuming that you want three distinct roots,

(* cond = Reduce[{Root[poly, 1] < 0, Root[poly, 2] < 0, Root[poly, 3] < 0,
Root[poly, 1] < Root[poly, 2] < Root[poly, 3]}, {b, c, d}, Reals] //
FullSimplify *)


EDIT: written more simply

cond = Reduce[{Root[poly, 1] < Root[poly, 2] < Root[poly, 3] < 0}, {b,
c, d}, Reals] // FullSimplify


Generating some examples

SeedRandom[0];
cond5 = FindInstance[cond, {b, c, d}, Integers, 5];


Checking,

Grid[{#, NSolve[poly[s] == 0 /. #, s, Reals]} & /@ cond5, Alignment -> Left]


• It seems more difficult, though, if what you need is Re[Root[..]]<0 for complex roots (the usual control theory problem). Apr 22, 2018 at 16:18
• @yarchik - For a != 0 then s^3 + b s^2 + c s + d has the same roots as a s^3 + (a b) s^2 + (a c) s + (a d) which is the original form. Or starting with the original form and a != 0 then a s^3 + b s^2 + c s + d has the same roots as s^3 + (b/a) s^2 + (c/a) s + (d/a). The cond /. b -> 0 evaluating to False indicates that there is no c and d for which s^3 + c s + d has three distinct negative (i.e., real) roots (the simplified case that I indicated that I was addressing). Apr 22, 2018 at 17:01
• @BobHanlon My comment was not well thought. You are right. The s^3 + c s + d==0 equation cannot have 3 negative roots on the basis of Vieta's formulas. Apr 22, 2018 at 20:42