Skip to main content
Library homepage
 

Text Color

Text Size

 

Margin Size

 

Font Type

Enable Dyslexic Font
Mathematics LibreTexts

12.2: Second Order Linear Differential Equations

( \newcommand{\kernel}{\mathrm{null}\,}\)

Second order differential equations are typically harder than first order. In most cases students are only exposed to second order linear differential equations. A general form for a second order linear differential equation is given by

a(x)y(x)+b(x)y(x)+c(x)y(x)=f(x).

One can rewrite this equation using operator terminology. Namely, one first defines the differential operator L=a(x)D2+b(x)D+c(x), where D=ddx. Then equation (???) becomes

Ly=f.

The solutions of linear differential equations are found by making use of the linearity of L. Namely, we consider the vector space1 consisting of real-valued functions over some domain. Let f and g be vectors in this function space. L is a linear operator if for two vectors f and g and scalar a, we have

  1. L(f+g)=Lf+Lg
  2. L(af)=aLf.
Note

We assume that the reader has been introduced to concepts in linear algebra. Later in the text we will recall the definition of a vector space and see that linear algebra is in the background of the study of many concepts in the solution of differential equations.

One typically solves (???) by finding the general solution of the homogeneous problem,

Lyh=0

and a particular solution of the nonhomogeneous problem,

Lyp=f.

Then, the general solution of (???) is simply given as y=yh+yp. This is true because of the linearity of L. Namely,

Ly=L(yh+yp)=Lyh+Lyp=0+f=f.

There are methods for finding a particular solution of a nonhomogeneous differential equation. These methods range from pure guessing, the Method of Undetermined Coefficients, the Method of Variation of Parameters, or Green’s functions. We will review these methods later in the chapter.

Determining solutions to the homogeneous problem, Lyh=0, is not always easy. However, many now famous mathematicians and physicists have studied a variety of second order linear equations and they have saved us the trouble of finding solutions to the differential equations that often appear in applications. We will encounter many of these in the following chapters. We will first begin with some simple homogeneous linear differential equations.

Linearity is also useful in producing the general solution of a homogeneous linear differential equation. If y1 and y2 are solutions of the homogeneous equation, then the linear combination y=c1y1+c2y2 is also a solution of the homogeneous equation. In fact, if y1 and y2 are linearly independent,2 then y=c1y1+c2y2 is the general solution of the homogeneous problem.

Note

A set of functions {yi(x)}ni=1 is a linearly independent set if and only if

c1y1(x)++cnyn(x)=0

implies ci=0, for i=1,,n.

For n=2,c1y1(x)+c2y2(x)=0. If y1 and y2 are linearly dependent, then the coefficients are not zero and y2(x)=c1c2y1(x) and is a multiple of y1(x).

Linear independence can also be established by looking at the Wronskian of the solutions. For a second order differential equation the Wronskian is defined as

W(y1,y2)=y1(x)y2(x)y1(x)y2(x).

The solutions are linearly independent if the Wronskian is not zero.

Constant Coefficient Equations

The simplest second order differential equations are those with constant coefficients. The general form for a homogeneous constant coefficient second order linear differential equation is given as

ay(x)+by(x)+cy(x)=0,

where a,b, and c are constants.

Solutions to (???) are obtained by making a guess of y(x)=erx. Inserting this guess into (???) leads to the characteristic equation

ar2+br+c=0

Namely, we compute the derivatives of y(x)=erx, to get y(x)=rerx, and y(x)=r2erx. Inserting into (???), we have

0=ay(x)+by(x)+cy(x)=(ar2+br+c)erx.

Since the exponential is never zero, we find that ar2+br+c=0.

Note

The characteristic equation for ay+by+cy=0 is ar2+br+c=0. Solutions of this quadratic equation lead to solutions of the differential equation.

Two real, distinct roots, r1 and r2, give solutions of the form

y(x)=c1er1x+c2er2x.

The roots of this equation, r1,r2, in turn lead to three types of solutions depending upon the nature of the roots. In general, we have two linearly independent solutions, y1(x)=er1x and y2(x)=er2x, and the general solution is given by a linear combination of these solutions,

y(x)=c1er1x+c2er2x.

For two real distinct roots, we are done. However, when the roots are real, but equal, or complex conjugate roots, we need to do a little more work to obtain usable solutions.

Example 12.2.1

yy6y=0y(0)=2,y(0)=0.

Solution

The characteristic equation for this problem is r2r6=0. The roots of this equation are found as r=2,3. Therefore, the general solution can be quickly written down:

y(x)=c1e2x+c2e3x.

Note that there are two arbitrary constants in the general solution. Therefore, one needs two pieces of information to find a particular solution. Of course, we have the needed information in the form of the initial conditions.

One also needs to evaluate the first derivative

y(x)=2c1e2x+3c2e3x

