### Learning Objectives

- 7.1.1. Recognize homogeneous and nonhomogeneous linear differential equations.
- 7.1.2. Determine the characteristic equation of a homogeneous linear equation.
- 7.1.3. Use the roots of the characteristic equation to find the solution to a homogeneous linear equation.
- 7.1.4. Solve initial-value and boundary-value problems involving linear differential 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

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

The ${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

where ${a}_{2}(x),$ ${a}_{1}(x),$ ${a}_{0}(x),$ and $r(x)$ are real-valued functions and ${a}_{2}(x)$ is not identically zero. If $r(x)\equiv 0$—in other words, if $r(x)=0$ for every value of *x*—the equation is said to be a homogeneous linear equation. If $r(x)\ne 0$ for some value of $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$ and its derivatives can be raised only to the first power and they may not be multiplied by one another. Terms involving ${y}^{2}$ or $\sqrt{{y}^{\prime}}$ make the equation nonlinear. Functions of $y$ and its derivatives, such as $\text{sin}\phantom{\rule{0.1em}{0ex}}y$ or ${e}^{{y}^{\prime}},$ 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.

- $y\text{\u2033}+3{x}^{4}{y}^{\prime}+{x}^{2}{y}^{2}={x}^{3}$
- $(\text{sin}\phantom{\rule{0.1em}{0ex}}x)y\text{\u2033}+(\text{cos}\phantom{\rule{0.1em}{0ex}}x){y}^{\prime}+3y=0$
- $4{t}^{2}x\text{\u2033}+3tx{x}^{\prime}+4x=0$
- $5y\text{\u2033}+y=4{x}^{5}$
- $(\text{cos}\phantom{\rule{0.1em}{0ex}}x)y\text{\u2033}-\text{sin}\phantom{\rule{0.1em}{0ex}}{y}^{\prime}+(\text{sin}\phantom{\rule{0.1em}{0ex}}x)y-\text{cos}\phantom{\rule{0.1em}{0ex}}x=0$
- $8ty\text{\u2033}-6{t}^{2}{y}^{\prime}+4ty-3{t}^{2}=0$
- $\text{sin}({x}^{2})y\text{\u2033}-(\text{cos}\phantom{\rule{0.1em}{0ex}}x){y}^{\prime}+{x}^{2}y={y}^{\prime}-3$
- $y\text{\u2033}+5x{y}^{\prime}-3y=\text{cos}\phantom{\rule{0.1em}{0ex}}y$

#### Solution

- This equation is nonlinear because of the ${y}^{2}$ term.
- This equation is linear. There is no term involving a power or function of $y,$ and the coefficients are all functions of $x\text{.}$ The equation is already written in standard form, and $r(x)$ is identically zero, so the equation is homogeneous.
- 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$ and ${x}^{\prime},$ so the equation is nonlinear. - This equation is linear. Since $r(x)=4{x}^{5},$ the equation is nonhomogeneous.
- This equation is nonlinear, because of the $\text{sin}\phantom{\rule{0.1em}{0ex}}{y}^{\prime}$ term.
- This equation is linear. Rewriting it in standard form gives

$$8{t}^{2}y\text{\u2033}-6{t}^{2}{y}^{\prime}+4ty=3{t}^{2}.$$

With the equation in standard form, we can see that $r(t)=3{t}^{2},$ so the equation is nonhomogeneous. - This equation looks like it’s linear, but we should rewrite it in standard form to be sure. We get

$$\text{sin}({x}^{2})y\text{\u2033}-(\text{cos}\phantom{\rule{0.1em}{0ex}}x+1){y}^{\prime}+{x}^{2}y=\mathrm{-3}.$$

This equation is, indeed, linear. With $r(x)=\mathrm{-3},$ it is nonhomogeneous. - This equation is nonlinear because of the $\text{cos}\phantom{\rule{0.1em}{0ex}}y$ term.

### Media

Visit this website that discusses second-order differential equations.

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

- ${(y\text{\u2033})}^{2}-{y}^{\prime}+8{x}^{3}y=0$
- $(\text{sin}\phantom{\rule{0.1em}{0ex}}t)y\text{\u2033}+\text{cos}\phantom{\rule{0.1em}{0ex}}t-3t{y}^{\prime}=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

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

#### Solution

Let $y={x}^{3}.$ Then ${y}^{\prime}=3{x}^{2}$ and $y\text{\u2033}=6x\text{.}$ Substituting into the differential equation, we see that

Show that $y=2{x}^{2}$ is a solution to the differential equation

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.

#### Superposition Principle

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

where ${c}_{1}$ and ${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

Given that ${e}^{\text{\u2212}x}$ and ${e}^{5x}$ are solutions to this differential equation, show that $4{e}^{\text{\u2212}x}+{e}^{5x}$ is a solution.

#### Solution

We have

Then

Thus, $y(x)=4{e}^{\text{\u2212}x}+{e}^{5x}$ is a solution.

Consider the differential equation

Given that ${e}^{\mathrm{-2}x}$ and ${e}^{\mathrm{-3}x}$ are solutions to this differential equation, show that $3{e}^{\mathrm{-2}x}+6{e}^{\mathrm{-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

Both ${e}^{\mathrm{-3}t}$ and $2{e}^{\mathrm{-3}t}$ are solutions (check this). However, $x(t)={c}_{1}{e}^{\mathrm{-3}t}+{c}_{2}\left(2{e}^{\mathrm{-3}t}\right)$ 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}^{\mathrm{-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\text{),\u2026,}{f}_{n}(x)$ is said to be linearly dependent if there are constants ${c}_{1},{c}_{2}\text{,\u2026}{c}_{n},$ not all zero, such that ${c}_{1}{f}_{1}(x)+{c}_{2}{f}_{2}(x)+\text{\cdots}+{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)\equiv 0$—then choose ${c}_{1}=0$ and ${c}_{2}=1,$ and the condition for linear dependence is satisfied. If, on the other hand, neither ${f}_{1}(x)$ nor ${f}_{2}(x)$ is identically zero, but ${f}_{1}(x)=C{f}_{2}(x)$ for some constant $C,$ then choose ${c}_{1}=\frac{1}{C}$ and ${c}_{2}=\mathrm{-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)$ and ${f}_{2}(x)$ are linearly independent. Then, there are constants, ${c}_{1}$ and ${c}_{2},$ not both zero, such that

for all *x* over the interval of interest. Then,

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

so one of the functions is identically zero. Now suppose ${c}_{1}\ne 0.$ Then,

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

#### Linear Dependence of Two Functions

Two functions, ${f}_{1}(x)$ and ${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)$ 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.

- ${f}_{1}(x)={x}^{2},$ ${f}_{2}(x)=5{x}^{2}$
- ${f}_{1}(x)=\text{sin}\phantom{\rule{0.1em}{0ex}}x,$ ${f}_{2}(x)=\text{cos}\phantom{\rule{0.1em}{0ex}}x$
- ${f}_{1}(x)={e}^{3x},$ ${f}_{2}(x)={e}^{\mathrm{-3}x}$
- ${f}_{1}(x)=3x,$ ${f}_{2}(x)=3x+1$

#### Solution

- ${f}_{2}(x)=5{f}_{1}(x),$ so the functions are linearly dependent.
- There is no constant
*C*such that ${f}_{1}(x)=C{f}_{2}(x),$ so the functions are linearly independent. - There is no constant
*C*such that ${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. - There is no constant
*C*such that ${f}_{1}(x)=C{f}_{2}(x),$ so the functions are linearly independent.

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

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.

#### General Solution to a Homogeneous Equation

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

where ${c}_{1}$ and ${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}^{3t}$ and ${y}_{2}(t)={e}^{\mathrm{-3}t}$ are solutions to $y\text{\u2033}-9y=0,$ what is the general solution?

#### Solution

Note that ${y}_{1}$ and ${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}^{3t}+{c}_{2}{e}^{\mathrm{-3}t}.$

If ${y}_{1}(x)={e}^{3x}$ and ${y}_{2}(x)=x{e}^{3x}$ are solutions to $y\text{\u2033}-6{y}^{\prime}+9y=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

where $a,$ $b,$ and $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}^{\lambda x},$ where $\lambda $ (the lowercase Greek letter lambda) is some constant.

If $y(x)={e}^{\lambda x},$ then ${y}^{\prime}(x)=\lambda {e}^{\lambda x}$ and $y\text{\u2033}={\lambda}^{2}{e}^{\lambda x}.$ Substituting these expressions into Equation 7.1, we get

Since ${e}^{\lambda x}$ is never zero, this expression can be equal to zero for all *x* only if

We call this the characteristic equation of the differential equation.

### Definition

The characteristic equation of the differential equation $ay\text{\u2033}+b{y}^{\prime}+cy=0$ is $a{\lambda}^{2}+b\lambda +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

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 ${\lambda}_{1}$ and ${\lambda}_{2},$ then ${e}^{{\lambda}_{1}x}$ and ${e}^{{\lambda}_{2}x}$ are linearly independent solutions to Example 7.1, and the general solution is given by

where ${c}_{1}$ and ${c}_{2}$ are constants.

For example, the differential equation $y\text{\u2033}+9{y}^{\prime}+14y=0$ has the associated characteristic equation ${\lambda}^{2}+9\lambda +14=0.$ This factors into $\left(\lambda +2\right)\left(\lambda +7\right)=0,$ which has roots ${\lambda}_{1}=\mathrm{-2}$ and ${\lambda}_{2}=\mathrm{-7}.$ Therefore, the general solution to this differential equation is

#### Single Repeated Real Root

Things are a little more complicated if the characteristic equation has a repeated real root, $\lambda \text{.}$ In this case, we know ${e}^{\lambda 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}^{\lambda x},$ where *k* is some constant, but it would not be linearly independent of ${e}^{\lambda x}.$ Therefore, let’s try $x{e}^{\lambda x}$ as the second solution. First, note that by the quadratic formula,

But, $\lambda $ is a repeated root, so ${b}^{2}-4ac=0$ and $\lambda =\frac{\text{\u2212}b}{2a}.$ Thus, if $y=x{e}^{\lambda x},$ we have

Substituting these expressions into Equation 7.1, we see that

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

where ${c}_{1}$ and ${c}_{2}$ are constants.

For example, the differential equation $y\text{\u2033}+12{y}^{\prime}+36y=0$ has the associated characteristic equation ${\lambda}^{2}+12\lambda +36=0.$ This factors into ${\left(\lambda +6\right)}^{2}=0,$ which has a repeated root $\lambda =\mathrm{-6}.$ Therefore, the general solution to this differential equation is

#### Complex Conjugate Roots

The third case we must consider is when ${b}^{2}-4ac<0.$ In this case, when we apply the quadratic formula, we are taking the square root of a negative number. We must use the imaginary number $i=\sqrt{\mathrm{-1}}$ to find the roots, which take the form ${\lambda}_{1}=\alpha +\beta i$ and ${\lambda}_{2}=\alpha -\beta i\text{.}$ The complex number $\alpha +\beta i$ is called the *conjugate* of $\alpha -\beta i\text{.}$ Thus, we see that when ${b}^{2}-4ac<0,$ the roots of our characteristic equation are always complex conjugates.

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}^{(\alpha +\beta i)x}$ and ${e}^{(\alpha -\beta 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}^{(\alpha +\beta i)x}$ and ${e}^{(\alpha -\beta 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 $\alpha \pm \beta i$ of the characteristic equation, the functions ${e}^{(\alpha +\beta i)x}$ and ${e}^{(\alpha -\beta i)x}$ are linearly independent solutions to the differential equation. and the general solution is given by

Using some smart choices for ${c}_{1}$ and ${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

for all real numbers $\theta \text{.}$

Going back to the general solution, we have

Applying Euler’s formula together with the identities $\text{cos}(\text{\u2212}x)=\text{cos}\phantom{\rule{0.1em}{0ex}}x$ and $\text{sin}(\text{\u2212}x)=\text{\u2212}\text{sin}\phantom{\rule{0.1em}{0ex}}x,$ we get

Now, if we choose ${c}_{1}={c}_{2}=\frac{1}{2},$ the second term is zero and we get

as a real-value solution to Equation 7.1. Similarly, if we choose ${c}_{1}=\text{\u2212}\frac{i}{2}$ and ${c}_{2}=\frac{i}{2},$ the first term is zero and we get

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 $\alpha \pm \beta i,$ then the general solution to Equation 7.1 is given by

where ${c}_{1}$ and ${c}_{2}$ are constants.

For example, the differential equation $y\text{\u2033}-2{y}^{\prime}+5y=0$ has the associated characteristic equation ${\lambda}^{2}-2\lambda +5=0.$ By the quadratic formula, the roots of the characteristic equation are $1\pm 2i\text{.}$ Therefore, the general solution to this differential equation is

#### 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, ${\lambda}_{1}$ and ${\lambda}_{2}$ | $y(x)={c}_{1}{e}^{{\lambda}_{1}x}+{c}_{2}{e}^{{\lambda}_{2}x}$ |

A repeated real root, $\lambda $ | $y(x)={c}_{1}{e}^{\lambda x}+{c}_{2}x{e}^{\lambda x}$ |

Complex conjugate roots $\alpha \pm \beta i$ | $y(x)={e}^{\alpha x}\left({c}_{1}\text{cos}\phantom{\rule{0.1em}{0ex}}\beta x+{c}_{2}\text{sin}\phantom{\rule{0.1em}{0ex}}\beta x\right)$ |

- Write the differential equation in the form $ay\text{\u2033}+b{y}^{\prime}+cy=0.$
- Find the corresponding characteristic equation $a{\lambda}^{2}+b\lambda +c=0.$
- Either factor the characteristic equation or use the quadratic formula to find the roots.
- 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*.

- $y\text{\u2033}+3{y}^{\prime}-4y=0$
- $y\text{\u2033}+6{y}^{\prime}+13y=0$
- $y\text{\u2033}+2{y}^{\prime}+y=0$
- $y\text{\u2033}-5{y}^{\prime}=0$
- $y\text{\u2033}-16y=0$
- $y\text{\u2033}+16y=0$

#### Solution

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

- The characteristic equation is ${\lambda}^{2}+3\lambda -4=0$ (step 2). This factors into $\left(\lambda +4\right)\left(\lambda -1\right)=0,$ so the roots of the characteristic equation are ${\lambda}_{1}=\mathrm{-4}$ and ${\lambda}_{2}=1$ (step 3). Then the general solution to the differential equation is

$$y(x)={c}_{1}{e}^{\mathrm{-4}x}+{c}_{2}{e}^{x}\phantom{\rule{0.2em}{0ex}}\text{(step 4)}\text{.}$$ - The characteristic equation is ${\lambda}^{2}+6\lambda +13=0$ (step 2). Applying the quadratic formula, we see this equation has complex conjugate roots $\mathrm{-3}\pm 2i$ (step 3). Then the general solution to the differential equation is

$$y(t)={e}^{\mathrm{-3}t}\left({c}_{1}\text{cos}\phantom{\rule{0.1em}{0ex}}2t+{c}_{2}\text{sin}\phantom{\rule{0.1em}{0ex}}2t\right)\phantom{\rule{0.2em}{0ex}}\text{(step 4)}\text{.}$$ - The characteristic equation is ${\lambda}^{2}+2\lambda +1=0$ (step 2). This factors into ${\left(\lambda +1\right)}^{2}=0,$ so the characteristic equation has a repeated real root $\lambda =\mathrm{-1}$ (step 3). Then the general solution to the differential equation is

$$y(t)={c}_{1}{e}^{\text{\u2212}t}+{c}_{2}t{e}^{\text{\u2212}t}\phantom{\rule{0.2em}{0ex}}\text{(step 4).}$$ - The characteristic equation is ${\lambda}^{2}-5\lambda $ (step 2). This factors into $\lambda \left(\lambda -5\right)=0,$ so the roots of the characteristic equation are ${\lambda}_{1}=0$ and ${\lambda}_{2}=5$ (step 3). Note that ${e}^{0x}={e}^{0}=1,$ so our first solution is just a constant. Then the general solution to the differential equation is

$$y(x)={c}_{1}+{c}_{2}{e}^{5x}\phantom{\rule{0.2em}{0ex}}\text{(step 4)}\text{.}$$ - The characteristic equation is ${\lambda}^{2}-16=0$ (step 2). This factors into $(\lambda +4)(\lambda -4)=0,$ so the roots of the characteristic equation are ${\lambda}_{1}=4$ and ${\lambda}_{2}=\mathrm{-4}$ (step 3). Then the general solution to the differential equation is

$$y(x)={c}_{1}{e}^{4x}+{c}_{2}{e}^{\mathrm{-4}x}\phantom{\rule{0.2em}{0ex}}\text{(step 4)}\text{.}$$ - The characteristic equation is ${\lambda}^{2}+16=0$ (step 2). This has complex conjugate roots $\pm 4i$ (step 3). Note that ${e}^{0x}={e}^{0}=1,$ so the exponential term in our solution is just a constant. Then the general solution to the differential equation is

$$y(t)={c}_{1}\text{cos}\phantom{\rule{0.1em}{0ex}}4t+{c}_{2}\text{sin}\phantom{\rule{0.1em}{0ex}}4t\phantom{\rule{0.2em}{0ex}}\text{(step 4)}\text{.}$$

### Checkpoint 7.6

Find the general solution to the following differential equations:

- $y\text{\u2033}-2{y}^{\prime}+10y=0$
- $y\text{\u2033}+14{y}^{\prime}+49y=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}.$ This means the system is at equilibrium, so $y({t}_{0})=0,$ and the compression of the shock absorber is not changing, so ${y}^{\prime}({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}$ and $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\text{\u2033}+3{y}^{\prime}-4y=0,$ $y(0)=1,$ ${y}^{\prime}(0)=\mathrm{-9}.$

#### Solution

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

Then

When $x=0,$ we have $y(0)={c}_{1}+{c}_{2}$ and ${y}^{\prime}(0)=\mathrm{-4}{c}_{1}+{c}_{2}.$ Applying the initial conditions, we have

Then ${c}_{1}=1-{c}_{2}.$ Substituting this expression into the second equation, we see that

So, ${c}_{1}=2$ and the solution to the initial-value problem is

Solve the initial-value problem $y\text{\u2033}-3{y}^{\prime}-10y=0,$ $y(0)=0,$ ${y}^{\prime}(0)=7.$

### Example 7.8

#### Solving an Initial-Value Problem and Graphing the Solution

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

#### Solution

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

Then

When $x=0,$ we have $y(0)={c}_{1}$ and ${y}^{\prime}(0)=2{c}_{2}-3{c}_{1}.$ Applying the initial conditions, we obtain

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

Solve the following initial-value problem and graph the solution: $y\text{\u2033}-2{y}^{\prime}+10y=0,y(0)=2,{y}^{\prime}(0)=\mathrm{-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.)

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

#### Solution

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

Then

When $t=0,$ we have $y(0)={c}_{1}$ and ${y}^{\prime}(0)=\text{\u2212}{c}_{1}+{c}_{2}.$ Applying the initial conditions, we obtain

Thus, ${c}_{1}=1,$ ${c}_{2}=1,$ and the solution to the initial value problem is

This solution is represented in the following graph. At time $t=2,$ the mass is at position $y(2)={e}^{\mathrm{-2}}+2{e}^{\mathrm{-2}}=3{e}^{\mathrm{-2}}\approx 0.406$ m below equilibrium.

To calculate the velocity at time $t=1,$ we need to find the derivative. We have $y(t)={e}^{\text{\u2212}t}+t{e}^{\text{\u2212}t},$ so

Then ${y}^{\prime}(1)=\text{\u2212}{e}^{\mathrm{-1}}\approx -0.3679.$ At time $t=1,$ the mass is moving upward at 0.3679 m/sec.

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$ sec? How fast is it moving at time $t=0.1$ sec? In what direction?

### Example 7.10

#### Solving a Boundary-Value Problem

In Example 7.6f. we solved the differential equation $y\text{\u2033}+16y=0$ and found the general solution to be $y(t)={c}_{1}\text{cos}\phantom{\rule{0.1em}{0ex}}4t+{c}_{2}\text{sin}\phantom{\rule{0.1em}{0ex}}4t\text{.}$ If possible, solve the boundary-value problem if the boundary conditions are the following:

- $y(0)=0,$ $y\left(\frac{\pi}{4}\right)=0$
- $y(0)=1,$ $y\left(\frac{\pi}{8}\right)=0$
- $y\left(\frac{\pi}{8}\right)=0,$ $y\left(\frac{3\pi}{8}\right)=2$

#### Solution

We have

- Applying the first boundary condition given here, we get $y(0)={c}_{1}=0.$ So the solution is of the form $y(t)={c}_{2}\text{sin}\phantom{\rule{0.1em}{0ex}}4t\text{.}$ When we apply the second boundary condition, though, we get $y\left(\frac{\pi}{4}\right)={c}_{2}\text{sin}\phantom{\rule{0.1em}{0ex}}\left(4\left(\frac{\pi}{4}\right)\right)={c}_{2}\text{sin}\phantom{\rule{0.1em}{0ex}}\pi =0$ for all values of ${c}_{2}.$ The boundary conditions are not sufficient to determine a value for ${c}_{2},$ so this boundary-value problem has infinitely many solutions. Thus, $y(t)={c}_{2}\text{sin}\phantom{\rule{0.1em}{0ex}}4t$ is a solution for any value of ${c}_{2}.$
- Applying the first boundary condition given here, we get $y(0)={c}_{1}=1.$ Applying the second boundary condition gives $y\left(\frac{\pi}{8}\right)={c}_{2}=0,$ so ${c}_{2}=0.$ In this case, we have a unique solution: $y(t)=\text{cos}\phantom{\rule{0.1em}{0ex}}4t\text{.}$
- Applying the first boundary condition given here, we get $y\left(\frac{\pi}{8}\right)={c}_{2}=0.$ However, applying the second boundary condition gives $y\left(\frac{3\pi}{8}\right)=\text{\u2212}{c}_{2}=2,$ so ${c}_{2}=\mathrm{-2}.$ We cannot have ${c}_{2}=0=\mathrm{-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.

$\left(1+{y}^{2}\right)y\text{\u2033}+x{y}^{\prime}-3y=\text{cos}\phantom{\rule{0.1em}{0ex}}x$

$y\text{\u2033}+\frac{4}{x}{y}^{\prime}-8xy=5{x}^{2}+1$

$y\text{\u2033}+\left(\frac{x+3}{y}\right){y}^{\prime}=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 *c*_{1} and *c*_{2}. What do the solutions have in common?

**[T]**$y\text{\u2033}+2{y}^{\prime}-3y=0;$ $y(x)={c}_{1}{e}^{x}+{c}_{2}{e}^{\mathrm{-3}x}$

**[T]**${x}^{2}y\text{\u2033}-2y-3{x}^{2}+1=0;$ $y(x)={c}_{1}{x}^{2}+{c}_{2}{x}^{\mathrm{-1}}+{x}^{2}\text{ln}\phantom{\rule{0.1em}{0ex}}(x)+\frac{1}{2}$

**[T]**$y\text{\u2033}+14{y}^{\prime}+49y=0;$ $y(x)={c}_{1}{e}^{\mathrm{-7}x}+{c}_{2}x{e}^{\mathrm{-7}x}$

**[T]**$6y\text{\u2033}-49{y}^{\prime}+8y=0;$ $y(x)={c}_{1}{e}^{x\text{/}6}+{c}_{2}{e}^{8x}$

Find the general solution to the linear differential equation.

$y\text{\u2033}-7{y}^{\prime}+12y=0$

$4y\text{\u2033}-12{y}^{\prime}+9y=0$

$3y\text{\u2033}-14{y}^{\prime}+8y=0$

$5y\text{\u2033}+2{y}^{\prime}+4y=0$

$8y\text{\u2033}+14{y}^{\prime}-15y=0$

$y\text{\u2033}-{y}^{\prime}+11y=0$

$y\text{\u2033}-6{y}^{\prime}+9y=0$

$4y\text{\u2033}-10{y}^{\prime}=0$

$25\frac{{d}^{2}y}{d{x}^{2}}-80\frac{dy}{dx}+64y=0$

$4\frac{{d}^{2}y}{d{x}^{2}}+8y=0$

Solve the initial-value problem.

$y\text{\u2033}+5{y}^{\prime}+6y=0,\phantom{\rule{2em}{0ex}}y(0)=0,\phantom{\rule{0.2em}{0ex}}\text{}\phantom{\rule{0.2em}{0ex}}{y}^{\prime}(0)=\mathrm{-2}$

$y\text{\u2033}+2{y}^{\prime}-8y=0,\phantom{\rule{2em}{0ex}}y(0)=5,\phantom{\rule{0.2em}{0ex}}\text{}\phantom{\rule{0.2em}{0ex}}{y}^{\prime}(0)=4$

$y\text{\u2033}+4y=0,\phantom{\rule{4em}{0ex}}y(0)=3,\phantom{\rule{0.2em}{0ex}}\text{}\phantom{\rule{0.2em}{0ex}}{y}^{\prime}(0)=10$

$y\text{\u2033}-18{y}^{\prime}+81y=0,\phantom{\rule{2em}{0ex}}y(0)=1,\phantom{\rule{0.2em}{0ex}}\text{}\phantom{\rule{0.2em}{0ex}}{y}^{\prime}(0)=5$

$y\text{\u2033}-{y}^{\prime}-30y=0,\phantom{\rule{2em}{0ex}}y(0)=1,\phantom{\rule{0.2em}{0ex}}\text{}\phantom{\rule{0.2em}{0ex}}{y}^{\prime}(0)=\mathrm{-16}$

$4y\text{\u2033}+4{y}^{\prime}-8y=0,\phantom{\rule{2em}{0ex}}y(0)=2,\phantom{\rule{0.2em}{0ex}}\text{}\phantom{\rule{0.2em}{0ex}}{y}^{\prime}(0)=1$

$25y\text{\u2033}+10{y}^{\prime}+y=0,\phantom{\rule{2em}{0ex}}y(0)=2,\phantom{\rule{0.2em}{0ex}}\text{}\phantom{\rule{0.2em}{0ex}}{y}^{\prime}(0)=1$

$y\text{\u2033}+y=0,\phantom{\rule{4em}{0ex}}y(\pi )=1,\phantom{\rule{0.2em}{0ex}}\text{}\phantom{\rule{0.2em}{0ex}}{y}^{\prime}(\pi )=\mathrm{-5}$

Solve the boundary-value problem, if possible.

$y\text{\u2033}+{y}^{\prime}-42y=0,\phantom{\rule{2em}{0ex}}y(0)=0,\phantom{\rule{0.2em}{0ex}}\text{}\phantom{\rule{0.2em}{0ex}}y(1)=2$

$9y\text{\u2033}+y=0,\phantom{\rule{4em}{0ex}}y(\frac{3\pi}{2})=6,\phantom{\rule{0.2em}{0ex}}\text{}\phantom{\rule{0.2em}{0ex}}y(0)=\mathrm{-8}$

$y\text{\u2033}+10{y}^{\prime}+34y=0,\phantom{\rule{2em}{0ex}}y(0)=6,\phantom{\rule{0.2em}{0ex}}\text{}\phantom{\rule{0.2em}{0ex}}y(\pi )=2$

$y\text{\u2033}+7{y}^{\prime}-60y=0,\phantom{\rule{2em}{0ex}}y(0)=4,\phantom{\rule{0.2em}{0ex}}\text{}\phantom{\rule{0.2em}{0ex}}y(2)=0$

$y\text{\u2033}-4{y}^{\prime}+4y=0,\phantom{\rule{2em}{0ex}}y(0)=2,\phantom{\rule{0.2em}{0ex}}\text{}\phantom{\rule{0.2em}{0ex}}y(1)=\mathrm{-1}$

$y\text{\u2033}-5{y}^{\prime}=0,\phantom{\rule{2em}{0ex}}y(0)=3,\phantom{\rule{0.2em}{0ex}}\text{}\phantom{\rule{0.2em}{0ex}}y(\mathrm{-1})=2$

$y\text{\u2033}+9y=0,\phantom{\rule{2em}{0ex}}y(0)=4,\phantom{\rule{0.2em}{0ex}}\text{}\phantom{\rule{0.2em}{0ex}}y\left(\frac{\pi}{3}\right)=\mathrm{-4}$

$4y\text{\u2033}+25y=0,\phantom{\rule{2em}{0ex}}y(0)=2,\phantom{\rule{0.2em}{0ex}}\text{}\phantom{\rule{0.2em}{0ex}}y(2\pi )=\mathrm{-2}$

Find a differential equation with a general solution that is $y={c}_{1}{e}^{x\text{/}5}+{c}_{2}{e}^{\mathrm{-4}x}.$

Find a differential equation with a general solution that is $y={c}_{1}{e}^{x}+{c}_{2}{e}^{\mathrm{-4}x\text{/}3}.$

For each of the following differential equations:

- Solve the initial value problem.
**[T]**Use a graphing utility to graph the particular solution.

$y\text{\u2033}+64y=0;\phantom{\rule{2em}{0ex}}y(0)=3,\phantom{\rule{1em}{0ex}}{y}^{\prime}(0)=16$

$y\text{\u2033}-2{y}^{\prime}+10y=0\phantom{\rule{2em}{0ex}}y(0)=1,\phantom{\rule{1em}{0ex}}{y}^{\prime}(0)=13$

$y\text{\u2033}+5{y}^{\prime}+15y=0\phantom{\rule{2em}{0ex}}y(0)=\mathrm{-2},\phantom{\rule{1em}{0ex}}{y}^{\prime}(0)=7$

(Principle of superposition) Prove that if ${y}_{1}(x)$ and ${y}_{2}(x)$ are solutions to a linear homogeneous differential equation, $y\text{\u2033}+p(x){y}^{\prime}+q(x)y=0,$ then the function $y(x)={c}_{1}{y}_{1}(x)+{c}_{2}{y}_{2}(x),$ where ${c}_{1}$ and ${c}_{2}$ are constants, is also a solution.

Prove that if *a, b,* and *c* are positive constants, then all solutions to the second-order linear differential equation $ay\text{\u2033}+b{y}^{\prime}+cy=0$ approach zero as $x\to \infty \text{.}$ (*Hint:* Consider three cases: two distinct roots, repeated real roots, and complex conjugate roots.)