Homogeneous Linear Differential Equations with Constant Coefficients

When the coefficients are constants, solving a homogeneous linear differential equation reduces entirely to algebra. Substituting the trial solution y = e r x converts the equation into a polynomial equation in r , the characteristic equation, and each root of that polynomial contributes one member of the fundamental set.

Quick Reference

Root of the characteristic equation Contribution to the fundamental set
Real, simple root r e r x
Real root r of multiplicity k e r x ,   x e r x ,   x 2 e r x ,   ,   x k 1 e r x
Complex pair α ± i β , simple e α x cos β x ,   e α x sin β x
Complex pair α ± i β of multiplicity k x j e α x cos β x and x j e α x sin β x for j = 0 , , k 1
Root r = 0 , simple 1 (the constant function)
Root r = 0 of multiplicity k 1 ,   x ,   x 2 ,   ,   x k 1

Second-order case. For ay'' + by' + cy = 0, the characteristic equation is a r 2 + b r + c = 0 with discriminant Δ = b 2 4 a c :

Δ Roots General solution
Δ > 0 Real and distinct r 1 , r 2 y = c 1 e r 1 x + c 2 e r 2 x
Δ = 0 Real and equal, r 1 = b 2 a y = c 1 e r 1 x + c 2 x e r 1 x
Δ < 0 Complex α ± i β y = e α x ( c 1 cos β x + c 2 sin β x )

Second-Order Differential Equations

Consider

L[y] = ay'' + by' + cy = 0 , \tag{i}

where a 0 , b , and c are constants.

Why we try exponential functions. Since multiples of y''(x), y'(x), and y ( x ) must cancel each other in (i), they have to be of the "same type". For example, y = x 5 can never be a solution, because this function, its first derivative 5 x 4 , and its second derivative 20 x 3 are polynomials of different degrees, so no fixed multiples of them can cancel. On the other hand, the function y ( x ) = e r x and its derivatives are all multiples of one another.



Notice also that if y ( x ) is a solution of a homogeneous linear equation, so is A y ( x ) for any constant A . So instead of y ( x ) = A e r x we may drop the coefficient and simply consider y ( x ) = e r x .

To solve, try y = e r x in (i):

\begin{aligned} a\left(e^{rx}\right)'' + b\left(e^{rx}\right)' + ce^{rx} &= 0 \\ ar^{2}e^{rx} + bre^{rx} + ce^{rx} &= 0 \\ \left[ar^{2} + br + c\right]e^{rx} &= 0 \end{aligned}

Since e r x 0 for every x , the bracket must vanish. So y = e r x is a solution of (i) if and only if

ar^{2} + br + c = 0 . \tag{ii}

Equation (ii) is called the characteristic equation, or auxiliary equation, of (i).

Its solutions are

r 1 = b + b 2 4 a c 2 a , r 2 = b b 2 4 a c 2 a .

The number

Δ = b 2 4 a c

is called the discriminant of the quadratic. Its algebraic sign determines the nature of the roots, and hence the form of the general solution.

Case 1: Δ > 0 , Roots Real and Distinct

The two linearly independent solutions are

y 1 ( x ) = e r 1 x , y 2 ( x ) = e r 2 x

and the general solution of (i) is

y = c 1 e r 1 x + c 2 e r 2 x .

Independence follows from the result of Section 3.2 that { e a x , e b x } is independent whenever a b .

Case 2: Δ = 0 , Roots Real and Equal

Here r 1 = r 2 = b 2 a . The trial exponential supplies only one solution, so a second must be found. It is

y 1 ( x ) = e r 1 x , y 2 ( x ) = x e r 1 x

and the general solution of (i) is

y = c 1 e r 1 x + c 2 x e r 1 x .
Three explanations for the factor of x

Method 1: differentiate with respect to r . One solution is certainly y = e r 1 x . Now consider

L\left[e^{rx}\right] = a\left(e^{rx}\right)'' + b\left(e^{rx}\right)' + ce^{rx} = \left(ar^{2} + br + c\right)e^{rx} .

Differentiate both sides with respect to r , noting that L and / r commute since they act on different variables:

