7.1 Second-Order Linear Equations

When working with differential equations, usually the goal is to find a solution. In other words, we want to find a function (or functions) that satisfies the differential equation. The technique we use to find these solutions varies, depending on the form of the differential equation with which we are working. Second-order differential equations have several important characteristics that can help us determine which solution method to use. In this section, we examine some of these characteristics and the associated terminology.

Homogeneous Linear Equations

Consider the second-order differential equation

x y ″ + 2 x 2 y ′ + 5 x 3 y = 0 . x y ″ + 2 x 2 y ′ + 5 x 3 y = 0 .

Notice that y and its derivatives appear in a relatively simple form. They are multiplied by functions of x, but are not raised to any powers themselves, nor are they multiplied together. As discussed in Introduction to Differential Equations, first-order equations with similar characteristics are said to be linear. The same is true of second-order equations. Also note that all the terms in this differential equation involve either y or one of its derivatives. There are no terms involving only functions of x. Equations like this, in which every term contains y or one of its derivatives, are called homogeneous.

Not all differential equations are homogeneous. Consider the differential equation

x y ″ + 2 x 2 y ′ + 5 x 3 y = x 2 . x y ″ + 2 x 2 y ′ + 5 x 3 y = x 2 .

The x 2 x 2 term on the right side of the equal sign does not contain y or any of its derivatives. Therefore, this differential equation is nonhomogeneous.

Definition

A second-order differential equation is linear if it can be written in the form

a 2 ( x ) y ″ + a 1 ( x ) y ′ + a 0 ( x ) y = r ( x ) , a 2 ( x ) y ″ + a 1 ( x ) y ′ + a 0 ( x ) y = r ( x ) ,

where a 2 ( x ) , a 2 ( x ) , a 1 ( x ) , a 1 ( x ) , a 0 ( x ) , a 0 ( x ) , and r ( x ) r ( x ) are real-valued functions and a 2 ( x ) a 2 ( x ) is not identically zero. If r ( x ) ≡ 0 r ( x ) ≡ 0 —in other words, if r ( x ) = 0 r ( x ) = 0 for every value of x—the equation is said to be a homogeneous linear equation . If r ( x ) ≠ 0 r ( x ) ≠ 0 for some value of x , x , the equation is said to be a nonhomogeneous linear equation .

Media

Visit this website to study more about second-order linear differential equations.

In linear differential equations, y y and its derivatives can be raised only to the first power and they may not be multiplied by one another. Terms involving y 2 y 2 or y ′ y ′ make the equation nonlinear. Functions of y y and its derivatives, such as sin y sin y or e y ′ , e y ′ , are similarly prohibited in linear differential equations.

Note that equations may not always be given in standard form (the form shown in the definition). It can be helpful to rewrite them in that form to decide whether they are linear, or whether a linear equation is homogeneous.

Example 7.1

Classifying Second-Order Equations

Classify each of the following equations as linear or nonlinear. If the equation is linear, determine further whether it is homogeneous or nonhomogeneous.

  1. y ″ + 3 x 4 y ′ + x 2 y 2 = x 3 y ″ + 3 x 4 y ′ + x 2 y 2 = x 3
  2. ( sin x ) y ″ + ( cos x ) y ′ + 3 y = 0 ( sin x ) y ″ + ( cos x ) y ′ + 3 y = 0
  3. 4 t 2 x ″ + 3 t x x ′ + 4 x = 0 4 t 2 x ″ + 3 t x x ′ + 4 x = 0
  4. 5 y ″ + y = 4 x 5 5 y ″ + y = 4 x 5
  5. ( cos x ) y ″ − sin y ′ + ( sin x ) y − cos x = 0 ( cos x ) y ″ − sin y ′ + ( sin x ) y − cos x = 0
  6. 8 t y ″ − 6 t 2 y ′ + 4 t y − 3 t 2 = 0 8 t y ″ − 6 t 2 y ′ + 4 t y − 3 t 2 = 0
  7. sin ( x 2 ) y ″ − ( cos x ) y ′ + x 2 y = y ′ − 3 sin ( x 2 ) y ″ − ( cos x ) y ′ + x 2 y = y ′ − 3
  8. y ″ + 5 x y ′ − 3 y = cos y y ″ + 5 x y ′ − 3 y = cos y

Solution

  1. This equation is nonlinear because of the y 2 y 2 term.
  2. This equation is linear. There is no term involving a power or function of y , y , and the coefficients are all functions of x . x . The equation is already written in standard form, and r ( x ) r ( x ) is identically zero, so the equation is homogeneous.
  3. This equation is nonlinear. Note that, in this case, x is the dependent variable and t is the independent variable. The second term involves the product of x x and x ′ , x ′ , so the equation is nonlinear.
  4. This equation is linear. Since r ( x ) = 4 x 5 , r ( x ) = 4 x 5 , the equation is nonhomogeneous.
  5. This equation is nonlinear, because of the sin y ′ sin y ′ term.
  6. This equation is linear. Rewriting it in standard form gives
8 t 2 y ″ − 6 t 2 y ′ + 4 t y = 3 t 2 . 8 t 2 y ″ − 6 t 2 y ′ + 4 t y = 3 t 2 .

sin ( x 2 ) y ″ − ( cos x + 1 ) y ′ + x 2 y = −3 . sin ( x 2 ) y ″ − ( cos x + 1 ) y ′ + x 2 y = −3 .

Media

Visit this website that discusses second-order differential equations.

Checkpoint 7.1

Classify each of the following equations as linear or nonlinear. If the equation is linear, determine further whether it is homogeneous or nonhomogeneous.

  1. ( y ″ ) 2 − y ′ + 8 x 3 y = 0 ( y ″ ) 2 − y ′ + 8 x 3 y = 0
  2. ( sin t ) y ″ + cos t − 3 t y ′ = 0 ( sin t ) y ″ + cos t − 3 t y ′ = 0

