Characteristic Polynomial of a Differential Equation

by Justin Skycak on

Given a linear differential equation with constant coefficients and a right hand side of zero, the roots of the characteristic polynomial correspond to solutions of the equation.

This post is a chapter in the book Justin Math: Calculus. Suggested citation: Skycak, J. (2019). Characteristic Polynomial of a Differential Equation. Justin Math: Calculus. https://justinmath.com/characteristic-polynomial-of-a-differential-equation/


In this chapter, we learn a technique for solving differential equations of the form

$\begin{align*} a_ny^{(n)} + a_{n-1}y^{(n-1)} + \cdots + a_2 y'' + a_1 y' + a_0 y = 0 \end{align*}$


where $a_n, a_{n-1}, \ldots, a_2, a_1, a_0$ are constant coefficients, and $y^{(n)}$ denotes the $\text{n}^\text{th}$ derivative of $y$.

The characteristic polynomial of the differential equation above is given by

$\begin{align*} a_nr^n + a_{n-1}r^{n-1} + \cdots + a_2r^2 + a_1 r + a_0. \end{align*}$


Each root of the characteristic polynomial corresponds to a solution $(C_{r,1}+C_{r,2}x+C_{r,3}x^2+\ldots+C_{r,m}x^{m-1})e^{rx}$ of the original equation, where $m$ is the multiplicity of the root and $C_{r,1}, C_{r,2}, C_{r,3}, \ldots, C_{r,m}$ are unknown constants of integration.

The constants of integration are labeled intricately, each with two subscripts, so that we can stay organized, in case we have to deal with multiple roots.

Demonstration

For example, the differential equation $y’^\prime-3y’+2y=0$ has the characteristic polynomial $r^2-3r+2$, which factors to $(r-2)(r-1)$ and has roots $r=1,2$.

The root $r=1$ has multiplicity $1$, which corresponds to a solution $C_{1,1} e^{1x}$ or more simply $C_{1,1} e^x$.

The root $r=2$ also has multiplicity $1$, which corresponds to a solution of $C_{2,1}e^{2x}$.

The full solution of the equation, then, is $y=C_{1,1}e^x + C_{2,1}e^{2x}$.

Another Demonstration

Next, consider the differential equation $y’^\prime-6y’+9y=0$.

This differential equation has the characteristic polynomial $r^2-6r+9$, which factors to $(r-3)^2$ and has a single root $r=3$ with multiplicity $2$.

The solution of the equation, then, is $y=(C_{3,1}+C_{3,2}x)e^{3x}$.

Case of Imaginary Roots

Sometimes, the characteristic polynomial of a differential equation may have imaginary roots.

For example, the differential equation $y’^\prime+4y=0$ has the characteristic polynomial $r^2+4$, which has roots $r=2i,-2i$. In these cases, we apply the same procedure as before, but we take it a step further. We use Euler’s formula

$\begin{align*} e^{i\theta} = \cos \theta + i\sin \theta \end{align*}$


to evaluate any exponentials with imaginary powers, and then we remove any $i$’s from the solution. We can remove the $i$’s because in general, if $f(x)i$ is a solution, then so is $f(x)$. This is true because the $i$ can be factored out:

$\begin{align*} a_n( f(x) i) ^{(n)} + a_{n-1} (f(x)i)^{(n-1)} + \cdots + a_2 (f(x)i)'' + a_1 (f(x)i)' + a_0 f(x)i &= 0 \\ a_nf^{(n)}(x)i + a_{n-1} f^{(n-1)}(x)i + \cdots + a_2 f''(x)i + a_1f'(x)i + a_0 f(x)i &= 0 \\ \left[ a_nf^{(n)}(x) + a_{n-1} f^{(n-1)}(x) + \cdots + a_2 f''(x) + a_1f'(x) + a_0 f(x) \right]i &= 0 \\ a_nf^{(n)}(x) + a_{n-1} f^{(n-1)}(x) + \cdots + a_2 f''(x) + a_1f'(x) + a_0 f(x) &= 0 \end{align*}$


Continuing the example, the root $r=2i$ corresponds to a solution $C_{2i,1}e^{2ix}$, which simplifies to $C_{2i,1}(\cos 2x + i\sin 2x)$. Removing the $i$ from this solution yields $C_{2i,1}(\cos 2i + \sin 2x)$.

By the same reasoning, the root $r=-2i$ corresponds to a solution $C_{-2i,1}( \cos(-2x) + \sin(-2x) )$. Since $\cos(-\theta)=\cos \theta)$ and $\sin(-\theta)=-\sin \theta$ for all inputs $\theta$, this solution simplifies further to $C_{-2i,1}(\cos 2x - \sin 2x)$.

