$\newcommand{\trace}{\operatorname{tr}} \newcommand{\real}{\operatorname{Re}} \newcommand{\imaginary}{\operatorname{Im}} \newcommand{\lt}{<} \newcommand{\gt}{>} \newcommand{\amp}{&}$

## Section6.2Solving Initial Value Problems

Suppose that we have a harmonic oscillator with a discontinuous forcing term,

\begin{gather*} y'' + 2 y' + 5y = h(t)\\ y(0) = y'(0) = 0, \end{gather*}

where $h(t)$ is given by

\begin{equation*} h(t) = \begin{cases} 7 & t \lt 5 \\ 0 & t \geq 5. \end{cases} \end{equation*}

The techniques that we described in Chapter 4 are no longer sufficient to solve such an initial value problem. Yet, we can easily imagine such equations arising in physics or engineering. Fortunately, Laplace transforms forms behave very nicely with respect to derivatives. We can use Laplace transforms to transform an initial value problem into an algebraic equation. Once the algebraic equation is solved, we can use the inverse transform to obtain the solution to our original initial value problem.

### Subsection6.2.1Derivatives of Laplace Transform

Suppose that we have linear differential equation with constant coefficients

\begin{equation*} a y''(t) + b y'(t) + c y(t) = f(t) \end{equation*}

and initial conditions $y(0) = y_0$ and $y'(0) = y_0'\text{.}$ We can take the Laplace transform of both sides to obtain