Later in this section, we will see some techniques for solving specific types of differential equations. Before we get to that, however, let’s get a feel for how solutions to linear differential equations behave. In many cases, solving differential equations depends on making educated guesses about what the solution might look like. Knowing how various types of solutions behave will be helpful.

Example 7.2

Verifying a Solution

Consider the linear, homogeneous differential equation

x 2 y ″ − x y ′ − 3 y = 0 . x 2 y ″ − x y ′ − 3 y = 0 .

Looking at this equation, notice that the coefficient functions are polynomials, with higher powers of x x associated with higher-order derivatives of y . y . Show that y = x 3 y = x 3 is a solution to this differential equation.

Solution

Let y = x 3 . y = x 3 . Then y ′ = 3 x 2 y ′ = 3 x 2 and y ″ = 6 x . y ″ = 6 x . Substituting into the differential equation, we see that

x 2 y ″ − x y ′ − 3 y = x 2 ( 6 x ) − x ( 3 x 2 ) − 3 ( x 3 ) = 6 x 3 − 3 x 3 − 3 x 3 = 0 . x 2 y ″ − x y ′ − 3 y = x 2 ( 6 x ) − x ( 3 x 2 ) − 3 ( x 3 ) = 6 x 3 − 3 x 3 − 3 x 3 = 0 .

Checkpoint 7.2

Show that y = 2 x 2 y = 2 x 2 is a solution to the differential equation

1 2 x 2 y ″ − x y ′ + y = 0 . 1 2 x 2 y ″ − x y ′ + y = 0 .

Although simply finding any solution to a differential equation is important, mathematicians and engineers often want to go beyond finding one solution to a differential equation to finding all solutions to a differential equation. In other words, we want to find a general solution. Just as with first-order differential equations, a general solution (or family of solutions) gives the entire set of solutions to a differential equation. An important difference between first-order and second-order equations is that, with second-order equations, we typically need to find two different solutions to the equation to find the general solution. If we find two solutions, then any linear combination of these solutions is also a solution. We state this fact as the following theorem.

Theorem 7.1

Superposition Principle

If y 1 ( x ) y 1 ( x ) and y 2 ( x ) y 2 ( x ) are solutions to a linear homogeneous differential equation, then the function

y ( x ) = c 1 y 1 ( x ) + c 2 y 2 ( x ) , y ( x ) = c 1 y 1 ( x ) + c 2 y 2 ( x ) ,

where c 1 c 1 and c 2 c 2 are constants, is also a solution.

The proof of this superposition principle theorem is left as an exercise.

Example 7.3

Verifying the Superposition Principle

Consider the differential equation

y ″ − 4 y ′ − 5 y = 0 . y ″ − 4 y ′ − 5 y = 0 .

Given that e − x e − x and e 5 x e 5 x are solutions to this differential equation, show that 4 e − x + e 5 x 4 e − x + e 5 x is a solution.

Solution

y ( x ) = 4 e − x + e 5 x , so y ′ ( x ) = −4 e − x + 5 e 5 x and y ″ ( x ) = 4 e − x + 25 e 5 x . y ( x ) = 4 e − x + e 5 x , so y ′ ( x ) = −4 e − x + 5 e 5 x and y ″ ( x ) = 4 e − x + 25 e 5 x .

y ″ − 4 y ′ − 5 y = ( 4 e − x + 25 e 5 x ) − 4 ( −4 e − x + 5 e 5 x ) − 5 ( 4 e − x + e 5 x ) = 4 e − x + 25 e 5 x + 16 e − x − 20 e 5 x − 20 e − x − 5 e 5 x = 0 . y ″ − 4 y ′ − 5 y = ( 4 e − x + 25 e 5 x ) − 4 ( −4 e − x + 5 e 5 x ) − 5 ( 4 e − x + e 5 x ) = 4 e − x + 25 e 5 x + 16 e − x − 20 e 5 x − 20 e − x − 5 e 5 x = 0 .

Thus, y ( x ) = 4 e − x + e 5 x y ( x ) = 4 e − x + e 5 x is a solution.

Checkpoint 7.3

Consider the differential equation

y ″ + 5 y ′ + 6 y = 0 . y ″ + 5 y ′ + 6 y = 0 .

Given that e −2 x e −2 x and e −3 x e −3 x are solutions to this differential equation, show that 3 e −2 x + 6 e −3 x 3 e −2 x + 6 e −3 x is a solution.

Unfortunately, to find the general solution to a second-order differential equation, it is not enough to find any two solutions and then combine them. Consider the differential equation

x ″ + 7 x ′ + 12 x = 0 . x ″ + 7 x ′ + 12 x = 0 .

Both e −3 t e −3 t and 2 e −3 t 2 e −3 t are solutions (check this). However, x ( t ) = c 1 e −3 t + c 2 ( 2 e −3 t ) x ( t ) = c 1 e −3 t + c 2 ( 2 e −3 t ) is not the general solution. This expression does not account for all solutions to the differential equation. In particular, it fails to account for the function e −4 t , e −4 t , which is also a solution to the differential equation.

It turns out that to find the general solution to a second-order differential equation, we must find two linearly independent solutions. We define that terminology here.

Definition

A set of functions f 1 ( x ) , f 2 ( x ),…, f n ( x ) f 1 ( x ) , f 2 ( x ),…, f n ( x ) is said to be linearly dependent if there are constants c 1 , c 2 ,… c n , c 1 , c 2 ,… c n , not all zero, such that c 1 f 1 ( x ) + c 2 f 2 ( x ) + ⋯ + c n f n ( x ) = 0 c 1 f 1 ( x ) + c 2 f 2 ( x ) + ⋯ + c n f n ( x ) = 0 for all x over the interval of interest. A set of functions that is not linearly dependent is said to be linearly independent .

In this chapter, we usually test sets of only two functions for linear independence, which allows us to simplify this definition. From a practical perspective, we see that two functions are linearly dependent if either one of them is identically zero or if they are constant multiples of each other.

