# Derivation of the Routh array

The Routh array is a tabular method permitting one to establish the stability of a system using only the coefficients of the characteristic polynomial. Central to the field of control systems design, the Routh–Hurwitz theorem and Routh array emerge by using the Euclidean algorithm and Sturm's theorem in evaluating Cauchy indices.

## The Cauchy index

Given the system:
    ${\begin{aligned}f(x)&=a_{0}x^{n}+a_{1}x^{n-1}+\cdots +a_{n}&\quad (1)\\&=(x-r_{1})(x-r_{2})\cdots (x-r_{n})&\quad (2)\\\end{aligned}}$
Assuming no roots of $f(x)=0$ lie on the imaginary axis, and letting
    $N$ = The number of roots of $f(x)=0$ with negative real parts, and
    $P$ = The number of roots of $f(x)=0$ with positive real parts
then we have
    $N+P=n\quad (3)$
Expressing $f(x)$ in polar form, we have
    $f(x)=\rho (x)e^{j\theta (x)}\quad (4)$
where
    $\rho (x)={\sqrt {{\mathfrak {Re}}^{2}[f(x)]+{\mathfrak {Im}}^{2}[f(x)]}}\quad (5)$
and
    $\theta (x)=\tan ^{-1}{\big{\mathfrak {Im}}[f(x)]/{\mathfrak {Re}}[f(x)]{\big )}\quad (6)$
from (2) note that
    $\theta (x)=\theta _{r_{1}}(x)+\theta _{r_{2}}(x)+\cdots +\theta _{r_{n}}(x)\quad (7)$
where
    $\theta _{r_{i}}(x)=\angle (x-r_{i})\quad (8)$
Now if the ith root of $f(x)=0$ has a positive real part, then (using the notation y=(RE[y],IM[y]))
    ${\begin{aligned}\theta _{r_{i}}(x){\big |}_{x=-j\infty }&=\angle (x-r_{i}){\big |}_{x=-j\infty }\\&=\angle (0-{\mathfrak {Re}}[r_{i}],-\infty -{\mathfrak {Im}}[r_{i}])\\&=\angle (-|{\mathfrak {Re}}[r_{i}]|,-\infty )\\&=\pi +\lim _{\phi \to \infty }\tan ^{-1}\phi ={\frac {3\pi }{2}}\quad (9)\\\end{aligned}}$
and
    $\theta _{r_{i}}(x){\big |}_{x=j0}=\angle (-|{\mathfrak {Re}}[r_{i}]|,0)=\pi -\tan ^{-1}0=\pi \quad (10)$
and
    $\theta _{r_{i}}(x){\big |}_{x=j\infty }=\angle (-|{\mathfrak {Re}}[r_{i}]|,\infty )=\pi -\lim _{\phi \to \infty }\tan ^{-1}\phi ={\frac {\pi }{2}}\quad (11)$
Similarly, if the ith root of $f(x)=0$ has a negative real part,
    ${\begin{aligned}\theta _{r_{i}}(x){\big |}_{x=-j\infty }&=\angle (x-r_{i}){\big |}_{x=-j\infty }\\&=\angle (0-{\mathfrak {Re}}[r_{i}],-\infty -{\mathfrak {Im}}[r_{i}])\\&=\angle (|{\mathfrak {Re}}[r_{i}]|,-\infty )\\&=0-\lim _{\phi \to \infty }\tan ^{1}\phi =-{\frac {\pi }{2}}\quad (12)\\\end{aligned}}$
and
    $\theta _{r_{i}}(x){\big |}_{x=j0}=\angle (|{\mathfrak {Re}}[r_{i}]|,0)=\tan ^{-1}0=0\,\quad (13)$
and
    $\theta _{r_{i}}(x){\big |}_{x=j\infty }=\angle (|{\mathfrak {Re}}[r_{i}]|,\infty )=\lim _{\phi \to \infty }\tan ^{-1}\phi ={\frac {\pi }{2}}\,\quad (14)$
