Skip to main content
\(\newcommand{\trace}{\operatorname{tr}} \newcommand{\real}{\operatorname{Re}} \newcommand{\imaginary}{\operatorname{Im}} \newcommand{\lt}{<} \newcommand{\gt}{>} \newcommand{\amp}{&} \)

Section6.2Solving Initial Value Problems

Subsection6.2.1The Inverse Laplace Transform

As we mentioned in the previous section, we can use Laplace transforms to help us solve initial value problems. The idea is to convert an initial value problem into an algebraic equation. Consider \begin{align*} y'' - y' - 6y & = 0\\ y(0) & = 2\\ y'(0) & = -1, \end{align*} and recall that \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 both sides of the equation \(y'' - y' - 6y = 0\text{,}\) we have \begin{align*} {\mathcal L}(y'' - y' - 6y) & = {\mathcal L}(y'') - {\mathcal L}(y') - 6{\mathcal L}(y)\\ & = [s^2 Y(s) - sy(0) - y'(0)] - [s Y(s) - y(0)] - 6Y(s)\\ & = [s^2 Y(s) - 2 s + 1] - [s Y(s) - 2] - 6Y(s)\\ & = {\mathcal L}(0) = 0. \end{align*} Solving for \(Y(s)\text{,}\) we get \begin{equation*} Y(s) = \frac{2s -3}{(s - 3)(s + 2)} = \frac{3/5}{s - 3} + \frac{7/5}{s + 2}, \end{equation*} where we have used partial fractions to get the last expression. If we know the Laplace transform of a function, we can recover the original function. We state the following theorem without proof.

It now makes sense to define the inverse Laplace transform of a function \(F(s)\text{,}\) which we will denote by \({\mathcal L}^{-1}(F(s))(t)\text{,}\) as the function \(f(t)\) whose unique Laplace transform is \(F(s)\text{.}\) Furthermore, the inverse Laplace transform is linear, \begin{equation*} {\mathcal L}^{-1} ( \alpha F + \beta G ) = \alpha {\mathcal L}^{-1}(F) + \beta {\mathcal L}^{-1} ( G). \end{equation*}

We can now solve our initial value problem. 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*} and the solution that we seek is \begin{equation*} y(t) = \frac{3}{5} e^{3t} + \frac{7}{5} e^{-2t}. \end{equation*} Of course, there are much easier methods that we can use if we would like to solve this particular initial value problem, but it is nice to see that the two methods agree.

Subsection6.2.2A Table of Laplace Transforms

To use the method of Laplace transforms effectively, we need either tables or computer software such as Sage so that we can easily find Laplace transforms and inverse Laplace transforms.

\(f(t) = {\mathcal L}^{-1}(F(s))\) \(F(s) = {\mathcal L}(f(t))\)
1 \(1/s\text{,}\) \(s \gt 0\)
\(e^{at}\) \(1/(s - a)\text{,}\) \(s \gt a\)
\(t^n\text{,}\) \(n \in {\mathbb N}\) \(n!/s^{n+1}\text{,}\) \(s \gt 0\)
\(t^a\text{,}\) \(a > -1\) \(\Gamma(a + 1)/s^{a + 1}\text{,}\) \(s \gt 0\)
\(\sin at\) \(a/(s^2 + a^2)\text{,}\) \(s \gt 0\)
\(\cos at\) \(s/(s^2 + a^2)\text{,}\) \(s \gt 0\)
\(\sinh at\) \(a/(s^2 - a^2)\text{,}\) \(s \gt |a|\)
\(\cosh at\) \(s/(s^2 - a^2)\text{,}\) \(s \gt |a|\)
\(e^{at} \sin bt\) \(b/[(s-a)^2 + b^2]\text{,}\) \(s \gt a\)
\(e^{at} \cos bt\) \((s-a)/[(s-a)^2 + b^2]\text{,}\) \(s \gt a\)
\(t^n e^{at}\text{,}\) \(n \in {\mathbb N}\) \(n!/(s - a)^{n + 1}\text{,}\) \(s \gt a\)
\(u_c(t)\) \(e^{-cs}/ s\text{,}\) \(s \gt 0\)
\(u_c(t) f(t - c)\) \(e^{-cs} F(s)\)
\(e^{ct} f(t)\) \(F(s - c)\)
\(f(ct)\) \((1/c) F(s/c)\text{,}\) \(c \gt 0\)
\(\delta(t - c)\) \(s^2 F(s) - sf(0) - f'(0)\)
\(f'(t)\) \(s^2 F(s) - sf(0) - f'(0)\)
\(f''(t)\) \(s^2 F(s) - sf(0) - f'(0)\)
Table6.5Table of Laplace Transforms

Subsection6.2.3Discontinuous 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*}

With this new information, we can now solve initial value problems such as \begin{align*} y' & = -y + u_3(t)\\ y(0) & = 2. \end{align*} Notice that we can rewrite the equation \(y' = -y + u_3(t)\) as \begin{equation*} y' = \begin{cases} -y & t \lt 3 \\ -y + 1 & t \geq 3. \end{cases} \end{equation*}

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) = 2\) and solving for \(Y(s)\text{,}\) we get \begin{equation*} Y(s) = \frac{2}{s + 1} + \frac{e^{-3s}}{s(s+1)}. \end{equation*} Therefore, \begin{equation*} y(t) = {\mathcal L}^{-1} \left( \frac{2}{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{2}{s + 1} \right) = 2e^{-t}; \end{equation*} however, further investigation is needed to determine the inverse Laplace transform of the second term.

Given a function \(f(t)\text{,}\) consider the new function \begin{equation*} g(t) = u_c(t) f( t- c). \end{equation*} To obtain the function \(g\) from \(f\text{,}\) we shift the graph of the \(f\) to the right by \(c\) units and let \(g(t) = 0\) for \(0 \leq t \lt c\text{.}\) Let us compute the Laplace transform of \(g\text{,}\) \begin{equation*} {\mathcal L}(g) = \int_0^\infty g(t) e^{-st} \, dt =\int_c^\infty f(t - c) e^{-st} \, dt. \end{equation*} If we make the substitution \(u = t - c\text{,}\) then \begin{equation*} {\mathcal L}(g) = \int_0^\infty f(u) e^{-s(u+c)} \, dt = e^{-sc} \int_0^\infty f(u) e^{-su} \, dt = e^{-sc} {\mathcal L}(f). \end{equation*} In other words, if \({\mathcal L}(f) = F(s)\text{,}\) then \({\mathcal L}(u_c(t) f( t- c)) = e^{-sc} F(s)\text{.}\)

Returning to our example, we will now show how we can use this new information to compute the inverse Laplace transform of \begin{equation*} \frac{e^{-3s}}{s(s+1)}. \end{equation*} First, we can use 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) = 2e^{-t} + u_3(t)\left( 1 - e^{-(t - 3)} \right). \end{equation*}

Subsection6.2.4Forced 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*}

Subsection6.2.5Important Lessons

  • If we know the Laplace transform \(F(s)\) of a function, we can recover the original function using the inverse Laplace transform of a function \({\mathcal L}^{-1}(F(s))(t)\text{.}\)
  • The inverse Laplace transform is linear, \begin{equation*} {\mathcal L}^{-1} ( \alpha F + \beta G ) = \alpha {\mathcal L}^{-1}(F) + \beta {\mathcal L}^{-1} ( G). \end{equation*}
  • 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*}
  • If \({\mathcal L}(f) = F(s)\text{,}\) then \({\mathcal L}(u_c(t) f( t- c)) = e^{-sc} F(s)\text{.}\)

Subsection6.2.6Exercises

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