First we show that if the functions meet the conditions given previously, then they are linearly dependent. If one of the functions is identically zero—say, f 2 ( x ) ≡ 0 f 2 ( x ) ≡ 0 —then choose c 1 = 0 c 1 = 0 and c 2 = 1 , c 2 = 1 , and the condition for linear dependence is satisfied. If, on the other hand, neither f 1 ( x ) f 1 ( x ) nor f 2 ( x ) f 2 ( x ) is identically zero, but f 1 ( x ) = C f 2 ( x ) f 1 ( x ) = C f 2 ( x ) for some constant C , C , then choose c 1 = 1 C c 1 = 1 C and c 2 = −1 , c 2 = −1 , and again, the condition is satisfied.

Next, we show that if two functions are linearly dependent, then either one is identically zero or they are constant multiples of one another. Assume f 1 ( x ) f 1 ( x ) and f 2 ( x ) f 2 ( x ) are linearly independent. Then, there are constants, c 1 c 1 and c 2 , c 2 , not both zero, such that

c 1 f 1 ( x ) + c 2 f 2 ( x ) = 0 c 1 f 1 ( x ) + c 2 f 2 ( x ) = 0

for all x over the interval of interest. Then,

c 1 f 1 ( x ) = − c 2 f 2 ( x ) . c 1 f 1 ( x ) = − c 2 f 2 ( x ) .

Now, since we stated that c 1 c 1 and c 2 c 2 can’t both be zero, assume c 2 ≠ 0 . c 2 ≠ 0 . Then, there are two cases: either c 1 = 0 c 1 = 0 or c 1 ≠ 0 . c 1 ≠ 0 . If c 1 = 0 , c 1 = 0 , then

0 = − c 2 f 2 ( x ) 0 = f 2 ( x ) , 0 = − c 2 f 2 ( x ) 0 = f 2 ( x ) ,

so one of the functions is identically zero. Now suppose c 1 ≠ 0 . c 1 ≠ 0 . Then,

f 1 ( x ) = ( − c 2 c 1 ) f 2 ( x ) f 1 ( x ) = ( − c 2 c 1 ) f 2 ( x )

and we see that the functions are constant multiples of one another.

Theorem 7.2

Linear Dependence of Two Functions

Two functions, f 1 ( x ) f 1 ( x ) and f 2 ( x ) , f 2 ( x ) , are said to be linearly dependent if either one of them is identically zero or if f 1 ( x ) = C f 2 ( x ) f 1 ( x ) = C f 2 ( x ) for some constant C and for all x over the interval of interest. Functions that are not linearly dependent are said to be linearly independent.

Example 7.4

Testing for Linear Dependence

Determine whether the following pairs of functions are linearly dependent or linearly independent.

  1. f 1 ( x ) = x 2 , f 1 ( x ) = x 2 , f 2 ( x ) = 5 x 2 f 2 ( x ) = 5 x 2
  2. f 1 ( x ) = sin x , f 1 ( x ) = sin x , f 2 ( x ) = cos x f 2 ( x ) = cos x
  3. f 1 ( x ) = e 3 x , f 1 ( x ) = e 3 x , f 2 ( x ) = e −3 x f 2 ( x ) = e −3 x
  4. f 1 ( x ) = 3 x , f 1 ( x ) = 3 x , f 2 ( x ) = 3 x + 1 f 2 ( x ) = 3 x + 1

Solution

  1. f 2 ( x ) = 5 f 1 ( x ) , f 2 ( x ) = 5 f 1 ( x ) , so the functions are linearly dependent.
  2. There is no constant C such that f 1 ( x ) = C f 2 ( x ) , f 1 ( x ) = C f 2 ( x ) , so the functions are linearly independent.
  3. There is no constant C such that f 1 ( x ) = C f 2 ( x ) , f 1 ( x ) = C f 2 ( x ) , so the functions are linearly independent. Don’t get confused by the fact that the exponents are constant multiples of each other. With two exponential functions, unless the exponents are equal, the functions are linearly independent.
  4. There is no constant C such that f 1 ( x ) = C f 2 ( x ) , f 1 ( x ) = C f 2 ( x ) , so the functions are linearly independent.

Checkpoint 7.4

Determine whether the following pairs of functions are linearly dependent or linearly independent: f 1 ( x ) = e x , f 1 ( x ) = e x , f 2 ( x ) = 3 e 3 x . f 2 ( x ) = 3 e 3 x .

If we are able to find two linearly independent solutions to a second-order differential equation, then we can combine them to find the general solution. This result is formally stated in the following theorem.

Theorem 7.3

General Solution to a Homogeneous Equation

If y 1 ( x ) y 1 ( x ) and y 2 ( x ) y 2 ( x ) are linearly independent solutions to a second-order, linear, homogeneous differential equation, then the general solution is given by

y ( x ) = c 1 y 1 ( x ) + c 2 y 2 ( x ) , y ( x ) = c 1 y 1 ( x ) + c 2 y 2 ( x ) ,

where c 1 c 1 and c 2 c 2 are constants.

When we say a family of functions is the general solution to a differential equation , we mean that (1) every expression of that form is a solution and (2) every solution to the differential equation can be written in that form, which makes this theorem extremely powerful. If we can find two linearly independent solutions to a differential equation, we have, effectively, found all solutions to the differential equation—quite a remarkable statement. The proof of this theorem is beyond the scope of this text.

Example 7.5

Writing the General Solution

If y 1 ( t ) = e 3 t y 1 ( t ) = e 3 t and y 2 ( t ) = e −3 t y 2 ( t ) = e −3 t are solutions to y ″ − 9 y = 0 , y ″ − 9 y = 0 , what is the general solution?

Solution

Note that y 1 y 1 and y 2 y 2 are not constant multiples of one another, so they are linearly independent. Then, the general solution to the differential equation is y ( t ) = c 1 e 3 t + c 2 e −3 t . y ( t ) = c 1 e 3 t + c 2 e −3 t .