The full solution, then, is

$\begin{align*} y=C_{2i,1}(\cos 2x + \sin 2x)+C_{-2i,1}(\cos 2x - \sin 2x) \end{align*}$


which simplifies to

$\begin{align*} y=(C_{2i,1}+C_{-2i,1}) \cos 2x + (C_{2i,1}-C_{-2i,1}) \sin 2x. \end{align*}$


It is redundant to use four constants in this solution, though, since $C_{2i,1}+C_{-2i,1}$ represents a single constant and $C_{2i,1}-C_{-2i,1}$ represents another single constant.

For example, if $C_{2i,1}=1$ and $C_{-2i,1}=2$, then the solution is just $3 \cos 2x - \sin 2x$. We can make $C_{2i,1}+C_{-2i,1}$ and $C_{2i,1}-C_{-2i,1}$ come out to anything we want, by choosing $C_{2i,1}$ and $C_{-2i,1}$ accordingly.

Therefore, to avoid redundancy in the full solution, we replace the expression $C_{2i,1}+C_{-2i,1}$ with a single constant $C_1$, and the expression $C_{2i,1}-C_{-2i,1}$ with a single constant $C_2$.

$\begin{align*} y=C_1 \cos 2x + C_2 \sin 2x \end{align*}$


Case of Complex Roots

When the characteristic polynomial has complex roots, the solutions will contain exponentials and trig functions.

For example, the differential equation $y’^\prime-4y’+12y=0$ has characteristic polynomial $r^2-4r+13$, whose roots are given by the quadratic equation.

$\begin{align*} r &= \frac{4 \pm \sqrt{-36}}{2} \\ &= \frac{4 \pm 6i}{2} \\ &= 2 \pm 3i \end{align*}$


The root $r=2+3i$ corresponds to the following solution:

$\begin{align*} C_{2+3i,1} e^{(2+3i)x} &= C_{2+3i,1} e^{2x} e^{3ix} \\ &= C_{2+3i,1} e^{2x} \left( \cos 3x + i\sin 3x \right) \\ & \to C_{2+3i,1} e^{2x} \left( \cos 3x + \sin 3x \right) \hspace{.5cm} \mbox{(remove i)} \end{align*}$


Likewise, the root $r=2-3i$ corresponds to the following solution:

$\begin{align*} C_{2-3i,1} e^{(2-3i)x} &= C_{2-3i,1} e^{2x} e^{-3ix} \\ &= C_{2-3i,1} e^{2x} \left( \cos (-3x) + i\sin (-3x) \right) \\ &= C_{2-3i,1} e^{2x} \left( \cos 3x - i\sin 3x \right) \\ & \to C_{2-3i,1} e^{2x} \left( \cos 3x - \sin 3x \right) \hspace{.5cm} \mbox{(remove i)} \end{align*}$


Assigning new constants $C_1 = C_{2+3i,1}+C_{2-3i,1}$ and $C_2 = C_{2+3i,1} - C_{2-3i,1}$, the full solution becomes the following:

$\begin{align*} &C_{2+3i,1} e^{2x} ( \cos 3x + \sin 3x ) + C_{2-3i,1} e^{2x} (\cos 3x - \sin 3x ) \\ &= e^{2x} \left( (C_{2+3i,1}+C_{2-3i,1}) \cos 3x + (C_{2+3i,1}-C_{2-3i,1}) \sin 3x \right) \\ &= e^{2x} \left( C_1 \cos 3x + C_2 \sin 3x \right) \end{align*}$


Repeated Imaginary Roots

Repeated imaginary and complex roots are treated just like we treated repeated real roots.

For example, the equation $y^{(6)}+3y^{(4)}+3y^{(2)}+1=0$ has characteristic polynomial $r^6+3r^4+3r^2+1$, which factors to $(r^2+1)^3$, and thus has roots $r=\pm i$, each with multiplicity $3$. The solution to this differential equation is then