From (9) to (11) we find that $\theta _{r_{i}}(x){\Big |}_{x=-j\infty }^{x=j\infty }=-\pi$ when the ith root of $f(x)$ has a positive real part, and from (12) to (14) we find that $\theta _{r_{i}}(x){\Big |}_{x=-j\infty }^{x=j\infty }=\pi$ when the ith root of $f(x)$ has a negative real part. Thus,
    $\theta (x){\Big |}_{x=-j\infty }^{x=j\infty }=\angle (x-r_{1}){\Big |}_{x=-j\infty }^{x=j\infty }+\angle (x-r_{2}){\Big |}_{x=-j\infty }^{x=j\infty }+\cdots +\angle (x-r_{n}){\Big |}_{x=-j\infty }^{x=j\infty }=\pi N-\pi P\quad (15)$
So, if we define
    $\Delta ={\frac {1}{\pi }}\theta (x){\Big |}_{-j\infty }^{j\infty }\quad (16)$
then we have the relationship
    $N-P=\Delta \quad (17)$
and combining (3) and (17) gives us
    $N={\frac {n+\Delta }{2}}$ and $P={\frac {n-\Delta }{2}}\quad (18)$
Therefore, given an equation of $f(x)$ of degree $n$ we need only evaluate this function $\Delta$ to determine $N$, the number of roots with negative real parts and $P$, the number of roots with positive real parts.
* Figure 1
* $\tan(\theta )$ versus $\theta$
In accordance with (6) and Figure 1, the graph of $\tan(\theta )$ vs $\theta$, varying $x$ over an interval (a,b) where $\theta _{a}=\theta (x)|_{x=ja}$ and $\theta _{b}=\theta (x)|_{x=jb}$ are integer multiples of $\pi$, this variation causing the function $\theta (x)$ to have increased by $\pi$, indicates that in the course of travelling from point a to point b, $\theta$ has "jumped" from $+\infty$ to $-\infty$ one more time than it has jumped from $-\infty$ to $+\infty$. Similarly, if we vary $x$ over an interval (a,b) this variation causing $\theta (x)$ to have decreased by $\pi$, where again $\theta$ is a multiple of $\pi$ at both $x=ja$ and $x=jb$, implies that $\tan \theta (x)={\mathfrak {Im}}[f(x)]/{\mathfrak {Re}}[f(x)]$ has jumped from $-\infty$ to $+\infty$ one more time than it has jumped from $+\infty$ to $-\infty$ as $x$ was varied over the said interval.
Thus, $\theta (x){\Big |}_{-j\infty }^{j\infty }$ is $\pi$ times the difference between the number of points at which ${\mathfrak {Im}}[f(x)]/{\mathfrak {Re}}[f(x)]$ jumps from $-\infty$ to $+\infty$ and the number of points at which ${\mathfrak {Im}}[f(x)]/{\mathfrak {Re}}[f(x)]$ jumps from $+\infty$ to $-\infty$ as $x$ ranges over the interval $(-j\infty ,+j\infty \,)$ provided that at $x=\pm j\infty$, $\tan[\theta (x)]$ is defined.
* Figure 2
* $-\cot(\theta )$ versus $\theta$
In the case where the starting point is on an incongruity (i.e. $\theta _{a}=\pi /2\pm i\pi$, i = 0, 1, 2, ...) the ending point will be on an incongruity as well, by equation (17) (since $N$ is an integer and $P$ is an integer, $\Delta$ will be an integer). In this case, we can achieve this same index (difference in positive and negative jumps) by shifting the axes of the tangent function by $\pi /2$, through adding $\pi /2$ to $\theta$. Thus, our index is now fully defined for any combination of coefficients in $f(x)$ by evaluating $\tan[\theta ]={\mathfrak {Im}}[f(x)]/{\mathfrak {Re}}[f(x)]$ over the interval (a,b) = $(+j\infty ,-j\infty )$ when our starting (and thus ending) point is not an incongruity, and by evaluating
    $\tan[\theta '(x)]=\tan[\theta +\pi /2]=-\cot[\theta (x)]=-{\mathfrak {Re}}[f(x)]/{\mathfrak {Im}}[f(x)]\quad (19)$
over said interval when our starting point is at an incongruity. This difference, $\Delta$, of negative and positive jumping incongruities encountered while traversing $x$ from $-j\infty$ to $+j\infty$ is called the Cauchy Index of the tangent of the phase angle, the phase angle being $\theta (x)$ or $\theta '(x)$, depending as $\theta _{a}$ is an integer multiple of $\pi$ or not.

## The Routh criterion

To derive Routh's criterion, first we'll use a different notation to differentiate between the even and odd terms of $f(x)$:
    $f(x)=a_{0}x^{n}+b_{0}x^{n-1}+a_{1}x^{n-2}+b_{1}x^{n-3}+\cdots \quad (20)$
Now we have:
    ${\begin{aligned}f(j\omega )&=a_{0}(j\omega )^{n}+b_{0}(j\omega )^{n-1}+a_{1}(j\omega )^{n-2}+b_{1}(j\omega )^{n-3}+\cdots &\quad (21)\\&=a_{0}(j\omega )^{n}+a_{1}(j\omega )^{n-2}+a_{2}(j\omega )^{n-4}+\cdots &\quad (22)\\&+b_{0}(j\omega )^{n-1}+b_{1}(j\omega )^{n-3}+b_{2}(j\omega )^{n-5}+\cdots \\\end{aligned}}$
Therefore, if $n$ is even,
    ${\begin{aligned}f(j\omega )&=(-1)^{n/2}{\biga_{0}\omega ^{n}-a_{1}\omega ^{n-2}+a_{2}\omega ^{n-4}-\cdots {\big ]}&\quad (23)\\&+j(-1)^{(n/2)-1}{\bigb_{0}\omega ^{n-1}-b_{1}\omega ^{n-3}+b_{2}\omega ^{n-5}-\cdots {\big ]}&\\\end{aligned}}$
and if $n$ is odd:
    ${\begin{aligned}f(j\omega )&=j(-1)^{(n-1)/2}{\biga_{0}\omega ^{n}-a_{1}\omega ^{n-2}+a_{2}\omega ^{n-4}-\cdots {\big ]}&\quad (24)\\&+(-1)^{(n-1)/2}{\bigb_{0}\omega ^{n-1}-b_{1}\omega ^{n-3}+b_{2}\omega ^{n-5}-\cdots {\big ]}&\\\end{aligned}}$
Now observe that if $n$ is an odd integer, then by (3) $N+P$ is odd. If $N+P$ is an odd integer, then $N-P$ is odd as well. Similarly, this same argument shows that when $n$ is even, $N-P$ will be even. Equation (15) shows that if $N-P$ is even, $\theta$ is an integer multiple of $\pi$. Therefore, $\tan(\theta )$ is defined for $n$ even, and is thus the proper index to use when n is even, and similarly $\tan(\theta ')=\tan(\theta +\pi )=-\cot(\theta )$ is defined for $n$ odd, making it the proper index in this latter case.
Thus, from (6) and (23), for $n$ even:
    $\Delta =I_{-\infty }^{+\infty }{\frac {-{\mathfrak {Im}}[f(x)]}{{\mathfrak {Re}}[f(x)]}}=I_{-\infty }^{+\infty }{\frac {b_{0}\omega ^{n-1}-b_{1}\omega ^{n-3}+\cdots }{a_{0}\omega ^{n}-a_{1}\omega ^{n-2}+\ldots }}\quad (25)$
and from (19) and (24), for $n$ odd:
    $\Delta =I_{-\infty }^{+\infty }{\frac {{\mathfrak {Re}}[f(x)]}{{\mathfrak {Im}}[f(x)]}}=I_{-\infty }^{+\infty }{\frac {b_{0}\omega ^{n-1}-b_{1}\omega ^{n-3}+\ldots }{a_{0}\omega ^{n}-a_{1}\omega ^{n-2}+\ldots }}\quad (26)$
Lo and behold we are evaluating the same Cauchy index for both: $\Delta =I_{-\infty }^{+\infty }{\frac {b_{0}\omega ^{n-1}-b_{1}\omega ^{n-3}+\ldots }{a_{0}\omega ^{n}-a_{1}\omega ^{n-2}+\ldots }}\quad (27)$

## Sturm's theorem

Sturm gives us a method for evaluating $\Delta =I_{-\infty }^{+\infty }{\frac {f_{2}(x)}{f_{1}(x)}}$. His theorem states as follows:
Given a sequence of polynomials $f_{1}(x),f_{2}(x),\dots ,f_{m}(x)$ where:
1) If $f_{k}(x)=0$ then $f_{k-1}(x)\neq 0$, $f_{k+1}(x)\neq 0$, and $\operatorname {sign} [f_{k-1}(x)]=-\operatorname {sign} [f_{k+1}(x)]$
2) $f_{m}(x)\neq 0$ for $-\infty <x<\infty$
and we define $V(x)$ as the number of changes of sign in the sequence $f_{1}(x),f_{2}(x),\dots ,f_{m}(x)$ for a fixed value of $x$, then:
    $\Delta =I_{-\infty }^{+\infty }{\frac {f_{2}(x)}{f_{1}(x)}}=V(-\infty )-V(+\infty )\quad (28)$