r L [ e r x ] = L [ r e r x ] = L [ x e r x ] = ( 2 a r + b ) e r x + x ( a r 2 + b r + c ) e r x .

Because r 1 is a double root, both a r 2 + b r + c and its derivative 2 a r + b vanish at r = r 1 . Therefore L [ x e r 1 x ] = 0 , so y = x e r 1 x is a solution.

Method 2: reduction of order. One solution is y 1 = e r 1 x . Obtain the second by setting y 2 ( x ) = v ( x ) e r 1 x and using the formula of Section 4.1. In standard form P = b / a , so

\begin{aligned} v &= \int\frac{1}{y_1^{2}}e^{-\int P\,dx}\,dx \\ &= \int\frac{1}{e^{2r_1x}}e^{-bx/a}\,dx \\ &= \int e^{-\left(b/a + 2r_1\right)x}\,dx \end{aligned}

Since r 1 = b 2 a , we have 2 r 1 = b a , so the exponent ( b / a + 2 r 1 ) x is identically zero. Therefore

v = e 0 d x = d x = x

and y 2 = x y 1 = x e r 1 x .

Method 3: a limiting argument. Imagine a limiting procedure in which r 2 approaches r 1 . By superposition, any multiple of the difference of e r 2 x and e r 1 x is a solution, in particular

e r 2 x e r 1 x r 2 r 1 .

As r 2 r 1 this quotient is exactly a difference quotient in the variable r , so it becomes

d d r e r x | r = r 1 = x e r 1 x .

This means y ( x ) = x e r 1 x is the second solution.

Case 3: Δ < 0 , Roots Complex Conjugates

Here r 1 = α + i β and r 2 = α i β , with α = b 2 a and β = 4 a c b 2 2 a . Two linearly independent real solutions are

y 1 ( x ) = e α x cos β x , y 2 ( x ) = e α x sin β x

and the general solution of (i) is

y = e α x ( c 1 cos β x + c 2 sin β x )

where c 1 and c 2 are two real constants.

Why the real form works

In this case

y 1 ( x ) = e ( α + i β ) x , y 2 ( x ) = e ( α i β ) x

are two linearly independent solutions, and the general solution of (i) is

\begin{aligned} y &= Ae^{(\alpha+i\beta)x} + Be^{(\alpha-i\beta)x} \\ &= e^{\alpha x}\left(Ae^{i\beta x} + Be^{-i\beta x}\right) \end{aligned}

where A and B are constants. Since e i β x and e i β x are complex-valued and we seek a real solution, A and B must themselves be complex.

By Euler's formula, e i β x = cos β x + i sin β x and e i β x = cos β x i sin β x , so

y = e α x [ ( A + B ) cos β x + i ( A B ) sin β x ] .

Putting A = 1 2 ( c 1 i c 2 ) and B = 1 2 ( c 1 + i c 2 ) , we get A + B = c 1 and i ( A B ) = i ( i c 2 ) = c 2 , so the general solution becomes

y = e α x [ c 1 cos β x + c 2 sin β x ] ,

now with real constants c 1 and c 2 . Note that A and B are complex conjugates of each other, which is exactly the condition making the combination real.

Physically, α controls the envelope and β controls the oscillation. Negative α gives a decaying oscillation (an underdamped system), α = 0 gives pure undamped oscillation, and positive α gives growing oscillation.

Second-Order Examples

Find the general solution of y'' - 3y' + 2y = 0.

Solution

The characteristic equation is

r 2 3 r + 2 = ( r 1 ) ( r 2 ) = 0 .

Its roots are r 1 = 1 and r 2 = 2 , real and distinct. Therefore the general solution is

y = c 1 e x + c 2 e 2 x .

Find the general solution of y'' - 6y' + 25y = 0.

Solution

The characteristic equation is

r 2 6 r + 25 = 0 .

The roots are

r 1 , 2 = 6 ± 6 2 4 × 1 × 25 2 = 6 ± 64 2 = 6 ± 8 i 2 = 3 ± 4 i .

So α = 3 and β = 4 , and the general solution is

y = e 3 x ( c 1 cos 4 x + c 2 sin 4 x ) .

