Skip to main content

Section 12.1 Homogeneous Second Order Linear DEs With Constant Coefficients

Guess solutions to the following homogeneous second order linear DEs with constant coefficients.

  1. \(\displaystyle y''=0. \)

  2. \(\displaystyle y''-y=0 \)

Answer.
  1. \(\displaystyle y(x)=Ax+B, \; A,B\in \mathbb{R}\)

  2. \(\displaystyle y(x)=Ae^{x}+Be^{-x}, \; A,B\in \mathbb{R} \)

Solution.
  1. What function has its second derivative zero (i.e. has zero curvature)? Clearly any linear function satisfies this property and so we guess that the general solution to this DE is

    \begin{equation*} y(x)=Ax+B, \; A,B\in \mathbb{R} \end{equation*}
  2. This DE can be rewritten as

    \begin{equation*} y''=y. \end{equation*}

    The solution, then, is any function that has its second derivative equal to the function itself. This is a property of any of the exponential functions

    \begin{equation*} y(x)=Ae^{x}. \end{equation*}

    It is also a property of the exponential functions

    \begin{equation*} y(x)=Be^{-x}. \end{equation*}

    Thus every function of the form

    \begin{equation*} y(x)=Ae^{x}+Be^{-x}, \; A,B\in \mathbb{R} \end{equation*}

    will be a solution to the DE.

Before looking at the method for solving a homogeneous second order linear DE with constant coefficients, i.e. a DE of the form

\begin{equation} ay''+by'+cy=0,\;\;\;\; a\neq 0, b,c\in \mathbb{R}, \label{homogeneous_2_order_constant_coefficients}\tag{12.1.1} \end{equation}

there are several things that we can predict about the solution, (based on Example 12.1.1 and previous lectures):

  • The general solution will be a family of functions involving two parameters.

  • The exponential function is a likely candidate for a solution.

Notice also that if both \(y_{1}(x) \) and \(y_{1}(x) \) are solutions to (12.1.1) then so will be \(y(x)=A y_{1}(x)+B y_{2}(x) \) where \(A \) and \(B \) are arbitrary constants. To see this, let \(y_{1}(x) \) and \(y_{2}(x) \) be solutions to (12.1.1), i.e.

\begin{align*} ay''_{1}+by'_{1}+cy_{1} \amp =0, \\ ay''_{2}+by'_{2}+cy_{2} \amp =0. \end{align*}

Now let

\begin{equation*} y(x) = A y_{1}(x) + B y_{2}(x). \end{equation*}

Then

\begin{align*} y'(x) \amp = A y'_{1}(x) + B y'_{2}(x), \\ y''(x) \amp = A y''_{1}(x) + B y''_{2}(x). \end{align*}

Substituting into (12.1.1) gives:

\begin{align*} LHS \amp = ay + by +cy \\ \amp = a(A y''_{1}(x) + B y''_{2}(x)) + b(A y'_{1}(x) + B y'_{2}(x)) +c(A y_{1}(x) + B y_{2}(x)) \\ \amp = A(ay''_{1}+by'_{1}+cy_{1}) + B(ay''_{2}+by'_{2}+cy_{2}) \\ \amp = 0 \end{align*}

These observations, along with the following theorem, enable us to develop a method of solution for DEs of the form (12.1.1).

Note: The proof of this theorem is beyond the scope of this course.

Given that \(y=e^{x},\; y=e^{-x}, \; y=\sinh(x), \text{ and } y=\cosh(x) \) are all solutions to the DE

\begin{equation*} y''-y=0 \end{equation*}

write down a general solution to this DE.

Solution.

From the above theorem, since none of these solutions are constant multiples of each other, any pair of them can be combined to form a general solution to the DE. Thus possible general solutions could be

\begin{align*} y_{1}(x) \amp = A e^{x} + B e^{-x}, \\ y_{2}(x) \amp = A \sinh(x) + B \cosh(x), \\ y_{3}(x) \amp = A e^{x} + B \cosh(x). \end{align*}

and so on.