A sequence satisfying these requirements is obtained using the Euclidean algorithm, which is as follows:
Starting with $f_{1}(x)$ and $f_{2}(x)$, and denoting the remainder of $f_{1}(x)/f_{2}(x)$ by $f_{3}(x)$ and similarly denoting the remainder of $f_{2}(x)/f_{3}(x)$ by $f_{4}(x)$, and so on, we obtain the relationships:
    ${\begin{aligned}&f_{1}(x)=q_{1}(x)f_{2}(x)-f_{3}(x)\quad (29)\\&f_{2}(x)=q_{2}(x)f_{3}(x)-f_{4}(x)\\&\ldots \\&f_{m-1}(x)=q_{m-1}(x)f_{m}(x)\\\end{aligned}}$
or in general
    $f_{k-1}(x)=q_{k-1}(x)f_{k}(x)-f_{k+1}(x)$
where the last non-zero remainder, $f_{m}(x)$ will therefore be the highest common factor of $f_{1}(x),f_{2}(x),\dots ,f_{m-1}(x)$. It can be observed that the sequence so constructed will satisfy the conditions of Sturm's theorem, and thus an algorithm for determining the stated index has been developed.
It is in applying Sturm's theorem (28) to (29), through the use of the Euclidean algorithm above that the Routh matrix is formed.
We get
    $f_{3}(\omega )={\frac {a_{0}}{b_{0}}}f_{2}(\omega )-f_{1}(\omega )\quad (30)$