Notice that the answer can also be written in complex form as

y = A e ( 3 + 4 i ) x + B e ( 3 4 i ) x = e 3 x ( A e 4 i x + B e 4 i x ) ,

which is the same family of functions expressed in a different basis.

Find the general solution of 4y'' - 4y' + y = 0.

Solution

The characteristic equation is

4 r 2 4 r + 1 = 0 .

The discriminant is 16 16 = 0 , so

r 1 , 2 = 4 ± 4 2 4 × 4 × 1 2 × 4 = 4 8 = 1 2 .

Since the characteristic equation has a double root, the general solution is

y = c 1 e x / 2 + c 2 x e x / 2 .

Note that 4 r 2 4 r + 1 = ( 2 r 1 ) 2 , which shows the double root at a glance.

Higher Order Differential Equations

Consider the differential equation

L[y] = a_ny^{(n)} + a_{n-1}y^{(n-1)} + \cdots + a_1y' + a_0y = 0 \tag{a}

where a n , , a 0 are real constants with a n 0 . To find the solutions, we form the characteristic equation of (a):

a n r n + a n 1 r n 1 + + a 1 r + a 0 = 0 .

How to obtain the characteristic equation. Replace d k y d x k by r k , with the convention that d 0 y d x 0 y is replaced by r 0 = 1 . So y''' becomes r 3 , y'' becomes r 2 , and the term a 0 y becomes the constant a 0 .

Explanation

We seek solutions of the form y ( x ) = e r x . Substituting into the equation gives

L [ e r x ] = p ( r ) e r x = 0

where

p ( r ) = a n r n + a n 1 r n 1 + + a 1 r + a 0 .

Since e r x 0 , it follows that y = e r x is a solution if and only if

p ( r ) = 0 .

It follows from the Fundamental Theorem of Algebra that the characteristic equation, a polynomial of degree n , has exactly n roots, counting complex roots and multiplicity. Since we need exactly n independent solutions, the counts match perfectly, provided each root of multiplicity k is made to contribute k solutions.

Distinct Roots

If the characteristic equation has n distinct solutions r 1 r 2 r n , then the n linearly independent solutions are

y 1 = e r 1 x , y 2 = e r 2 x , , y n = e r n x .

Repeated Roots

If r 1 = r 2 , then we have only n 1 linearly independent solutions and need another. The extra solution is x e r 1 x .

If three roots are equal, r 1 = r 2 = r 3 , then the three solutions from that root are

e r 1 x , x e r 1 x , x 2 e r 1 x ,

and so on.

Explanation

As before,

L [ e r x ] = p ( r ) e r x .

Differentiating with respect to r ,

\frac{\partial}{\partial r}L\left[e^{rx}\right] = L\left[xe^{rx}\right] = p'(r)e^{rx} + xp(r)e^{rx} .

Because r = r 1 is a double root of p ( r ) , we have p(r_1) = p'(r_1) = 0. So L [ x e r 1 x ] = 0 and the additional solution is y = x e r 1 x .

If r 1 = r 2 = r 3 , differentiate L [ e r x ] twice with respect to r :

\frac{\partial^{2}}{\partial r^{2}}L\left[e^{rx}\right] = L\left[x^{2}e^{rx}\right] = p''(r)e^{rx} + 2p'(r)xe^{rx} + p(r)x^{2}e^{rx} .

Here p(r_1) = p'(r_1) = p''(r_1) = 0 because r 1 is a triple root, so L [ x 2 e r 1 x ] = 0 , and the three solutions from this root are

y 1 = e r 1 x , y 2 = x e r 1 x , y 3 = x 2 e r 1 x .

The pattern is now clear: a root of multiplicity k makes p and its first k 1 derivatives vanish, which is exactly what is needed for x j e r 1 x to solve the equation for j = 0 , 1 , , k 1 .

The most general case. If the characteristic equation has k distinct roots r 1 , r 2 , , r k repeated n 1 , n 2 , , n k times respectively, with n 1 + n 2 + + n k = n , then the solutions are

\begin{aligned} &e^{r_1x},\ xe^{r_1x},\ \dots,\ x^{n_1-1}e^{r_1x}, \\ &e^{r_2x},\ xe^{r_2x},\ \dots,\ x^{n_2-1}e^{r_2x}, \\ &\qquad\qquad \vdots \\ &e^{r_kx},\ xe^{r_kx},\ \dots,\ x^{n_k-1}e^{r_kx} \end{aligned}

Complex Roots

When all the coefficients a n , , a 0 are real, if one root is complex, say α + i β , then its complex conjugate α i β is also a root. Complex roots of a real polynomial always come in conjugate pairs. Using the same argument as in the second-order case, the two corresponding real solutions can be written as

e α x cos β x , e α x sin β x .

If α + i β is a k -fold root of the characteristic equation, its conjugate is also a k -fold root, and the corresponding solutions are

\begin{aligned} &e^{\alpha x}\cos\beta x,\ xe^{\alpha x}\cos\beta x,\ \dots,\ x^{k-1}e^{\alpha x}\cos\beta x \\ &e^{\alpha x}\sin\beta x,\ xe^{\alpha x}\sin\beta x,\ \dots,\ x^{k-1}e^{\alpha x}\sin\beta x \end{aligned}

There is nothing wrong with working directly with e ( α + i β ) x and e ( α i β ) x , and with x e ( α + i β ) x and so on for repeated roots. But we usually prefer real-valued functions and coefficients, which is why the solutions are written using sines and cosines.

Higher Order Examples

Find the general solution of

2 d 3 y d t 3 4 d 2 y d t 2 + 7 d y d t 5 y = 0 .
Solution

The characteristic equation is

p ( r ) = 2 r 3 4 r 2 + 7 r 5 = 0 .

By simple inspection, p ( 1 ) = 2 4 + 7 5 = 0 , so r 1 = 1 is a root. Dividing p ( r ) by r 1 , for example by long division, gives

2 r 3 4 r 2 + 7 r 5 = ( r 1 ) ( 2 r 2 2 r + 5 ) .

The quotient is quadratic, and its roots are easily determined:

2 r 2 2 r + 5 = 0 r 2 , 3 = 2 ± 4 40 4 = 2 ± 6 i 4 = 1 2 ± i 3 2 .

Therefore the three linearly independent solutions are

y 1 = e t , y 2 = e t / 2 cos 3 t 2 , y 3 = e t / 2 sin 3 t 2

and the general solution is

y = c 1 e t + c 2 e t / 2 cos 3 t 2 + c 3 e t / 2 sin 3 t 2 .

Tip for finding the first root. By the rational root theorem, any rational root of 2 r 3 4 r 2 + 7 r 5 has the form ± p / q with p dividing 5 and q dividing 2 . That leaves only ± 1 , ± 5 , ± 1 2 , ± 5 2 to test, and r = 1 works first.

Solve the equation y^{(6)} + y^{(5)} - 3y^{(4)} - 5y''' - 2y'' = 0.