Checkpoint 7.5

If y 1 ( x ) = e 3 x y 1 ( x ) = e 3 x and y 2 ( x ) = x e 3 x y 2 ( x ) = x e 3 x are solutions to y ″ − 6 y ′ + 9 y = 0 , y ″ − 6 y ′ + 9 y = 0 , what is the general solution?

Second-Order Equations with Constant Coefficients

Now that we have a better feel for linear differential equations, we are going to concentrate on solving second-order equations of the form

a y ″ + b y ′ + c y = 0 , a y ″ + b y ′ + c y = 0 ,

where a , a , b , b , and c c are constants.

Since all the coefficients are constants, the solutions are probably going to be functions with derivatives that are constant multiples of themselves. We need all the terms to cancel out, and if taking a derivative introduces a term that is not a constant multiple of the original function, it is difficult to see how that term cancels out. Exponential functions have derivatives that are constant multiples of the original function, so let’s see what happens when we try a solution of the form y ( x ) = e λ x , y ( x ) = e λ x , where λ λ (the lowercase Greek letter lambda) is some constant.

If y ( x ) = e λ x , y ( x ) = e λ x , then y ′ ( x ) = λ e λ x y ′ ( x ) = λ e λ x and y ″ = λ 2 e λ x . y ″ = λ 2 e λ x . Substituting these expressions into Equation 7.1, we get

a y ″ + b y ′ + c y = a ( λ 2 e λ x ) + b ( λ e λ x ) + c e λ x = e λ x ( a λ 2 + b λ + c ) . a y ″ + b y ′ + c y = a ( λ 2 e λ x ) + b ( λ e λ x ) + c e λ x = e λ x ( a λ 2 + b λ + c ) .

Since e λ x e λ x is never zero, this expression can be equal to zero for all x only if

a λ 2 + b λ + c = 0 . a λ 2 + b λ + c = 0 .

We call this the characteristic equation of the differential equation.

Definition

The characteristic equation of the differential equation a y ″ + b y ′ + c y = 0 a y ″ + b y ′ + c y = 0 is a λ 2 + b λ + c = 0 . a λ 2 + b λ + c = 0 .

The characteristic equation is very important in finding solutions to differential equations of this form. We can solve the characteristic equation either by factoring or by using the quadratic formula

λ = − b ± b 2 − 4 a c 2 a . λ = − b ± b 2 − 4 a c 2 a .

This gives three cases. The characteristic equation has (1) distinct real roots; (2) a single, repeated real root; or (3) complex conjugate roots. We consider each of these cases separately.

Distinct Real Roots

If the characteristic equation has distinct real roots λ 1 λ 1 and λ 2 , λ 2 , then e λ 1 x e λ 1 x and e λ 2 x e λ 2 x are linearly independent solutions to Example 7.1, and the general solution is given by

y ( x ) = c 1 e λ 1 x + c 2 e λ 2 x , y ( x ) = c 1 e λ 1 x + c 2 e λ 2 x ,

where c 1 c 1 and c 2 c 2 are constants.

For example, the differential equation y ″ + 9 y ′ + 14 y = 0 y ″ + 9 y ′ + 14 y = 0 has the associated characteristic equation λ 2 + 9 λ + 14 = 0 . λ 2 + 9 λ + 14 = 0 . This factors into ( λ + 2 ) ( λ + 7 ) = 0 , ( λ + 2 ) ( λ + 7 ) = 0 , which has roots λ 1 = −2 λ 1 = −2 and λ 2 = −7 . λ 2 = −7 . Therefore, the general solution to this differential equation is

y ( x ) = c 1 e −2 x + c 2 e −7 x . y ( x ) = c 1 e −2 x + c 2 e −7 x .

Single Repeated Real Root

Things are a little more complicated if the characteristic equation has a repeated real root, λ . λ . In this case, we know e λ x e λ x is a solution to Equation 7.1, but it is only one solution and we need two linearly independent solutions to determine the general solution. We might be tempted to try a function of the form k e λ x , k e λ x , where k is some constant, but it would not be linearly independent of e λ x . e λ x . Therefore, let’s try x e λ x x e λ x as the second solution. First, note that by the quadratic formula,

λ = − b ± b 2 − 4 a c 2 a . λ = − b ± b 2 − 4 a c 2 a .

But, λ λ is a repeated root, so b 2 − 4 a c = 0 b 2 − 4 a c = 0 and λ = − b 2 a . λ = − b 2 a . Thus, if y = x e λ x , y = x e λ x , we have

y ′ = e λ x + λ x e λ x and y ″ = 2 λ e λ x + λ 2 x e λ x . y ′ = e λ x + λ x e λ x and y ″ = 2 λ e λ x + λ 2 x e λ x .

Substituting these expressions into Equation 7.1, we see that

a y ″ + b y ′ + c y = a ( 2 λ e λ x + λ 2 x e λ x ) + b ( e λ x + λ x e λ x ) + c x e λ x = x e λ x ( a λ 2 + b λ + c ) + e λ x ( 2 a λ + b ) = x e λ x ( 0 ) + e λ x ( 2 a ( − b 2 a ) + b ) = 0 + e λ x ( 0 ) = 0 . a y ″ + b y ′ + c y = a ( 2 λ e λ x + λ 2 x e λ x ) + b ( e λ x + λ x e λ x ) + c x e λ x = x e λ x ( a λ 2 + b λ + c ) + e λ x ( 2 a λ + b ) = x e λ x ( 0 ) + e λ x ( 2 a ( − b 2 a ) + b ) = 0 + e λ x ( 0 ) = 0 .

This shows that x e λ x x e λ x is a solution to Equation 7.1. Since e λ x e λ x and x e λ x x e λ x are linearly independent, when the characteristic equation has a repeated root λ , λ , the general solution to Equation 7.1 is given by