and identifying the coefficients of this remainder by $c_{0}$, $-c_{1}$, $c_{2}$, $-c_{3}$, and so forth, makes our formed remainder
    $f_{3}(\omega )=c_{0}\omega ^{n-2}-c_{1}\omega ^{n-4}+c_{2}\omega ^{n-6}-\cdots \quad (31)$
where
    $c_{0}=a_{1}-{\frac {a_{0}}{b_{0}}}b_{1}={\frac {b_{0}a_{1}-a_{0}b_{1}}{b_{0}}};c_{1}=a_{2}-{\frac {a_{0}}{b_{0}}}b_{2}={\frac {b_{0}a_{2}-a_{0}b_{2}}{b_{0}}};\ldots \quad (32)$
Continuing with the Euclidean algorithm on these new coefficients gives us
    $f_{4}(\omega )={\frac {b_{0}}{c_{0}}}f_{3}(\omega )-f_{2}(\omega )\quad (33)$
where we again denote the coefficients of the remainder $f_{4}(\omega )$ by $d_{0}$, $-d_{1}$, $d_{2}$, $-d_{3}$, making our formed remainder
    $f_{4}(\omega )=d_{0}\omega ^{n-3}-d_{1}\omega ^{n-5}+d_{2}\omega ^{n-7}-\cdots \quad (34)$