Recall that a general solution to the DE contains every solution to the DE. For example consider the particular solution

\begin{equation*} y(x) = 2 \sinh(x) - 3 \cosh(x). \end{equation*}

This solution belongs to the general solution \(y_{2}(x) \) with \(A=2 \; \text{and}\; B=-3. \) It also belongs to the general solution \(y_{1}(x) \) with \(A=-\frac{1}{2} \; \text{and}\; B=-\frac{5}{2}. \) and to the general solution \(y_{3}(x) \) with \(A=2 \; \text{and}\; B=-5. \)

Thus, initially at least, our method for trying to find the solutions to (12.1.1) is to try to find two different exponential functions that satisfy the DE and then combine them to obtain a general solution. To this end, let

\begin{equation} y(x)=e^{rx}\label{y_equal_e_to_rx}\tag{12.1.2} \end{equation}

where \(r \) is some, as yet unspecified, constant. Since \(y'=e^{rx}, \; \text{and}, y''=r^{2}e^{rx} \) for this to be a solution of (12.1.1) we have

\begin{align*} a (r^{2} e^{rx}) + b(r e^{rx}) + c(e^{ex}) \amp =0, \\ (ar^{2} + br + c) e^{ex} \amp =0. \end{align*}

Since \(e^{rx}\neq 0 \) for any value of \(r \) or \(x \) we conclude that (12.1.2) is a solution of (12.1.1) when

\begin{equation} ar^{2}+br+c=0.\label{characteristic_equation}\tag{12.1.3} \end{equation}

(12.1.3) is called the characteristic equation for a DE of the form of (12.1.1)).

If the characteristic equation (12.1.3)) has two real solutions (i.e. \(b^{2}-4ac>0 \)) then we are done since we will have found two solutions to (12.1.1) and, via the given theorem, we can combine these solutions to produce a general solution to (12.1.1). So if the solutions to the characteristic equation are \(r_{1} \) and \(r_{2} \) say, then the general solution to (12.1.1) is

\begin{equation*} y(x)=Ae^{r_{1}x} + Be^{r_{1}x}. \end{equation*}

