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:
Consider a real-coefficient polynomial of degree n with positive leading term
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.
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.
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.
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.
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.
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:
Re(s) > 0.For standard control applications, the main classification is:
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:
s^4, s^2, s^0): [1, 3, 1]s^3, s^1): [3, 3, 0]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.
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.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.r[i, j] involving the two rows above, replacing any zero first-column pivot by ε = 10−6 before dividing.P(s) in the right half-plane. Use this to classify the polynomial as stable, unstable, or borderline.| 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.
a_n > 0. If your polynomial has a negative leading coefficient, multiply all coefficients by −1 before entering them. This does not change the roots but simplifies the sign interpretation.
ε = 10−6 to avoid division by zero. For genuinely marginally stable systems with roots on the imaginary axis, this small perturbation can slightly alter the sign pattern. Use the results as a guide and, if the system appears borderline, confirm using an independent method (e.g., direct root computation or simulation).
1, 5, 6 for s^2 + 5s + 6). Extra commas, missing coefficients, or non-numeric text may lead to errors or to coefficients being treated as zero.