Solution

The characteristic equation is

r 6 + r 5 3 r 4 5 r 3 2 r 2 = 0 ,

which factors as

r 2 ( r + 1 ) 3 ( r 2 ) = 0 .

The solutions corresponding to r = 0 , a double root, are

y 1 = 1 , y 2 = x .

Here e 0 x = 1 and x e 0 x = x , so a repeated zero root produces the powers of x directly.

The solutions corresponding to r = 1 , a triple root, are

y 3 = e x , y 4 = x e x , y 5 = x 2 e x .

The solution corresponding to r = 2 is

y 6 = e 2 x .

The six functions y 1 , , y 6 are linearly independent, and the general solution is

y = c 1 + c 2 x + ( c 3 + c 4 x + c 5 x 2 ) e x + c 6 e 2 x .

Note that the multiplicities 2 + 3 + 1 = 6 match the order of the equation, which is a useful check that no solution has been missed.

Exercises

Solve y'' + 4y' + 4y = 0 with y ( 0 ) = 1 , y'(0) = 0.

Solution

The characteristic equation is r 2 + 4 r + 4 = ( r + 2 ) 2 = 0 , with the double root r = 2 . The general solution is

y = c 1 e 2 x + c 2 x e 2 x .

Then y' = -2c_1e^{-2x} + c_2\left(1 - 2x\right)e^{-2x}. Applying the conditions at x = 0 :