y ( x ) = c 1 e λ x + c 2 x e λ x , y ( x ) = c 1 e λ x + c 2 x e λ x ,

where c 1 c 1 and c 2 c 2 are constants.

For example, the differential equation y ″ + 12 y ′ + 36 y = 0 y ″ + 12 y ′ + 36 y = 0 has the associated characteristic equation λ 2 + 12 λ + 36 = 0 . λ 2 + 12 λ + 36 = 0 . This factors into ( λ + 6 ) 2 = 0 , ( λ + 6 ) 2 = 0 , which has a repeated root λ = −6 . λ = −6 . Therefore, the general solution to this differential equation is

y ( x ) = c 1 e −6 x + c 2 x e −6 x . y ( x ) = c 1 e −6 x + c 2 x e −6 x .

Complex Conjugate Roots

This creates a little bit of a problem for us. If we follow the same process we used for distinct real roots—using the roots of the characteristic equation as the coefficients in the exponents of exponential functions—we get the functions e ( α + β i ) x e ( α + β i ) x and e ( α − β i ) x e ( α − β i ) x as our solutions. However, there are problems with this approach. First, these functions take on complex (imaginary) values, and a complete discussion of such functions is beyond the scope of this text. Second, even if we were comfortable with complex-value functions, in this course we do not address the idea of a derivative for such functions. So, if possible, we’d like to find two linearly independent real-value solutions to the differential equation. For purposes of this development, we are going to manipulate and differentiate the functions e ( α + β i ) x e ( α + β i ) x and e ( α − β i ) x e ( α − β i ) x as if they were real-value functions. For these particular functions, this approach is valid mathematically, but be aware that there are other instances when complex-value functions do not follow the same rules as real-value functions. Those of you interested in a more in-depth discussion of complex-value functions should consult a complex analysis text.

Based on the roots α ± β i α ± β i of the characteristic equation, the functions e ( α + β i ) x e ( α + β i ) x and e ( α − β i ) x e ( α − β i ) x are linearly independent solutions to the differential equation. and the general solution is given by

y ( x ) = c 1 e ( α + β i ) x + c 2 e ( α − β i ) x . y ( x ) = c 1 e ( α + β i ) x + c 2 e ( α − β i ) x .

Using some smart choices for c 1 c 1 and c 2 , c 2 , and a little bit of algebraic manipulation, we can find two linearly independent, real-value solutions to Equation 7.1 and express our general solution in those terms.

We encountered exponential functions with complex exponents earlier. One of the key tools we used to express these exponential functions in terms of sines and cosines was Euler’s formula , which tells us that

e i θ = cos θ + i sin θ e i θ = cos θ + i sin θ

for all real numbers θ . θ .

Going back to the general solution, we have

y ( x ) = c 1 e ( α + β i ) x + c 2 e ( α − β i ) x = c 1 e α x e β i x + c 2 e α x e − β i x = e α x ( c 1 e β i x + c 2 e − β i x ) . y ( x ) = c 1 e ( α + β i ) x + c 2 e ( α − β i ) x = c 1 e α x e β i x + c 2 e α x e − β i x = e α x ( c 1 e β i x + c 2 e − β i x ) .

Applying Euler’s formula together with the identities cos ( − x ) = cos x cos ( − x ) = cos x and sin ( − x ) = − sin x , sin ( − x ) = − sin x , we get

y ( x ) = e α x [ c 1 ( cos β x + i sin β x ) + c 2 ( cos ( − β x ) + i sin ( − β x ) ) ] = e α x [ ( c 1 + c 2 ) cos β x + ( c 1 − c 2 ) i sin β x ] . y ( x ) = e α x [ c 1 ( cos β x + i sin β x ) + c 2 ( cos ( − β x ) + i sin ( − β x ) ) ] = e α x [ ( c 1 + c 2 ) cos β x + ( c 1 − c 2 ) i sin β x ] .

Now, if we choose c 1 = c 2 = 1 2 , c 1 = c 2 = 1 2 , the second term is zero and we get

y ( x ) = e α x cos β x y ( x ) = e α x cos β x

as a real-value solution to Equation 7.1. Similarly, if we choose c 1 = − i 2 c 1 = − i 2 and c 2 = i 2 , c 2 = i 2 , the first term is zero and we get

y ( x ) = e α x sin β x y ( x ) = e α x sin β x

as a second, linearly independent, real-value solution to Equation 7.1.

Based on this, we see that if the characteristic equation has complex conjugate roots α ± β i , α ± β i , then the general solution to Equation 7.1 is given by

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

where c 1 c 1 and c 2 c 2 are constants.

For example, the differential equation y ″ − 2 y ′ + 5 y = 0 y ″ − 2 y ′ + 5 y = 0 has the associated characteristic equation λ 2 − 2 λ + 5 = 0 . λ 2 − 2 λ + 5 = 0 . By the quadratic formula, the roots of the characteristic equation are 1 ± 2 i . 1 ± 2 i . Therefore, the general solution to this differential equation is

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

Summary of Results

We can solve second-order, linear, homogeneous differential equations with constant coefficients by finding the roots of the associated characteristic equation. The form of the general solution varies, depending on whether the characteristic equation has distinct, real roots; a single, repeated real root; or complex conjugate roots. The three cases are summarized in Table 7.1.

Characteristic Equation Roots General Solution to the Differential Equation
Distinct real roots, λ 1 λ 1 and λ 2 λ 2 y ( x ) = c 1 e λ 1 x + c 2 e λ 2 x y ( x ) = c 1 e λ 1 x + c 2 e λ 2 x
A repeated real root, λ λ y ( x ) = c 1 e λ x + c 2 x e λ x y ( x ) = c 1 e λ x + c 2 x e λ x
Complex conjugate roots α ± β i α ± β i y ( x ) = e α x ( c 1 cos β x + c 2 sin β x ) y ( x ) = e α x ( c 1 cos β x + c 2 sin β x )
Table 7.1 Summary of Characteristic Equation Cases

