Routh–Hurwitz Criterion Calculator

JJ Ben-Joseph headshot JJ Ben-Joseph

What this Routh–Hurwitz calculator does

This tool builds the Routh table for a real-coefficient polynomial and counts sign changes in the first column. From that information it determines how many roots lie in the open right half of the complex plane. This is the standard Routh–Hurwitz stability test used in linear time-invariant (LTI) control systems.

Instead of solving for all polynomial roots directly (which becomes tedious and numerically delicate for degree four and higher), the Routh–Hurwitz procedure relies only on arithmetic with the coefficients. That makes it practical for hand calculations, quick design checks, and embedded or educational tools where a full eigenvalue computation is not convenient.

Typical use cases include:

Mathematical background

Consider a real-coefficient polynomial of degree n with positive leading term

P(s) = an sn + an-1 sn-1 + + a1s + a0

with all coefficients real and a_n > 0. The polynomial is called Hurwitz stable if all its roots satisfy Re(s) < 0. In control systems, these roots are the poles of the closed-loop transfer function, and Hurwitz stability corresponds to an asymptotically stable response to perturbations.

The Routh–Hurwitz criterion gives necessary and sufficient conditions for Hurwitz stability using only the coefficients a_0, a_1, …, a_n. One standard form of the test is the Routh table, an array whose first column encodes the number of roots in the right half-plane. The number of sign changes in that column equals the number of roots with positive real part.

How the Routh table is constructed

For a polynomial of degree n, the Routh table has n + 1 rows. Denote the entries in row i and column j by r[i, j], starting from row 0 at the top for convenience.

Top two rows

The first row contains coefficients of the highest power in steps of 2, starting at a_n:

Row 0: [a_n, a_{n-2}, a_{n-4}, …]

The second row begins with a_{n-1} and also steps down by 2 in the power of s:

Row 1: [a_{n-1}, a_{n-3}, a_{n-5}, …]

If the degree is odd or even, some of these trailing coefficients may be absent; missing entries are treated as zeros when constructing the table.

Recursive formula for lower rows

For row indices i ≥ 2, entries are computed from the two rows above using a determinant-like formula. Let r[i, 0] be the first element of row i. For column index j ≥ 0, the general recurrence used by this calculator is:

r[i, j] = ( r[i-1, 0] * r[i-2, j+1] - r[i-2, 0] * r[i-1, j+1] ) / r[i-1, 0]

This is algebraically equivalent to the standard Routh construction and yields the same sequence in the first column, which is the part used for stability decisions.

Handling zero first-column entries

A practical difficulty arises if r[i-1, 0] = 0, because that value appears in the denominator. In analytic treatments, this is addressed by replacing the zero with a small positive parameter ε and taking limits. Numerically, the usual workaround is:

This calculator uses a fixed value ε = 10−6 whenever it encounters a zero pivot in the first column. This avoids division by zero and keeps the sign pattern meaningful for most engineering problems, though it slightly perturbs borderline cases.

Interpreting the results

Once the Routh table is constructed, focus on the first column. Let that column be

[r[0,0], r[1,0], r[2,0], …, r[n,0]].

Count the number of sign changes when moving from top to bottom. Each sign change corresponds to one root of the polynomial with positive real part. For example:

For standard control applications, the main classification is:

Worked example

Consider the polynomial

P(s) = s^4 + 3s^3 + 3s^2 + 3s + 1.

The coefficients, from highest degree to constant term, are

[1, 3, 3, 3, 1].

Enter these as

1,3,3,3,1

in the calculator input field.

The Routh table begins with the top two rows:

Using the recurrence, the lower rows are calculated step by step. The first column of the completed table is

[1, 3, 2, 1, 1].

All entries are positive, so there are no sign changes. Therefore, the polynomial has no roots in the right half-plane and the corresponding LTI system is asymptotically stable.

If instead you enter coefficients

1,0,-2,0,1

corresponding to

P(s) = s^4 - 2s^2 + 1,

the constructed Routh table yields a first column with two sign changes. The calculator reports that there are two roots in the right half-plane, so the polynomial (and associated system) is unstable.

Summary of the algorithm

  1. Read the coefficients. Ensure they are ordered from the highest power of s down to the constant term, and that the leading coefficient is positive. If necessary, multiply the polynomial by −1 to make the leading coefficient positive.
  2. Form the first two rows. Place a_n, a_{n-2}, a_{n-4}, … in the first row, and a_{n-1}, a_{n-3}, a_{n-5}, … in the second row. Treat missing coefficients as zeros.
  3. Compute subsequent rows. Use the recursive formula for r[i, j] involving the two rows above, replacing any zero first-column pivot by ε = 10−6 before dividing.
  4. Handle special patterns. If an entire row becomes zero, construct the corresponding auxiliary polynomial from the row above and differentiate it to build the replacement row (standard Routh–Hurwitz procedure).
  5. Count sign changes. Inspect the first column of the completed table. The number of sign changes from top to bottom equals the number of roots of P(s) in the right half-plane. Use this to classify the polynomial as stable, unstable, or borderline.

Comparison with direct root finding

Aspect Routh–Hurwitz (this calculator) Direct root computation
Main output Number of right-half-plane roots and stability classification Approximate locations of all roots in the complex plane
Computational effort Arithmetic on coefficients; scales well for moderate degrees Requires solving polynomial equations; can be expensive for high degrees
Numerical sensitivity Generally robust for engineering polynomials; relies on sign patterns Root locations can be sensitive to small coefficient changes
Information provided Stability (stable/unstable/borderline) and number of unstable poles Exact pole positions, damping ratios, and natural frequencies
Typical use Quick stability checks in control system design, education, and analysis Detailed dynamic analysis, time/frequency response calculations

In practice, engineers often combine both approaches: the Routh–Hurwitz test quickly indicates whether a tentative design is stable, and then numerical root finding or simulation refines the understanding of transient and frequency-domain behavior.

Assumptions and limitations

Enter coefficients like 1,5,6 for s² + 5s + 6.

Embed this calculator

Copy and paste the HTML below to add the Routh–Hurwitz Criterion Calculator - Polynomial Stability Test to your website.