$\begin{align*} (C_{i,1}+C_{i,2}x+C_{i,3}x^2)e^{ix} + (C_{-i,1}+C_{-i,2}x+C_{-i,3}x^2)e^{-ix}. \end{align*}$


After removing the $i$ and grouping the constants, the solution simplifies to

$\begin{align*} (C_1+C_2x+C_3x^2) \cos x + (C_4+C_5x+ C_6 x^2) \sin x. \end{align*}$


Derivation of the Characteristic Polynomial

Lastly, let’s gain a better understanding of why the characteristic polynomial method works. The characteristic polynomial really just comes from guessing a solution $y=Ce^{rx}$. The derivatives for this guess are listed below.

$\begin{align*} y &= Ce^{rx} \\ y' &= Cre^{rx} \\ y'' &= Cr^2e^{rx} \\ &\vdots \\ y^{(n)} &= Cr^ne^{rx} \end{align*}$


We substitute the derivatives in the differential equation, and simplify.

$\begin{align*} 0&= a_ny^{(n)} + \cdots + a_2 y'' + a_1 y' + a_0 y \\ 0&=a_nCr^ne^{rx} + \cdots + a_2 Cr^2e^{rx} + a_1 Cr e^{rx} + a_0 e^{rx} \\ 0&= Ce^{rx} \left( a_nr^n + \cdots + a_2r^2 + a_1r + a_0 \right) \\ 0&=a_nr^n + \cdots + a_2r^2 + a_1r + a_0 \end{align*}$


We see that $y=Ce^{rx}$ is a solution whenever $r$ is a root of the characteristic polynomial.

Exercises

Use the characteristic polynomial to solve the following differential equations. (You can view the solution by clicking on the problem.)

$\begin{align*} 1) \hspace{.5cm} y''+y'-12y=0 \end{align*}$
Solution:
$\begin{align*} y=C_1 e^{-4x} + C_2 e^{3x} \end{align*}$

$\begin{align*} 2) \hspace{.5cm} 2y''+16y'+3-y=0 \end{align*}$
Solution:
$\begin{align*} y= C_1 e^{-5x} + C_2 e^{-3x} \end{align*}$

$\begin{align*} 3) \hspace{.5cm} y''+16y=0 \end{align*}$
Solution:
$\begin{align*} y= C_1 \cos 4x + C_2 \sin 4x \end{align*}$

$\begin{align*} 4) \hspace{.5cm} y'''-y''+2y'-2y=0 \end{align*}$
Solution:
$\begin{align*} y= C_1 e^x + C_2 \cos \left( \sqrt{2} x \right) + C_3 \sin \left( \sqrt{2} x \right) \end{align*}$

$\begin{align*} 5) \hspace{.5cm} y''-4y'+5y=0 \end{align*}$
Solution:
$\begin{align*} y= \left( C_1 \cos x + C_2 \sin x \right) e^{2x} \end{align*}$

$\begin{align*} 6) \hspace{.5cm} y''+2y'+17y=0 \end{align*}$
Solution:
$\begin{align*} y= \left( C_1 \cos 4x + C_2 \sin 4x \right) e^{-x} \end{align*}$

$\begin{align*} 7) \hspace{.5cm} y''-4y'+4y=0 \end{align*}$
Solution:
$\begin{align*} y= \left( C_1 + C_2 x \right) e^{2x} \end{align*}$

$\begin{align*} 8) \hspace{.5cm} y^{(6)}-y^{(4)}=0 \end{align*}$
Solution:
$\begin{align*} y= C_1 + C_2 x + C_3x^2 + C_4x^3 + C_5 e^x + C_6 e^{-x} \end{align*}$

$\begin{align*} 9) \hspace{.5cm} y^{(5)}+y^{(3)}=0 \end{align*}$
Solution:
$\begin{align*} y= C_1 + C_2 x + C_3 x^2 + C_4 \cos x + C_5 \sin x \end{align*}$

$\begin{align*} 10) \hspace{.5cm} y^{(5)}+y^{(4)}-2y^{(3)}=0 \end{align*}$
Solution:
$\begin{align*} y= C_1 + C_2 x + C_3 x^2 + C_4 e^x + C_5 e^{-2x} \end{align*}$


This post is a chapter in the book Justin Math: Calculus. Suggested citation: Skycak, J. (2019). Characteristic Polynomial of a Differential Equation. Justin Math: Calculus. https://justinmath.com/characteristic-polynomial-of-a-differential-equation/