The Ordinary Differential Equations Project

Section6.2Solving Initial Value Problems

There is no need for Laplace transforms when solving many initial value problems. If we consider the initial value problem
\begin{align*} y'' + 7y' + 10y & = 0\\ y(0) & = 1\\ y'(0) & = 1, \end{align*}
the methods described in Chapter 4 work quite well. 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*}
However, 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*}
None of the previous techniques that we described are 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.1Laplace Transforms of the Derivative

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.
We can use Theorem 6.2.1 and Theorem 6.2.2 to solve initial value problems.
Consider the initial value problem
\begin{align*} y'' + 7y' + 10y & = 0\\ y(0) & = 1\\ y'(0) & = 1. \end{align*}
\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*}
and our solution agrees with the one that we found at the beginning of this section.

Activity6.2.1.Solving Linear Differential Equations with Laplace Transforms.

Use Laplace Transforms to solve each of the following initial value problems.
(a)
$$x' - 5x = e^{5t}\text{,}$$ $$x(0) = 0$$
(b)
$$x'' - x' - 6x = 0\text{,}$$ $$x(0) = 2\text{,}$$ $$x'(0) = -1$$
(c)
$$x'' + 4x = \sin 3t\text{,}$$ $$x(0) = 0\text{,}$$ $$x'(0) = 0$$

Subsection6.2.2Discontinuous Functions

If $$c \geq 0$$ and we define the function
\begin{equation*} u_c(t) = \begin{cases} 0 & t \lt c \\ 1 & t \geq c, \end{cases} \end{equation*}
recall that the Laplace transform of $$u_c$$ is given by
\begin{equation*} {\mathcal L}(u_c(t))(s) = \int_0^\infty u_c(t) e^{-st} \, dt = \frac{e^{-cs}}{s}. \end{equation*}
We can use this inforamtion to solve initial value problems with discontinuous functions.
Consider the initial value problem
\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 inverse Laplace transform of the second term, recall from Example 6.1.7 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

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*}
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*}

Activity6.2.2.Solving Differential Equations with Laplace Transforms with Discontinuous Forcing Functions.

Use Laplace Transforms to solve each of the following initial value problems.
(a)
$$x' + x = u_3(t)\text{,}$$ $$x(0) = 2$$
(b)
$$x'' + x = h(t)\text{,}$$ $$x(0) = 0\text{,}$$ $$x'(0) = 0$$ where
\begin{equation*} h(t) = \begin{cases} 0 & t \lt 1 \\ 2 & t \geq 1. \end{cases} \end{equation*}

Subsection6.2.4Important Lessons

• Using the Laplace transform including how the transform behaves, we can solve initial value problems such as
\begin{align*} a y''(t) + b y'(t) + c y(t) \amp = f(t)\\ y(0) \amp = y_0\\ y'(0) \amp = y'_0 \end{align*}
even when $$f(t)$$ is discontinuous.
• 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*}

1.

Describe in your own words how the Laplace transform can be used to solve an initial value problem.

2.

Explain what an exponentially bounded function is. Give an example.

Exercises6.2.6Exercises

Solving Initial Value Problems.

Solve the initial problems in Exercise Group 6.2.6.1–8 using the Laplace transform.
1.
$$y'' - 2y' - 3y = 3 e^{2t}\text{,}$$ $$y(0) = 1\text{,}$$ $$y'(0) = 0$$
2.
$$y'' - y' - 2y = 4x^2\text{,}$$ $$y(0) = -1\text{,}$$ $$y'(0) = 1$$
3.
$$\dfrac{d^2x}{dx^2} - 6 \dfrac{dx}{dt} + 25 x = 64e^{-t}\text{,}$$ $$x(0) = 1\text{,}$$ $$x'(0) = -2$$
4.
$$y'' + 16y = 2 \sin 2t\text{,}$$ $$y(0) = 1\text{,}$$ $$y'(0) = 0$$
5.
$$y'' + 16y = 2 \sin 4t\text{,}$$ $$y(0) = 1\text{,}$$ $$y'(0) = 0$$
6.
$$y'' + 2y' + y = 2e^{-t}\text{,}$$ $$y(0) = -1\text{,}$$ $$y'(0) = 3$$
7.
$$y'' + 6y' + 8y = \cos 3t\text{,}$$ $$y(0) = -2\text{,}$$ $$y'(0) = 1$$
8.
$$u'' + \omega_0^2 y = \cos \omega t\text{,}$$ $$\omega^2 \neq \omega_0^2\text{,}$$ $$u(0) = 1\text{,}$$ $$u'(0) = -1$$

9.

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*}

10.

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*}

12.

Let $$f(t)$$ be a peicewise continuous function for $$t \geq 0\text{.}$$ In addition, suppose that $$f(t)$$satisfies the condition $$|f(t)| \leq M e^{ct}$$ with $$t \geq 0\text{.}$$
1. Prove that
\begin{equation*} {\mathcal L} \left( \int_0^t f(\tau) \, d\tau \right) = \frac{1}{s} {\mathcal L}(f(t) = \frac{F(s)}{s}. \end{equation*}
2. Show that
\begin{equation*} {\mathcal L}^{-1} \left( \frac{F(s)}{s} \right) = \int_0^t f(\tau) \, d\tau \end{equation*}
follows from (a).