Problem-Solving Strategy

Using the Characteristic Equation to Solve Second-Order Differential Equations with Constant Coefficients

  1. Write the differential equation in the form a y ″ + b y ′ + c y = 0 . a y ″ + b y ′ + c y = 0 .
  2. Find the corresponding characteristic equation a λ 2 + b λ + c = 0 . a λ 2 + b λ + c = 0 .
  3. Either factor the characteristic equation or use the quadratic formula to find the roots.
  4. Determine the form of the general solution based on whether the characteristic equation has distinct, real roots; a single, repeated real root; or complex conjugate roots.

Example 7.6

Solving Second-Order Equations with Constant Coefficients

Find the general solution to the following differential equations. Give your answers as functions of x.

  1. y ″ + 3 y ′ − 4 y = 0 y ″ + 3 y ′ − 4 y = 0
  2. y ″ + 6 y ′ + 13 y = 0 y ″ + 6 y ′ + 13 y = 0
  3. y ″ + 2 y ′ + y = 0 y ″ + 2 y ′ + y = 0
  4. y ″ − 5 y ′ = 0 y ″ − 5 y ′ = 0
  5. y ″ − 16 y = 0 y ″ − 16 y = 0
  6. y ″ + 16 y = 0 y ″ + 16 y = 0

Solution

Note that all these equations are already given in standard form (step 1).

    The characteristic equation is λ 2 + 3 λ − 4 = 0 λ 2 + 3 λ − 4 = 0 (step 2). This factors into ( λ + 4 ) ( λ − 1 ) = 0 , ( λ + 4 ) ( λ − 1 ) = 0 , so the roots of the characteristic equation are λ 1 = −4 λ 1 = −4 and λ 2 = 1 λ 2 = 1 (step 3). Then the general solution to the differential equation is

y ( x ) = c 1 e −4 x + c 2 e x (step 4) . y ( x ) = c 1 e −4 x + c 2 e x (step 4) .

y ( t ) = e −3 t ( c 1 cos 2 t + c 2 sin 2 t ) (step 4) . y ( t ) = e −3 t ( c 1 cos 2 t + c 2 sin 2 t ) (step 4) .

y ( t ) = c 1 e − t + c 2 t e − t (step 4). y ( t ) = c 1 e − t + c 2 t e − t (step 4). y ( x ) = c 1 + c 2 e 5 x (step 4) . y ( x ) = c 1 + c 2 e 5 x (step 4) . y ( x ) = c 1 e 4 x + c 2 e −4 x (step 4) . y ( x ) = c 1 e 4 x + c 2 e −4 x (step 4) . y ( t ) = c 1 cos 4 t + c 2 sin 4 t (step 4) . y ( t ) = c 1 cos 4 t + c 2 sin 4 t (step 4) .

Checkpoint 7.6

Find the general solution to the following differential equations:

  1. y ″ − 2 y ′ + 10 y = 0 y ″ − 2 y ′ + 10 y = 0
  2. y ″ + 14 y ′ + 49 y = 0 y ″ + 14 y ′ + 49 y = 0

Initial-Value Problems and Boundary-Value Problems

So far, we have been finding general solutions to differential equations. However, differential equations are often used to describe physical systems, and the person studying that physical system usually knows something about the state of that system at one or more points in time. For example, if a constant-coefficient differential equation is representing how far a motorcycle shock absorber is compressed, we might know that the rider is sitting still on his motorcycle at the start of a race, time t = t 0 . t = t 0 . This means the system is at equilibrium, so y ( t 0 ) = 0 , y ( t 0 ) = 0 , and the compression of the shock absorber is not changing, so y ′ ( t 0 ) = 0 . y ′ ( t 0 ) = 0 . With these two initial conditions and the general solution to the differential equation, we can find the specific solution to the differential equation that satisfies both initial conditions. This process is known as solving an initial-value problem. (Recall that we discussed initial-value problems in Introduction to Differential Equations.) Note that second-order equations have two arbitrary constants in the general solution, and therefore we require two initial conditions to find the solution to the initial-value problem.

Sometimes we know the condition of the system at two different times. For example, we might know y ( t 0 ) = y 0 y ( t 0 ) = y 0 and y ( t 1 ) = y 1 . y ( t 1 ) = y 1 . These conditions are called boundary conditions , and finding the solution to the differential equation that satisfies the boundary conditions is called solving a boundary-value problem .

Mathematicians, scientists, and engineers are interested in understanding the conditions under which an initial-value problem or a boundary-value problem has a unique solution. Although a complete treatment of this topic is beyond the scope of this text, it is useful to know that, within the context of constant-coefficient, second-order equations, initial-value problems are guaranteed to have a unique solution as long as two initial conditions are provided. Boundary-value problems, however, are not as well behaved. Even when two boundary conditions are known, we may encounter boundary-value problems with unique solutions, many solutions, or no solution at all.

Example 7.7

Solving an Initial-Value Problem

Solve the following initial-value problem: y ″ + 3 y ′ − 4 y = 0 , y ″ + 3 y ′ − 4 y = 0 , y ( 0 ) = 1 , y ( 0 ) = 1 , y ′ ( 0 ) = −9 . y ′ ( 0 ) = −9 .

Solution

We already solved this differential equation in Example 7.6a. and found the general solution to be

y ( x ) = c 1 e −4 x + c 2 e x . y ( x ) = c 1 e −4 x + c 2 e x . y ′ ( x ) = −4 c 1 e −4 x + c 2 e x . y ′ ( x ) = −4 c 1 e −4 x + c 2 e x .

When x = 0 , x = 0 , we have y ( 0 ) = c 1 + c 2 y ( 0 ) = c 1 + c 2 and y ′ ( 0 ) = −4 c 1 + c 2 . y ′ ( 0 ) = −4 c 1 + c 2 . Applying the initial conditions, we have