in order to attempt to satisfy the initial conditions. Evaluating y and y at x=0 yields

2=c1+c20=2c1+3c2

These two equations in two unknowns can readily be solved to give c1=6/5 and c2=4/5. Therefore, the solution of the initial value problem is obtained as y(x)=65e2x+45e3x.

Note

Repeated roots, r1=r2=r, give solutions of the form

y(x)=(c1+c2x)erx.

In the case when there is a repeated real root, one has only one solution, y1(x)=erx. The question is how does one obtain the second linearly independent solution? Since the solutions should be independent, we must have that the ratio y2(x)/y1(x) is not a constant. So, we guess the form y2(x)=v(x)y1(x)=v(x)erx. (This process is called the Method of Reduction of Order.)

For constant coefficient second order equations, we can write the equation as

(Dr)2y=0

where D=ddx. We now insert y2(x)=v(x)erx into this equation. First we compute

(Dr)verx=verx.

Then,

0=(Dr)2verx=(Dr)verx=verx.

So, if y2(x) is to be a solution to the differential equation, then v(x)erx=0 for all x. So, v(x)=0, which implies that

v(x)=ax+b.

So,

y2(x)=(ax+b)erx.

Without loss of generality, we can take b=0 and a=1 to obtain the second linearly independent solution, y2(x)=xerx. The general solution is then

y(x)=c1erx+c2xerx.

Example 12.2.2

y+6y+9y=0.

Solution

In this example we have r2+6r+9=0. There is only one root, r=3. From the above discussion, we easily find the solution y(x)=(c1+c2x)e3x.

When one has complex roots in the solution of constant coefficient equations, one needs to look at the solutions

y1,2(x)=e(α±iβ)x.

We make use of Euler’s formula (See Chapter 6 for more on complex variables)

eiβx=cosβx+isinβx

Then, the linear combination of y1(x) and y2(x) becomes

Ae(α+iβ)x+Be(αiβ)x=eαx[Aeiβx+Beiβx]=eαx[(A+B)cosβx+i(AB)sinβx]eαx(c1cosβx+c2sinβx)

Thus, we see that we have a linear combination of two real, linearly independent solutions, eαxcosβx and eαxsinβx.

Note

Complex roots, r=α±iβ, give solutions of the form

y(x)=eαx(c1cosβx+c2sinβx).

Example 12.2.3

y+4y=0.

Solution

The characteristic equation in this case is r2+4=0. The roots are pure imaginary roots, r=±2i, and the general solution consists purely of sinusoidal functions, y(x)=c1cos(2x)+c2sin(2x), since α=0 and β=2.

Example 12.2.4

y+2y+4y=0.

Solution

The characteristic equation in this case is r2+2r+4=0. The roots are complex, r=1±3i and the general solution can be written as

y(x)=[c1cos(3x)+c2sin(3x)]ex.

Example 12.2.5

y+4y=sinx.

Solution

This is an example of a nonhomogeneous problem. The homogeneous problem was actually solved in Example 12.2.3. According to the theory, we need only seek a particular solution to the nonhomogeneous problem and add it to the solution of the last example to get the general solution.

The particular solution can be obtained by purely guessing, making an educated guess, or using the Method of Variation of Parameters. We will not review all of these techniques at this time. Due to the simple form of the driving term, we will make an intelligent guess of yp(x)=Asinx and determine what A needs to be. Inserting this guess into the differential equation gives (A+4A)sinx=sinx. So, we see that A=1/3 works. The general solution of the nonhomogeneous problem is therefore y(x)=c1cos(2x)+c2sin(2x)+13sinx.

The three cases for constant coefficient linear second order differential equations are summarized below.

Classification of Roots of the Characteristic Equation for Second Order Constant Coefficient ODEs
  1. Real, distinct roots r1,r2. In this case the solutions corresponding to each root are linearly independent. Therefore, the general solution is simply y(x)=c1er1x+c2er2x.
  2. Real, equal roots r1=r2=r. In this case the solutions corresponding to each root are linearly dependent. To find a second linearly independent solution, one uses the Method of Reduction of Order. This gives the second solution as xerx. Therefore, the general solution is found as y(x)=(c1+c2x)erx.
  3. Complex conjugate roots r1,r2=α±iβ. In this case the solutions corresponding to each root are linearly independent. Making use of Euler’s identity, eiθ=cos(θ)+isin(θ), these complex exponentials can be rewritten in terms of trigonometric functions. Namely, one has that eαxcos(βx) and eαxsin(βx) are two linearly independent solutions. Therefore, the general solution becomes y(x)=eαx(c1cos(βx)+c2sin(βx)).

This page titled 12.2: Second Order Linear Differential Equations is shared under a CC BY-NC-SA 3.0 license and was authored, remixed, and/or curated by Russell Herman via source content that was edited to the style and standards of the LibreTexts platform.

Support Center

How can we help?