9
$\begingroup$

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?

$\endgroup$
2
  • 3
    $\begingroup$ This might take a very long time: Resolve[ForAll[s, s^3 + b*s^2 + c*s + d == 0, Re[s] < 0], s]. $\endgroup$ Apr 22, 2018 at 14:06
  • $\begingroup$ 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). $\endgroup$
    – TheDoctor
    May 6, 2018 at 7:12

2 Answers 2

8
$\begingroup$

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]]

with simple answer:

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

Quantifier elimination is known to work for problems like this.

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

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

enter image description here

Generating some examples

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

Checking,

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

enter image description here

$\endgroup$
3
  • 1
    $\begingroup$ It seems more difficult, though, if what you need is Re[Root[..]]<0 for complex roots (the usual control theory problem). $\endgroup$
    – John Doty
    Apr 22, 2018 at 16:18
  • 1
    $\begingroup$ @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). $\endgroup$
    – Bob Hanlon
    Apr 22, 2018 at 17:01
  • $\begingroup$ @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. $\endgroup$
    – yarchik
    Apr 22, 2018 at 20:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.