y(0) = c_1 = 1, \qquad y'(0) = -2c_1 + c_2 = 0 \ \Longrightarrow\ c_2 = 2 .

So y = e 2 x ( 1 + 2 x ) . This is the critically damped case: the solution returns to zero without oscillating.

Solve y'' + 9y = 0 with y ( 0 ) = 2 , y'(0) = -3.

Solution

The characteristic equation r 2 + 9 = 0 gives r = ± 3 i , so α = 0 and β = 3 :

y = c 1 cos 3 x + c 2 sin 3 x .

Then y' = -3c_1\sin 3x + 3c_2\cos 3x, so y ( 0 ) = c 1 = 2 and y'(0) = 3c_2 = -3, giving c 2 = 1 .

y = 2 cos 3 x sin 3 x .

Find the general solution of y ( 4 ) 16 y = 0 .

Solution

The characteristic equation factors as

r 4 16 = ( r 2 4 ) ( r 2 + 4 ) = ( r 2 ) ( r + 2 ) ( r 2 + 4 ) = 0 ,

giving roots r = 2 , r = 2 , and r = ± 2 i . Therefore

y = c 1 e 2 x + c 2 e 2 x + c 3 cos 2 x + c 4 sin 2 x .

Write down the general solution of an equation whose characteristic equation is ( r 3 ) 2 ( r 2 + 2 r + 5 ) 2 = 0 .

Solution

The factor ( r 3 ) 2 gives the double real root r = 3 , contributing e 3 x and x e 3 x .

For the second factor, r 2 + 2 r + 5 = 0 gives r = 2 ± 4 20 2 = 1 ± 2 i , and the exponent 2 makes this a double complex pair, contributing

e x cos 2 x , e x sin 2 x , x e x cos 2 x , x e x sin 2 x .

The general solution is

y = ( c 1 + c 2 x ) e 3 x + ( c 3 + c 4 x ) e x cos 2 x + ( c 5 + c 6 x ) e x sin 2 x ,

with six constants, matching the degree 6 of the characteristic polynomial.

Frequently Asked Questions

What is the characteristic equation?

It is the polynomial equation obtained by substituting y = e r x into a constant-coefficient homogeneous linear equation and cancelling the exponential. Replace each y ( k ) by r k and y itself by 1 . Its roots determine the entire fundamental set.


Why does a repeated root need a factor of x ?

Because a double root supplies only one exponential, leaving the fundamental set one member short. Three independent arguments give x e r 1 x as the missing solution: differentiating L [ e r x ] = p ( r ) e r x with respect to r , applying reduction of order, and taking the limit of e r 2 x e r 1 x r 2 r 1 as r 2 r 1 .


Can I leave the answer in complex exponential form?

Yes, and for some purposes it is preferable. The forms A e ( α + i β ) x + B e ( α i β ) x and e α x ( c 1 cos β x + c 2 sin β x ) describe the same solution space. Real form is usually preferred because physical quantities are real, and because the constants are then real too. Note that in the complex form, A and B must be complex conjugates for the solution to be real.


What if the characteristic polynomial does not factor easily?

Start with the rational root theorem, testing ± p / q where p divides the constant term and q divides the leading coefficient. Once one root is found, divide it out and work on the lower-degree quotient. For degree three or more with no rational roots, numerical root-finding is the practical answer.


What does a root r = 0 contribute?

The solution e 0 x = 1 , the constant function. If r = 0 is a k -fold root, the contributions are 1 , x , x 2 , , x k 1 , since x j e 0 x = x j . A zero root of multiplicity k means the equation involves no derivative lower than the k th, so integrating k times explains the polynomial directly.


How do I know I have found all the solutions?

Count. The characteristic polynomial has degree n , and by the Fundamental Theorem of Algebra it has exactly n roots with multiplicity. Each root of multiplicity k contributes exactly k solutions. If the number of terms in your general solution equals the order of the equation, and the solutions are independent, then by the theorem of Section 3.3 you have them all.