and giving us
    $d_{0}=b_{1}-{\frac {b_{0}}{c_{0}}}c_{1}={\frac {c_{0}b_{1}-b_{0}c_{1}}{c_{0}}};d_{1}=b_{2}-{\frac {b_{0}}{c_{0}}}c_{2}={\frac {c_{0}b_{2}-b_{0}c_{2}}{c_{0}}};\ldots \quad (35)$
The rows of the Routh array are determined exactly by this algorithm when applied to the coefficients of (20). An observation worthy of note is that in the regular case the polynomials $f_{1}(\omega )$ and $f_{2}(\omega )$ have as the highest common factor $f_{n+1}(\omega )$ and thus there will be $n$ polynomials in the chain $f_{1}(x),f_{2}(x),\dots ,f_{m}(x)$.
Note now, that in determining the signs of the members of the sequence of polynomials $f_{1}(x),f_{2}(x),\dots ,f_{m}(x)$ that at $\omega =\pm \infty$ the dominating power of $\omega$ will be the first term of each of these polynomials, and thus only these coefficients corresponding to the highest powers of $\omega$ in $f_{1}(x),f_{2}(x),\dots$, and $f_{m}(x)$, which are $a_{0}$, $b_{0}$, $c_{0}$, $d_{0}$, ... determine the signs of $f_{1}(x)$, $f_{2}(x)$, ..., $f_{m}(x)$ at $\omega =\pm \infty$.
So we get $V(+\infty )=V(a_{0},b_{0},c_{0},d_{0},\dots )$ that is, $V(+\infty )$ is the number of changes of sign in the sequence $a_{0}\infty ^{n}$, $b_{0}\infty ^{n-1}$, $c_{0}\infty ^{n-2}$, ... which is the number of sign changes in the sequence $a_{0}$, $b_{0}$, $c_{0}$, $d_{0}$, ... and $V(-\infty )=V(a_{0},-b_{0},c_{0},-d_{0},...)$; that is $V(-\infty )$ is the number of changes of sign in the sequence $a_{0}(-\infty )^{n}$, $b_{0}(-\infty )^{n-1}$, $c_{0}(-\infty )^{n-2}$, ... which is the number of sign changes in the sequence $a_{0}$, $-b_{0}$, $c_{0}$, $-d_{0}$, ...
Since our chain $a_{0}$, $b_{0}$, $c_{0}$, $d_{0}$, ... will have $n$ members it is clear that $V(+\infty )+V(-\infty )=n$ since within $V(a_{0},b_{0},c_{0},d_{0},\dots )$ if going from $a_{0}$ to $b_{0}$ a sign change has not occurred, within $V(a_{0},-b_{0},c_{0},-d_{0},\dots )$ going from $a_{0}$ to $-b_{0}$ one has, and likewise for all $n$ transitions (there will be no terms equal to zero) giving us $n$ total sign changes.
As $\Delta =V(-\infty )-V(+\infty )$ and $n=V(+\infty )+V(-\infty )$, and from (18) $P=(n-\Delta /2)$, we have that $P=V(+\infty )=V(a_{0},b_{0},c_{0},d_{0},\dots )$ and have derived Routh's theorem -
The number of roots of a real polynomial $f(z)$ which lie in the right half plane ${\mathfrak {Re}}(r_{i})>0$ is equal to the number of changes of sign in the first column of the Routh scheme.
And for the stable case where $P=0$ then $V(a_{0},b_{0},c_{0},d_{0},\dots )=0$ by which we have Routh's famous criterion:
In order for all the roots of the polynomial $f(z)$ to have negative real parts, it is necessary and sufficient that all of the elements in the first column of the Routh scheme be different from zero and of the same sign.