c 1 + c 2 = 1 −4 c 1 + c 2 = −9 . c 1 + c 2 = 1 −4 c 1 + c 2 = −9 .

Then c 1 = 1 − c 2 . c 1 = 1 − c 2 . Substituting this expression into the second equation, we see that

−4 ( 1 − c 2 ) + c 2 = −9 −4 + 4 c 2 + c 2 = −9 5 c 2 = −5 c 2 = −1 . −4 ( 1 − c 2 ) + c 2 = −9 −4 + 4 c 2 + c 2 = −9 5 c 2 = −5 c 2 = −1 .

So, c 1 = 2 c 1 = 2 and the solution to the initial-value problem is

y ( x ) = 2 e −4 x − e x . y ( x ) = 2 e −4 x − e x .

Checkpoint 7.7

Solve the initial-value problem y ″ − 3 y ′ − 10 y = 0 , y ″ − 3 y ′ − 10 y = 0 , y ( 0 ) = 0 , y ( 0 ) = 0 , y ′ ( 0 ) = 7 . y ′ ( 0 ) = 7 .

Example 7.8

Solving an Initial-Value Problem and Graphing the Solution

Solve the following initial-value problem and graph the solution:

y ″ + 6 y ′ + 13 y = 0 , y ( 0 ) = 0 , y ′ ( 0 ) = 2 y ″ + 6 y ′ + 13 y = 0 , y ( 0 ) = 0 , y ′ ( 0 ) = 2

Solution

We already solved this differential equation in Example 7.6b. and found the general solution to be

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

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

When x = 0 , x = 0 , we have y ( 0 ) = c 1 y ( 0 ) = c 1 and y ′ ( 0 ) = 2 c 2 − 3 c 1 . y ′ ( 0 ) = 2 c 2 − 3 c 1 . Applying the initial conditions, we obtain

c 1 = 0 −3 c 1 + 2 c 2 = 2 . c 1 = 0 −3 c 1 + 2 c 2 = 2 .

Therefore, c 1 = 0 , c 1 = 0 , c 2 = 1 , c 2 = 1 , and the solution to the initial value problem is shown in the following graph.

y = e −3 x sin 2 x . y = e −3 x sin 2 x .

Checkpoint 7.8

Solve the following initial-value problem and graph the solution: y ″ − 2 y ′ + 10 y = 0 , y ( 0 ) = 2 , y ′ ( 0 ) = −1 y ″ − 2 y ′ + 10 y = 0 , y ( 0 ) = 2 , y ′ ( 0 ) = −1

Example 7.9

Initial-Value Problem Representing a Spring-Mass System

The following initial-value problem models the position of an object with mass attached to a spring. Spring-mass systems are examined in detail in Applications. The solution to the differential equation gives the position of the mass with respect to a neutral (equilibrium) position (in meters) at any given time. (Note that for spring-mass systems of this type, it is customary to define the downward direction as positive.)

y ″ + 2 y ′ + y = 0 , y ( 0 ) = 1 , y ′ ( 0 ) = 0 y ″ + 2 y ′ + y = 0 , y ( 0 ) = 1 , y ′ ( 0 ) = 0

Solve the initial-value problem and graph the solution. What is the position of the mass at time t = 2 t = 2 sec? How fast is the mass moving at time t = 1 t = 1 sec? In what direction?

Solution

In Example 7.6c. we found the general solution to this differential equation to be

y ( t ) = c 1 e − t + c 2 t e − t . y ( t ) = c 1 e − t + c 2 t e − t .

y ′ ( t ) = − c 1 e − t + c 2 ( − t e − t + e − t ) . y ′ ( t ) = − c 1 e − t + c 2 ( − t e − t + e − t ) .

When t = 0 , t = 0 , we have y ( 0 ) = c 1 y ( 0 ) = c 1 and y ′ ( 0 ) = − c 1 + c 2 . y ′ ( 0 ) = − c 1 + c 2 . Applying the initial conditions, we obtain

c 1 = 1 − c 1 + c 2 = 0 . c 1 = 1 − c 1 + c 2 = 0 .

Thus, c 1 = 1 , c 1 = 1 , c 2 = 1 , c 2 = 1 , and the solution to the initial value problem is

y ( t ) = e − t + t e − t . y ( t ) = e − t + t e − t .

This solution is represented in the following graph. At time t = 2 , t = 2 , the mass is at position y ( 2 ) = e −2 + 2 e −2 = 3 e −2 ≈ 0.406 y ( 2 ) = e −2 + 2 e −2 = 3 e −2 ≈ 0.406 m below equilibrium.

To calculate the velocity at time t = 1 , t = 1 , we need to find the derivative. We have y ( t ) = e − t + t e − t , y ( t ) = e − t + t e − t , so

y ′ ( t ) = − e − t + e − t − t e − t = − t e − t . y ′ ( t ) = − e − t + e − t − t e − t = − t e − t .

Then y ′ ( 1 ) = − e −1 ≈ − 0.3679 . y ′ ( 1 ) = − e −1 ≈ − 0.3679 . At time t = 1 , t = 1 , the mass is moving upward at 0.3679 m/sec.

Checkpoint 7.9

Suppose the following initial-value problem models the position (in feet) of a mass in a spring-mass system at any given time. Solve the initial-value problem and graph the solution. What is the position of the mass at time t = 0.3 t = 0.3 sec? How fast is it moving at time t = 0.1 t = 0.1 sec? In what direction?

y ″ + 14 y ′ + 49 y = 0 , y ( 0 ) = 0 , y ′ ( 0 ) = 1 y ″ + 14 y ′ + 49 y = 0 , y ( 0 ) = 0 , y ′ ( 0 ) = 1

Example 7.10

Solving a Boundary-Value Problem