Find the general solution to \(y''+3y'+2y=0. \)

Answer.

\(y(x)=A e^{-x} + B e^{-2 x}.\)

Solution.

The characteristic equation for this homogeneous second order linear DE with constant coefficients is

\begin{equation*} r^{2}+3r+2=0 \end{equation*}

which has solutions

\begin{equation*} r=-1,\; -2. \end{equation*}

Thus the general solution to the DE is

\begin{equation*} y(x)=A e^{-x} + B e^{-2 x}. \end{equation*}

If the characteristic equation (12.1.3) has only one real solution (i.e. \(b^{2}-4ac=0\)) then we will have found only one exponential solution to (12.1.1) , i.e.

\begin{equation} y(x)=e^{rx}\; \text{where}\; r=-\frac{b}{2a}.\label{y_equal_e__power_rx}\tag{12.1.4} \end{equation}

To find a general solution we have to find another solution (that is not a constant multiple (12.1.1)). It turns out that another solution to (12.1.3) can be found by trying a function of the form

\begin{equation} y(x)=f(x) e^{rx},\; r=-\frac{b}{2a}.\label{y_equal_fx_e__power_rx}\tag{12.1.5} \end{equation}

Differentiating \(y \) and substituting into (12.1.1) gives

\begin{align*} a e^{rx} (r^{2}f(x)+2r f'(x)+f''(x)) + be^{rx}(rf(x) + f'(x)) + c f(x) e^{rx} \amp =0, \\ f(x) e^{rx} (ar^{2} + br + c) + f'(x) e^{rx}(2ar+b) + f''(x) e^{rx} \amp =0. \end{align*}

Since \(ar^{2}+br+c=0, \; 2ar+b=0 \) and \(e^{rx}\neq 0, \) (12.1.5) is a solution when

\begin{equation} f''(x)=0.\label{ftwo_order_derivative_equal_zero}\tag{12.1.6} \end{equation}

Clearly \(f(x)=1 \) satisfies (12.1.6) but this just gives us solution (12.1.4). also satisfies (12.1.6) and gives us a solution that is not a constant multiple of (12.1.4). Thus a general solution to (12.1.1) will be

\begin{equation*} y(x)=(Ax+B)e^{rx},\; r=-\frac{b}{2a}. \end{equation*}

Find the general solution to \(y''-4y'+4=0. \)

Answer.

\(y(x)=Ae^{2x} + Bxe^{2x}.\)

Solution.

The characteristic equation for this DE is

\begin{equation*} r^{2}-4r+4=0 \end{equation*}

which has only the one real solution

\begin{equation*} r=2. \end{equation*}

Thus the general solution to the DE is

\begin{equation*} y(x)=Ae^{2x} + Bxe^{2x}. \end{equation*}

The final case to consider is that the characteristic equation (12.1.3) has complex roots, say

\begin{equation*} r=\alpha\pm i\beta . \end{equation*}

Even though we are looking for real solutions, for the moment let us consider the "complex solutions"

\begin{equation*} y_1(x)=e^{(\alpha+i\beta)x} \text{ and } y_2(x)=e^{(\alpha-i\beta)x}\text{.} \end{equation*}

Using Euler's formula

\begin{equation*} e^{i\theta}=\cos(\theta)+i\sin(\theta) \end{equation*}

we can write these complex solutions as

\begin{align*} y_{1}(x) \amp =e^{\alpha x} e^{i \beta x} =e^{\alpha x} (\cos(\beta x) + i\sin(\beta x)), \\ y_{2}(x) \amp =e^{\alpha x} e^{-i \beta x} =e^{\alpha x} (\cos(\beta x) - i\sin(\beta x)). \end{align*}

Adding constant multiples of two solutions gives another solution. Now

\begin{align*} y_{3}(x) \amp =\frac{1}{2} y_{1}(x) + \frac{1}{2} y_{2}(x) \\ \amp =e^{\alpha x} \cos(\beta x) \end{align*}

and

\begin{align*} y_{4}(x) \amp =\frac{i}{2} y_{1}(x) - \frac{i}{2} y_{2}(x) \\ \amp =e^{\alpha x} \sin(\beta x) \end{align*}

which are both real. We can check that functions are indeed solutions to (12.1.1) and so we have found two real solutions to (12.1.1) that aren’t constant multiples of each other. Thus, in the case that the characteristic equation has complex roots the general solution to the DE is

\begin{equation*} y(x)=Ae^{\alpha x}\cos(\beta x) + B e^{\alpha x}\sin(\beta x). \end{equation*}

Find the general solution to \(y''-4y'+13y=0. \)

Answer.

\(y(x)=Ae^{2 x}\cos(3 x) + B e^{2 x}\sin(3 x).\)

Solution.

The characteristic equation for this homogeneous second order linear DE with constant coefficients is

\begin{equation*} r^{2}-4r+13=0 \end{equation*}

which has the complex solutions

\begin{equation*} r=2\pm 3i. \end{equation*}

Thus the general solution to the DE is

\begin{equation*} y(x)=Ae^{2 x}\cos(3 x) + B e^{2 x}\sin(3 x). \end{equation*}

The above discussion can be summarised as follows.

Given that the general solution to a second order DE has two arbitrary constants in order to find a particular solution it is necessary to give two conditions. In an initial-value problem the conditions given are the values of \(y \) and \(y' \) at the same value of \(x \text{,}\) usually \(x=0. \) In a boundary-value problem the conditions given are the values of \(y \) at two different values of \(x. \) Even when we have a general solution to the DE, it may not always be possible to satisfy a given set of boundary-value conditions.

Solve the initial-value problem

\begin{equation*} 4y''-3y'-y=0, \end{equation*}
\begin{equation*} y(0)=3,\; y'(0)=0. \end{equation*}
Answer.

\(y(x) = \dfrac{12}{5} e^{-\frac{x}{4}} + \dfrac{3}{5} e^{x}.\)

Solution.

The DE is a homogeneous second order linear DE with constant coefficients. The characteristic equation then is

\begin{equation*} 4r^{2}-3r-1=0. \end{equation*}

Since this equation has two real solutions,

\begin{equation*} r=-\frac{1}{4},\, 1 \end{equation*}

the general solution is

\begin{equation*} y(x) = A e^{-\frac{x}{4}} + B e^{x}. \end{equation*}

Thus

\begin{equation*} y'(x) = -\frac{1}{4} A e^{-\frac{x}{4}} + B e^{x}. \end{equation*}

Using the initial conditions gives the equations.

\begin{align*} A + B \amp = 3 \\ -\frac{1}{4} A + B \amp = 0. \end{align*}

Solving these simultaneously gives

\begin{equation*} A=\frac{12}{5},\; B=\frac{3}{5}. \end{equation*}

Thus the solution to the initial-value problem is

\begin{equation*} y(x) = \frac{12}{5} e^{-\frac{x}{4}} + \frac{3}{5} e^{x}. \end{equation*}

This solution is shown in Figure 12.1.9. Note that since \(r_{1}=-\frac{1}{4} < 0 \) the term in the general solution associated with this root (i.e. \(\frac{12}{5} e^{-\frac{x}{4}} \)) decays as \(x\to \infty. \) On the other hand since \(r_{2}=1 > 0 \) the term in the general solution associated with this root (i.e. \(\frac{3}{5} e^{x} \)) grows as \(x\to \infty. \)

Figure 12.1.9.

Solve the boundary-value problem

\begin{equation*} 4y''-6y'+25y=0, \end{equation*}
\begin{equation*} y(0)=1,\; y\left(\frac{\pi}{8}\right)=2. \end{equation*}
Answer.

\(y(x)=e^{3x} ( \cos(4 x) + 2 e^{-\frac{3\pi}{8}} \sin(4 x)).\)

Solution.

The characteristic equation is

\begin{equation*} r^{2}-6r+25=0, \end{equation*}

which has the complex solutions

\begin{equation*} r=3\pm 4i. \end{equation*}

Thus the general solution is

\begin{equation*} y(x)=e^{3x} (A \cos(4 x) + B \sin(4 x)). \end{equation*}

Using the boundary conditions gives the equations

\begin{align*} A \amp = 1, \\ B e^{\frac{3\pi}{8}} \amp = 2. \end{align*}

Thus the solution to the boundary-value problem is

\begin{equation*} y(x)=e^{3x} ( \cos(4 x) + 2 e^{-\frac{3\pi}{8}} \sin(4 x)). \end{equation*}

This graph of this function is shown in Figure 12.1.11. Note that when the characteristic equation has complex roots, \(r=\alpha\pm\beta i\) the solutions the homogeneous second order linear DE with constant coefficients will be periodic in nature with frequency \(\beta\text{.}\) Further, if \(\alpha > 0\) then the oscillations will grow as \(x\to \infty \) whereas if \(\alpha < 0\) the oscillations will decay as \(x\to \infty. \) In this case \(\alpha =3\) and hence the oscillations increase in amplitude.

Figure 12.1.11.

Exercises Example Tasks

1.

If \(x=x(t) \) find the solution to the initial-value problem

\begin{equation*} 15x''-16x'+4x=0 \end{equation*}
\begin{equation*} x(0)=1,\; x'(0)=3. \end{equation*}

2.

Find the solution to the boundary-value problem

\begin{equation*} y''+6y'+9y=0 \end{equation*}
\begin{equation*} y(1)=0,\; y'(2)=3. \end{equation*}

3.

Describe the long term behaviour of the solutions to the DE

\begin{equation*} p''(t)=-9p(t). \end{equation*}

4.

Use the substitution \(x=e^{z}. \) to solve the DE

\begin{equation*} x^{2}\frac{d^{2}y}{dx^{2}} + 3x\frac{dy}{dx} + 2y = 0,\; (x > 0). \end{equation*}