\begin{equation*} a {\mathcal L}(y''(t)) + b {\mathcal L}(y'(t)) + c {\mathcal L}(y(t)) = {\mathcal L}(f(t)). \end{equation*}

Notice that we have used the fact that the Laplace transform is a linear operator (Theorem 6.1.3). To proceed further, we need to know the Laplace transform of the derivative of a function.

We can evaluate the Laplace transform of $y'$ by using integration by parts,

\begin{align*} {\mathcal L}(y')(s) & = \int_0^\infty y'(t) e^{-st} \, dt\\ & = \lim_{b \to \infty}\left[ e^{-st} y(t) \Big|_0^b + s \int_0^b y(t) e^{-st} \, dt \right]\\ & = \lim_{b \to \infty}\left[ e^{-sb} y(b) -y(0) + s {\mathcal L}(y)(s) \right]. \end{align*}

We claim that $\lim_{b \to \infty} e^{-sb} y(b) = 0\text{.}$ Since, $y$ is exponentially bounded, there exist constants $M \geq 0$ and $a$ such that $|y(t)| \leq Me^{at}\text{,}$ for all $t$ in $[0, \infty)\text{.}$ Thus,

\begin{equation*} |e^{-sb} y(b)| \leq Me^{-(s -a)b}. \end{equation*}

The right-hand side of this inequality as $b \to \infty$ for $s \gt a\text{.}$ Thus,

\begin{equation*} {\mathcal L}(y')(s) = s {\mathcal L}(y)(s) - y(0). \end{equation*}

The Laplace transform also behave nicely with respect to higher order derivatives.

###### Example6.2.3

Consider the initial value problem

\begin{align*} y'' + 7y' + 10y & = 0\\ y(0) & = 1\\ y'(0) & = 1. \end{align*}

The characteristic polynomial of $y'' + 7y' + 10y = 0$ is

\begin{equation*} r^2 + 7r + 10 = (r + 2)(r + 5), \end{equation*}

and the general solution of the differential equation must be

\begin{equation*} y(t) = c_1 e^{-2t} + c_2 e^{-5t}. \end{equation*}

Applying the initial conditions, we find that the solution to our initial value problem is

\begin{equation*} y(t) = 2 e^{-2t} - e^{-5t}. \end{equation*}

Now let us see how we can use Laplace transforms to find the solution. By Theorem 6.2.1 and Theorem 6.2.2

\begin{gather*} {\mathcal L}(y')(s) = s {\mathcal L}(y)(s) - y(0) = s Y(s) - y(0)\\ {\mathcal L}(y'')(s) = s^2 {\mathcal L}(y)(s) - sy(0) - y'(0)= s^2 Y(s) - sy(0) - y'(0). \end{gather*}

where $Y(s)$ is the Laplace transform of $y\text{.}$ If we take the Laplace transform of $y'' + 7y' + 10y\text{,}$ we have

\begin{align*} {\mathcal L}(y'' + 7y' + 10y) & = {\mathcal L}(y'') + 7{\mathcal L}(y') + 10{\mathcal L}(y)\\ & = [s^2 Y(s) - sy(0) - y'(0)] + 7[s Y(s) - y(0)] + 10Y(s)\\ & = [s^2 Y(s) - s - 1] + 7[s Y(s) - 1] + 10Y(s). \end{align*}

Since ${\mathcal L}(0)\text{,}$ we have the algebraic equation

\begin{equation*} [s^2 Y(s) - s - 1] + 7[s Y(s) - 1] + 10Y(s) = 0. \end{equation*}

Solving for $Y(s)\text{,}$ we get

\begin{equation*} Y(s) = \frac{s + 8}{s^2 + 7s + 10} = \frac{s + 8}{(s + 5)(s + 2)} = \frac{2}{s + 2} - \frac{1}{s + 5}, \end{equation*}

where we have used partial fractions to get the last expression.

Since the Laplace transform of $e^{at}$ is $1/(s - a)\text{,}$ we know that

\begin{equation*} {\mathcal L}^{-1} \left( \frac{1}{s-a}\right) = e^{at}. \end{equation*}

We can now solve our initial value problem,

\begin{equation*} y(t) = 2 e^{-2t} - e^{-5t}. \end{equation*}

Thus, our two solutions agree.

### Subsection6.2.2Discontinuous Functions

In order for the Laplace transform to be useful in solving initial value problems, we need to be able to handle discontinuous functions. If $c \geq 0\text{,}$ we define the function

\begin{equation*} u_c(t) = \begin{cases} 0 & t \lt c \\ 1 & t \geq c. \end{cases} \end{equation*}

A function of this form is called a step function or Heaviside function, named for the British engineer Oliver Heaviside. The Laplace transform of $u_c$ is given by

\begin{align*} {\mathcal L}(u_c(t))(s) & = \int_0^\infty u_c(t) e^{-st} \, dt\\ & = \int_0^c u_c(t) e^{-st} \, dt + \int_c^\infty u_c(t) e^{-st} \, dt\\ & = \int_c^\infty e^{-st} \, dt\\ & = \frac{e^{-cs}}{s}. \end{align*}
###### Example6.2.4

With this new information, we can now solve initial value problems such as

\begin{align*} y' + y& = u_3(t)\\ y(0) & = 1. \end{align*}

If we take the Laplace transform of both sides of $y' + y = u_3(t)\text{,}$ we obtain

\begin{equation*} sY(s) - y(0) + Y(s) = \frac{e^{-3s}}{s}. \end{equation*}

Using the fact that $y(0) = 1$ and solving for $Y(s)\text{,}$ we get

\begin{equation*} Y(s) = \frac{1}{s + 1} + \frac{e^{-3s}}{s(s+1)}. \end{equation*}

Therefore,

\begin{equation*} y(t) = {\mathcal L}^{-1} \left( \frac{1}{s + 1} \right) + {\mathcal L}^{-1} \left( \frac{e^{-3s}}{s(s+1)} \right). \end{equation*}

The inverse Laplace transform of the first term is

\begin{equation*} {\mathcal L}^{-1} \left( \frac{1}{s + 1} \right) = e^{-t}. \end{equation*}

To compute the Laplace transform of the second term, recall from Example 6.1.6 that if ${\mathcal L}(f) = F(s)\text{,}$ then

\begin{equation*} {\mathcal L}(u_a(t) f( t- a)) = e^{-as} F(s). \end{equation*}

Using partial fractions to obtain

\begin{equation*} \frac{1}{s(s+1)} = \frac{1}{s} - \frac{1}{s - 1}. \end{equation*}

Hence,

\begin{equation*} {\mathcal L}^{-1} \left( \frac{e^{-3s}}{s(s+1)} \right) = {\mathcal L}^{-1} \left( \frac{e^{-3s}}{s} \right) - {\mathcal L}^{-1} \left(\frac{e^{-3s}}{s+1} \right) = u_3(t) - {\mathcal L}^{-1} \left( \frac{e^{-3s}}{s+1} \right). \end{equation*}

If $g(t) = u_3(t) e^{-(t - 3)}\text{,}$ then the Laplace transform of $g(t)$ is

\begin{equation*} {\mathcal L}(g) = e^{-3s} {\mathcal L}(e^{-t}) = \frac{e^{-3s}}{s + 1}. \end{equation*}

Thus,

\begin{equation*} y(t) = e^{-t} + u_3(t)\left( 1 - e^{-(t - 3)} \right). \end{equation*}

### Subsection6.2.3Forced Harmonic Oscillators

###### Example6.2.5

Consider the forced harmonic oscillator

\begin{gather*} y'' + 4y = 3 \cos t\\ y(0) = y'(0) = 0. \end{gather*}

Taking the Laplace transform of both sides of the equation $y'' + 4y = 3 \cos t\text{,}$ we obtain

\begin{equation*} {\mathcal L}(y'') + 4 {\mathcal L}(y) = 3{\mathcal L}(\cos t) \end{equation*}

or

\begin{equation*} s^2 Y(s) - sy(0) - y'(0) + 4Y(s) = \frac{3s}{s^2 + 1}, \end{equation*}

where ${\mathcal L}(y)(s) = Y(s)\text{.}$ Substituting the initial conditions and solving for $Y\text{,}$ we have

\begin{equation*} Y(s) = \frac{3s}{(s^2 + 4)(s^2 + 1)} = \frac{-s}{s^2 + 4} + \frac{s}{s^2 + 1}, \end{equation*}

where the last expression was obtained using partial fractions. Taking the inverse Laplace transform, we have our solution

\begin{equation*} y(t) = {\mathcal L}^{-1} \left( \frac{-s}{s^2 + 4} \right) + {\mathcal L}^{-1} \left( \frac{s}{s^2 + 1} \right) = -\cos 2t + \cos t. \end{equation*}
###### Example6.2.6

Now let us consider a harmonic oscillator with discontinuous forcing,

\begin{gather*} y'' + 2 y' + 5y = h(t)\\ y(0) = y'(0) = 0, \end{gather*}

where $h(t)$ is given by

\begin{equation*} h(t) = \begin{cases} 5 & t \lt 7 \\ 0 & t \geq 7. \end{cases} \end{equation*}

That is, $h(t) = 5 (1 - u_7(t))\text{.}$

We may consider this to be a mass-spring system sliding on a table, where the mass is one unit, the spring constant is 5, and the damping coefficient is 2. When $t \lt 7$ the table is tilted so that gravity provides a force of 5 units when stretching the spring. At time $t = 7\text{,}$ the table is suddenly returned to the level position.

Taking the Laplace transform of both sides of $y'' + 2 y' + 5y = h(t)\text{,}$ we obtain

\begin{equation*} [s^2 Y(s) -sy(0) - y'(0)] + 2 [sY(s) - y(0)] + 5Y(s) = {\mathcal L}(h), \end{equation*}

where ${\mathcal L}(y)(s) = Y(s)\text{.}$ Substituting the initial conditions and evaluating the Laplace transform on the right, we have

\begin{equation*} (s^2 + 2s + 5)Y(s) = 5 \left( \frac{1}{s} - \frac{e^{-7s}}{s} \right). \end{equation*}

Solving for $Y(s)\text{,}$ we have

\begin{equation*} Y(s) = \frac{5}{s(s^2 + 2s + 5)} - \frac{5e^{-7s}}{s(s^2 + 2s + 5)} \end{equation*}

and

\begin{equation*} y = {\mathcal L}^{-1} \left( \frac{5}{s(s^2 + 2s + 5)} - \frac{5e^{-7s}}{s(s^2 + 2s + 5)} \right). \end{equation*}

Using partial fractions, we can rewrite the first term as

\begin{equation*} \frac{5}{s(s^2 + 2s + 5)} = \frac{1}{s} - \frac{s + 2}{s^2 + 2s + 5}. \end{equation*}

The inverse Laplace transform of $1/s$ is 1. To find the inverse Laplace transform of the second term, we complete the square of the denominator,

\begin{align*} \frac{s + 2}{s^2 + 2s + 5} & = \frac{s + 2}{(s+ 1)^2 + 4}\\ & = \frac{s + 1}{(s+ 1)^2 + 4} + \frac{1}{(s+ 1)^2 + 4}\\ & = \frac{s + 1}{(s+ 1)^2 + 4} + \frac{1}{2} \frac{2}{(s+ 1)^2 + 4}. \end{align*}

Consequently,

\begin{equation*} {\mathcal L}^{-1} \left( \frac{s + 2}{s^2 + 2s + 5} \right) = e^{-t} \cos 2t + \frac{1}{2} e^{-t} \sin 2t = e^{-t} \left( \cos 2t + \frac{1}{2} \sin 2t \right). \end{equation*}

and

\begin{equation*} {\mathcal L}^{-1} \left( \frac{5}{s(s^2 + 2s + 5)} \right) = {\mathcal L}^{-1} \left( \frac{1}{s} - \frac{s + 2}{s^2 + 2s + 5} \right) = 1 - e^{-t} \left( \cos 2t + \frac{1}{2} \sin 2t \right). \end{equation*}

We can compute the inverse Laplace transform of

\begin{equation*} \frac{5e^{-7s}}{s(s^2 + 2s + 5)} \end{equation*}

using the Heaviside function $u_7(t)$ and the inverse Laplace transform that we just calculated to obtain

\begin{equation*} {\mathcal L}^{-1} \left( \frac{5e^{-7s}}{s(s^2 + 2s + 5)} \right) = u_7(t) \left( 1 - e^{-(t-7)} \left( \cos 2(t - 7) + \frac{1}{2} \sin 2(t - 7) \right) \right). \end{equation*}

Therefore, the solution to our original initial value problem is

\begin{equation*} y(t) = 1 - e^{-t} \left( \cos 2t + \frac{1}{2} \sin 2t \right) - u_7(t) \left( 1 - e^{-(t-7)} \left( \cos 2(t - 7) + \frac{1}{2} \sin 2(t - 7) \right) \right). \end{equation*}

### Subsection6.2.4Important Lessons

• If $c \geq 0\text{,}$ we define the Heaviside function to be
\begin{equation*} u_c(t) = \begin{cases} 0 & t \lt c \\ 1 & t \geq c. \end{cases} \end{equation*}
The Laplace transform of $u_c$ is
\begin{equation*} {\mathcal L}(u_c(t))(s) = \frac{e^{-cs}}{s}. \end{equation*}
• Let $y = y(t)$ be a piecewise continuous, exponentially bounded function and assume that $y'$ is also exponentially bounded. Then for large values of $s$
\begin{equation*} {\mathcal L}(y')(s) = s {\mathcal L}(y)(s) - y(0) = s Y(s) - y(0), \end{equation*}
where $Y(s)$ is the Laplace transform of $y\text{.}$
• Let $y = y(t)$ and $y'(t)$ be piecewise continuous, exponentially bounded functions and assume that $y''$ is exponentially bounded. Then for large values of $s$
\begin{equation*} {\mathcal L}(y'')(s) = s^2 {\mathcal L}(y)(s) - sy(0) - y'(0)= s^2 Y(s) - sy(0) - y'(0), \end{equation*}
where $Y(s)$ is the Laplace transform of $y\text{.}$ In general, if $y = y(t)$ and all of its derivatives up to order $k - 1$ are piecewise continuous, exponentially bounded functions and $y^{(k)}$ is piecewise continuous, then
\begin{gather*} {\mathcal L}(y^{(k)})(s) = s^k {\mathcal L}(y)(s) - s^{k - 1}y(0) - \cdots - s y^{(k -2)}(0) - y^{(k -1)}(0)\\ = s^k Y(s) - s^{k - 1}y(0) - s^{k - 1}y(0)- \cdots - s y^{(k -2)}(0) - y^{(k -1)}(0). \end{gather*}

### SubsectionExercises

###### 1

Find the solution of the initial value problem

\begin{gather*} 2 y'' + y' + 2y = 0\\ y(0) = y'(0) = 0 \end{gather*}

using the Laplace transform.

###### 2

Find the solution of the initial value problem

\begin{gather*} 2 y'' + y' + 2y = g(t)\\ y(0) = y'(0) = 0 \end{gather*}

where $g(t)$ is defined by

\begin{equation*} g(t) = u_5(t) - u_{20}(t) = \begin{cases} 1, & 5 \leq t \lt 20, \\ 0, & 0 \leq t \lt 5 \text{ and } t \geq 20. \end{cases} \end{equation*}
###### 3

Let $y = y(t)$ and $y'(t)$ be piecewise continuous, exponentially bounded functions and assume that $y''$ is exponentially bounded.

1. Prove that
\begin{equation*} {\mathcal L}(y'')(s) = s^2 {\mathcal L}(y)(s) - sy(0) - y'(0)= s^2 Y(s) - sy(0) - y'(0) \end{equation*}
for large values of $s\text{,}$ where $Y(s)$ is the Laplace transform of $y\text{.}$
2. If $y = y(t)$ and all of its derivatives up to order $k - 1$ are piecewise continuous, exponentially bounded functions and $y^{(k)}$ is piecewise continuous, prove that
\begin{gather*} {\mathcal L}(y^{(k)})(s) = s^k {\mathcal L}(y)(s) - s^{k - 1}y(0) - \cdots - s y^{(k -2)}(0) - y^{(k -1)}(0)\\ = s^k Y(s) - s^{k - 1}y(0) - s^{k - 1}y(0)- \cdots - s y^{(k -2)}(0) - y^{(k -1)}(0). \end{gather*}