In Example 7.6f. we solved the differential equation y ″ + 16 y = 0 y ″ + 16 y = 0 and found the general solution to be y ( t ) = c 1 cos 4 t + c 2 sin 4 t . y ( t ) = c 1 cos 4 t + c 2 sin 4 t . If possible, solve the boundary-value problem if the boundary conditions are the following:

  1. y ( 0 ) = 0 , y ( 0 ) = 0 , y ( π 4 ) = 0 y ( π 4 ) = 0
  2. y ( 0 ) = 1 , y ( 0 ) = 1 , y ( π 8 ) = 0 y ( π 8 ) = 0
  3. y ( π 8 ) = 0 , y ( π 8 ) = 0 , y ( 3 π 8 ) = 2 y ( 3 π 8 ) = 2

Solution

y ( x ) = c 1 cos 4 t + c 2 sin 4 t . y ( x ) = c 1 cos 4 t + c 2 sin 4 t .
  1. Applying the first boundary condition given here, we get y ( 0 ) = c 1 = 0 . y ( 0 ) = c 1 = 0 . So the solution is of the form y ( t ) = c 2 sin 4 t . y ( t ) = c 2 sin 4 t . When we apply the second boundary condition, though, we get y ( π 4 ) = c 2 sin ( 4 ( π 4 ) ) = c 2 sin π = 0 y ( π 4 ) = c 2 sin ( 4 ( π 4 ) ) = c 2 sin π = 0 for all values of c 2 . c 2 . The boundary conditions are not sufficient to determine a value for c 2 , c 2 , so this boundary-value problem has infinitely many solutions. Thus, y ( t ) = c 2 sin 4 t y ( t ) = c 2 sin 4 t is a solution for any value of c 2 . c 2 .
  2. Applying the first boundary condition given here, we get y ( 0 ) = c 1 = 1 . y ( 0 ) = c 1 = 1 . Applying the second boundary condition gives y ( π 8 ) = c 2 = 0 , y ( π 8 ) = c 2 = 0 , so c 2 = 0 . c 2 = 0 . In this case, we have a unique solution: y ( t ) = cos 4 t . y ( t ) = cos 4 t .
  3. Applying the first boundary condition given here, we get y ( π 8 ) = c 2 = 0 . y ( π 8 ) = c 2 = 0 . However, applying the second boundary condition gives y ( 3 π 8 ) = − c 2 = 2 , y ( 3 π 8 ) = − c 2 = 2 , so c 2 = −2 . c 2 = −2 . We cannot have c 2 = 0 = −2 , c 2 = 0 = −2 , so this boundary value problem has no solution.

Section 7.1 Exercises

Classify each of the following equations as linear or nonlinear. If the equation is linear, determine whether it is homogeneous or nonhomogeneous.

x 3 y ″ + ( x − 1 ) y ′ − 8 y = 0 x 3 y ″ + ( x − 1 ) y ′ − 8 y = 0

( 1 + y 2 ) y ″ + x y ′ − 3 y = cos x ( 1 + y 2 ) y ″ + x y ′ − 3 y = cos x

x y ″ + e y y ′ = x x y ″ + e y y ′ = x

y ″ + 4 x y ′ − 8 x y = 5 x 2 + 1 y ″ + 4 x y ′ − 8 x y = 5 x 2 + 1

y ″ + ( sin x ) y ′ − x y = 4 y y ″ + ( sin x ) y ′ − x y = 4 y

y ″ + ( x + 3 y ) y ′ = 0 y ″ + ( x + 3 y ) y ′ = 0

For each of the following problems, verify that the given function is a solution to the differential equation. Use a graphing utility to graph the particular solutions for several values of c1 and c2. What do the solutions have in common?

[T] y ″ + 2 y ′ − 3 y = 0 ; y ″ + 2 y ′ − 3 y = 0 ; y ( x ) = c 1 e x + c 2 e −3 x y ( x ) = c 1 e x + c 2 e −3 x

[T] x 2 y ″ − 2 y − 3 x 2 + 1 = 0 ; x 2 y ″ − 2 y − 3 x 2 + 1 = 0 ; y ( x ) = c 1 x 2 + c 2 x −1 + x 2 ln ( x ) + 1 2 y ( x ) = c 1 x 2 + c 2 x −1 + x 2 ln ( x ) + 1 2

[T] y ″ + 14 y ′ + 49 y = 0 ; y ″ + 14 y ′ + 49 y = 0 ; y ( x ) = c 1 e −7 x + c 2 x e −7 x y ( x ) = c 1 e −7 x + c 2 x e −7 x

[T] 6 y ″ − 49 y ′ + 8 y = 0 ; 6 y ″ − 49 y ′ + 8 y = 0 ; y ( x ) = c 1 e x / 6 + c 2 e 8 x y ( x ) = c 1 e x / 6 + c 2 e 8 x

Find the general solution to the linear differential equation.

y ″ − 3 y ′ − 10 y = 0 y ″ − 3 y ′ − 10 y = 0

y ″ − 7 y ′ + 12 y = 0 y ″ − 7 y ′ + 12 y = 0

y ″ + 4 y ′ + 4 y = 0 y ″ + 4 y ′ + 4 y = 0

4 y ″ − 12 y ′ + 9 y = 0 4 y ″ − 12 y ′ + 9 y = 0

2 y ″ − 3 y ′ − 5 y = 0 2 y ″ − 3 y ′ − 5 y = 0

3 y ″ − 14 y ′ + 8 y = 0 3 y ″ − 14 y ′ + 8 y = 0

y ″ + y ′ + y = 0 y ″ + y ′ + y = 0

5 y ″ + 2 y ′ + 4 y = 0 5 y ″ + 2 y ′ + 4 y = 0

y ″ − 121 y = 0 y ″ − 121 y = 0

8 y ″ + 14 y ′ − 15 y = 0 8 y ″ + 14 y ′ − 15 y = 0

y ″ + 81 y = 0 y ″ + 81 y = 0

y ″ − y ′ + 11 y = 0 y ″ − y ′ + 11 y = 0