• Go To
• Notes
• Practice and Assignment problems are not yet written. As time permits I am working on them, however I don't have the amount of free time that I used to so it will take a while before anything shows up here.
• Show/Hide
• Show all Solutions/Steps/etc.
• Hide all Solutions/Steps/etc.
Paul's Online Notes
Home / Differential Equations / Laplace Transforms / Solving IVP's with Laplace Transforms
Show Mobile Notice Show All Notes Hide All Notes
Mobile Notice
You appear to be on a device with a "narrow" screen width (i.e. you are probably on a mobile phone). Due to the nature of the mathematics on this site it is best views in landscape mode. If your device is not in landscape mode many of the equations will run off the side of your device (should be able to scroll to see them) and some of the menu items will be cut off due to the narrow screen width.

### Section 4-5 : Solving IVP's with Laplace Transforms

It’s now time to get back to differential equations. We’ve spent the last three sections learning how to take Laplace transforms and how to take inverse Laplace transforms. These are going to be invaluable skills for the next couple of sections so don’t forget what we learned there.

Before proceeding into differential equations we will need one more formula. We will need to know how to take the Laplace transform of a derivative. First recall that $$f^{(n)}$$ denotes the $$n^{\mbox{th}}$$ derivative of the function $$f$$. We now have the following fact.

#### Fact

Suppose that $$f$$, $$f'$$, $$f''$$,… $$f^{(n-1)}$$ are all continuous functions and $$f^{(n)}$$ is a piecewise continuous function. Then,

$\mathcal{L}\left\{ {{f^{\left( n \right)}}} \right\} = {s^n}F\left( s \right) - {s^{n - 1}}f\left( 0 \right) - {s^{n - 2}}f'\left( 0 \right) - \cdots - s{f^{\left( {n - 2} \right)}}\left( 0 \right) - {f^{\left( {n - 1} \right)}}\left( 0 \right)$

Since we are going to be dealing with second order differential equations it will be convenient to have the Laplace transform of the first two derivatives.

\begin{align*}\mathcal{L}\left\{ {y'} \right\} & = sY\left( s \right) - y\left( 0 \right)\\ \mathcal{L}\left\{ {y''} \right\} & = {s^2}Y\left( s \right) - sy\left( 0 \right) - y'\left( 0 \right)\end{align*}

Notice that the two function evaluations that appear in these formulas, $$y\left( 0 \right)$$ and $$y'\left( 0 \right)$$, are often what we’ve been using for initial condition in our IVP’s. So, this means that if we are to use these formulas to solve an IVP we will need initial conditions at $$t = 0$$.

While Laplace transforms are particularly useful for nonhomogeneous differential equations which have Heaviside functions in the forcing function we’ll start off with a couple of fairly simple problems to illustrate how the process works.

Example 1 Solve the following IVP. $y'' - 10y' + 9y = 5t,\hspace{0.25in}y\left( 0 \right) = - 1\,\,\,\,\,\,\,y'\left( 0 \right) = 2$
Show Solution

The first step in using Laplace transforms to solve an IVP is to take the transform of every term in the differential equation.

$\mathcal{L}\left\{ {y''} \right\} - 10\mathcal{L}\left\{ {y'} \right\} + 9\mathcal{L}\left\{ y \right\} = \mathcal{L}\left\{ {5t} \right\}$

Using the appropriate formulas from our table of Laplace transforms gives us the following.

${s^2}Y\left( s \right) - sy\left( 0 \right) - y'\left( 0 \right) - 10\left( {sY\left( s \right) - y\left( 0 \right)} \right) + 9Y\left( s \right) = \frac{5}{{{s^2}}}$

Plug in the initial conditions and collect all the terms that have a $$Y(s)$$ in them.

$\left( {{s^2} - 10s + 9} \right)Y\left( s \right) + s - 12 = \frac{5}{{{s^2}}}$

Solve for $$Y(s)$$.

$Y\left( s \right) = \frac{5}{{{s^2}\left( {s - 9} \right)\left( {s - 1} \right)}} + \frac{{12 - s}}{{\left( {s - 9} \right)\left( {s - 1} \right)}}$

At this point it’s convenient to recall just what we’re trying to do. We are trying to find the solution, $$y(t)$$, to an IVP. What we’ve managed to find at this point is not the solution, but its Laplace transform. So, in order to find the solution all that we need to do is to take the inverse transform.

Before doing that let’s notice that in its present form we will have to do partial fractions twice. However, if we combine the two terms up we will only be doing partial fractions once. Not only that, but the denominator for the combined term will be identical to the denominator of the first term. This means that we are going to partial fraction up a term with that denominator no matter what so we might as well make the numerator slightly messier and then just partial fraction once.

This is one of those things where we are apparently making the problem messier, but in the process we are going to save ourselves a fair amount of work!

Combining the two terms gives,

$Y\left( s \right) = \frac{{5 + 12{s^2} - {s^3}}}{{{s^2}\left( {s - 9} \right)\left( {s - 1} \right)}}$

The partial fraction decomposition for this transform is,

$Y\left( s \right) = \frac{A}{s} + \frac{B}{{{s^2}}} + \frac{C}{{s - 9}} + \frac{D}{{s - 1}}$

Setting numerators equal gives,

$5 + 12{s^2} - {s^3} = As\left( {s - 9} \right)\left( {s - 1} \right) + B\left( {s - 9} \right)\left( {s - 1} \right) + C{s^2}\left( {s - 1} \right) + D{s^2}\left( {s - 9} \right)$

Picking appropriate values of $$s$$ and solving for the constants gives,

\begin{align*} & s = 0 & 5 & = 9B & \Rightarrow \hspace{0.25in}B & = \frac{5}{9}\\ & s = 1 & 16 & = - 8D & \Rightarrow \hspace{0.25in}D & = - 2\\ & s = 9 & 248 & = 648C & \Rightarrow \hspace{0.25in}C & = \frac{{31}}{{81}}\\ & s = 2 & 45 & = - 14A + \frac{{4345}}{{81}} & \Rightarrow \hspace{0.25in}A & = \frac{{50}}{{81}}\end{align*}

Plugging in the constants gives,

$Y\left( s \right) = \frac{{\frac{{50}}{{81}}}}{s} + \frac{{\frac{5}{9}}}{{{s^2}}} + \frac{{\frac{{31}}{{81}}}}{{s - 9}} - \frac{2}{{s - 1}}$

Finally taking the inverse transform gives us the solution to the IVP.

$y\left( t \right) = \frac{{50}}{{81}} + \frac{5}{9}t + \frac{{31}}{{81}}{{\bf{e}}^{9t}} - 2{{\bf{e}}^t}$

That was a fair amount of work for a problem that probably could have been solved much quicker using the techniques from the previous chapter. The point of this problem however, was to show how we would use Laplace transforms to solve an IVP.

There are a couple of things to note here about using Laplace transforms to solve an IVP. First, using Laplace transforms reduces a differential equation down to an algebra problem. In the case of the last example the algebra was probably more complicated than the straight forward approach from the last chapter. However, in later problems this will be reversed. The algebra, while still very messy, will often be easier than a straight forward approach.

Second, unlike the approach in the last chapter, we did not need to first find a general solution, differentiate this, plug in the initial conditions and then solve for the constants to get the solution. With Laplace transforms, the initial conditions are applied during the first step and at the end we get the actual solution instead of a general solution.

In many of the later problems Laplace transforms will make the problems significantly easier to work than if we had done the straight forward approach of the last chapter. Also, as we will see, there are some differential equations that simply can’t be done using the techniques from the last chapter and so, in those cases, Laplace transforms will be our only solution.

Let’s take a look at another fairly simple problem.

Example 2 Solve the following IVP. $2y'' + 3y' - 2y = t{{\bf{e}}^{ - 2t}},\hspace{0.25in}y\left( 0 \right) = 0\,\,\,\,\,\,\,y'\left( 0 \right) = - 2$
Show Solution

As with the first example, let’s first take the Laplace transform of all the terms in the differential equation. We’ll the plug in the initial conditions to get,

\begin{align*}2\left( {{s^2}Y\left( s \right) - sy\left( 0 \right) - y'\left( 0 \right)} \right) + 3\left( {sY\left( s \right) - y\left( 0 \right)} \right) - 2Y\left( s \right) & = \frac{1}{{{{\left( {s + 2} \right)}^2}}}\\ \left( {2{s^2} + 3s - 2} \right)Y\left( s \right) + 4 & = \frac{1}{{{{\left( {s + 2} \right)}^2}}}\end{align*}

Now solve for $$Y(s)$$.

$Y\left( s \right) = \frac{1}{{\left( {2s - 1} \right){{\left( {s + 2} \right)}^3}}} - \frac{4}{{\left( {2s - 1} \right)\left( {s + 2} \right)}}$

Now, as we did in the last example we’ll go ahead and combine the two terms together as we will have to partial fraction up the first denominator anyway, so we may as well make the numerator a little more complex and just do a single partial fraction. This will give,

\begin{align*}Y\left( s \right) & = \frac{{1 - 4{{\left( {s + 2} \right)}^2}}}{{\left( {2s - 1} \right){{\left( {s + 2} \right)}^3}}}\\ & = \frac{{ - 4{s^2} - 16s - 15}}{{\left( {2s - 1} \right){{\left( {s + 2} \right)}^3}}}\end{align*}

The partial fraction decomposition is then,

$Y\left( s \right) = \frac{A}{{2s - 1}} + \frac{B}{{s + 2}} + \frac{C}{{{{\left( {s + 2} \right)}^2}}} + \frac{D}{{{{\left( {s + 2} \right)}^3}}}$

Setting numerator equal gives,

\begin{align*} - 4{s^2} - 16s - 15 & = A{\left( {s + 2} \right)^3} + B\left( {2s - 1} \right){\left( {s + 2} \right)^2} + C\left( {2s - 1} \right)\left( {s + 2} \right) + D\left( {2s - 1} \right)\\ & = \left( {A + 2B} \right){s^3} + \left( {6A + 7B + 2C} \right){s^2} + \left( {12A + 4B + 3C + 2D} \right)s\\ & \hspace{2.25in} + 8A - 4B - 2C - D\end{align*}

In this case it’s probably easier to just set coefficients equal and solve the resulting system of equation rather than pick values of $$s$$. So, here is the system and its solution.

\left. {\begin{aligned} & {s^3}: & A + 2B & = 0\\& {s^2}: & 6A + 7B + 2C & = - 4\\ & {s^1}: & 12A + 4B + 3C + 2D & = - 16\\& {s^0}: & 8A - 4B - 2C - D & = - 15\end{aligned}} \right\}\hspace{0.25in} \Rightarrow \hspace{0.25in}\begin{aligned}A & = - \frac{{192}}{{125}} & B & = \frac{{96}}{{125}}\\ C & = - \frac{2}{{25}} & D & = - \frac{1}{5}\end{aligned}

We will get a common denominator of 125 on all these coefficients and factor that out when we go to plug them back into the transform. Doing this gives,

$Y\left( s \right) = \frac{1}{{125}}\left( {\frac{{ - 192}}{{2\left( {s - \frac{1}{2}} \right)}} + \frac{{96}}{{s + 2}} - \frac{{10}}{{{{\left( {s + 2} \right)}^2}}} - \frac{{25\frac{{2!}}{{2!}}}}{{{{\left( {s + 2} \right)}^3}}}} \right)$

Notice that we also had to factor a 2 out of the denominator of the first term and fix up the numerator of the last term in order to get them to match up to the correct entries in our table of transforms.

Taking the inverse transform then gives,

$y\left( t \right) = \frac{1}{{125}}\left( { - 96{{\bf{e}}^{\frac{t}{2}}} + 96{{\bf{e}}^{ - 2t}} - 10t{{\bf{e}}^{ - 2t}} - \frac{{25}}{2}{t^2}{{\bf{e}}^{ - 2t}}} \right)$
Example 3 Solve the following IVP. $y'' - 6y' + 15y = 2\sin \left( {3t} \right),\hspace{0.25in}y\left( 0 \right) = - 1\,\,\,\,\,\,\,y'\left( 0 \right) = - 4$
Show Solution

Take the Laplace transform of everything and plug in the initial conditions.

\begin{align*}{s^2}Y\left( s \right) - sy\left( 0 \right) - y'\left( 0 \right) - 6\left( {sY\left( s \right) - y\left( 0 \right)} \right) + 15Y\left( s \right) & = 2\frac{3}{{{s^2} + 9}}\\ \left( {{s^2} - 6s + 15} \right)Y\left( s \right) + s - 2 & = \frac{6}{{{s^2} + 9}}\end{align*}

Now solve for $$Y(s)$$ and combine into a single term as we did in the previous two examples.

$Y\left( s \right) = \frac{{ - {s^3} + 2{s^2} - 9s + 24}}{{\left( {{s^2} + 9} \right)\left( {{s^2} - 6s + 15} \right)}}$

Now, do the partial fractions on this. First let’s get the partial fraction decomposition.

$Y\left( s \right) = \frac{{As + B}}{{{s^2} + 9}} + \frac{{Cs + D}}{{{s^2} - 6s + 15}}$

Now, setting numerators equal gives,

\begin{align*} - {s^3} + 2{s^2} - 9s + 24 & = \left( {As + B} \right)\left( {{s^2} - 6s + 15} \right) + \left( {Cs + D} \right)\left( {{s^2} + 9} \right)\\ & = \left( {A + C} \right){s^3} + \left( { - 6A + B + D} \right){s^2} + \left( {15A - 6B + 9C} \right)s + 15B + 9D\end{align*}

Setting coefficients equal and solving for the constants gives,

\left. \begin{aligned}& {s^3}: & A + C & = - 1\\ & {s^2}: & - 6A + B + D & = 2\\ & {s^1}: & 15A - 6B + 9C & = - 9\\ & {s^0}: & 15B + 9D & = 24\end{aligned}\right\}\hspace{0.25in} \Rightarrow \hspace{0.25in}\begin{aligned} A & = \frac{1}{{10}} & B & = \frac{1}{{10}}\\ C & = - \frac{{11}}{{10}} & D & = \frac{5}{2}\end{aligned}

Now, plug these into the decomposition, complete the square on the denominator of the second term and then fix up the numerators for the inverse transform process.

\begin{align*}Y\left( s \right) & = \frac{1}{{10}}\left( {\frac{{s + 1}}{{{s^2} + 9}} + \frac{{ - 11s + 25}}{{{s^2} - 6s + 15}}} \right)\\ & = \frac{1}{{10}}\left( {\frac{{s + 1}}{{{s^2} + 9}} + \frac{{ - 11\left( {s - 3 + 3} \right) + 25}}{{{{\left( {s - 3} \right)}^2} + 6}}} \right)\\ & = \frac{1}{{10}}\left( {\frac{s}{{{s^2} + 9}} + \frac{{1\frac{3}{3}}}{{{s^2} + 9}} - \frac{{11\left( {s - 3} \right)}}{{{{\left( {s - 3} \right)}^2} + 6}} - \frac{{8\frac{{\sqrt 6 }}{{\sqrt 6 }}}}{{{{\left( {s - 3} \right)}^2} + 6}}} \right)\end{align*}

Finally, take the inverse transform.

$y\left( t \right) = \frac{1}{{10}}\left( {\cos \left( {3t} \right) + \frac{1}{3}\sin \left( {3t} \right) - 11{{\bf{e}}^{3t}}\cos \left( {\sqrt 6 t} \right) - \frac{8}{{\sqrt 6 }}{{\bf{e}}^{3t}}\sin \left( {\sqrt 6 t} \right)} \right)$

To this point we’ve only looked at IVP’s in which the initial values were at $$t = 0$$. This is because we need the initial values to be at this point in order to take the Laplace transform of the derivatives. The problem with all of this is that there are IVP’s out there in the world that have initial values at places other than $$t = 0$$. Laplace transforms would not be as useful as it is if we couldn’t use it on these types of IVP’s. So, we need to take a look at an example in which the initial conditions are not at $$t = 0$$ in order to see how to handle these kinds of problems.

Example 4 Solve the following IVP. $y'' + 4y' = \cos \left( {t - 3} \right) + 4t,\hspace{0.25in}y\left( 3 \right) = 0\,\,\,\,\,\,\,y'\left( 3 \right) = 7$
Show Solution

The first thing that we will need to do here is to take care of the fact that initial conditions are not at $$t = 0$$. The only way that we can take the Laplace transform of the derivatives is to have the initial conditions at $$t = 0$$.

This means that we will need to formulate the IVP in such a way that the initial conditions are at $$t = 0$$. This is actually fairly simple to do, however we will need to do a change of variable to make it work. We are going to define

$\eta = t - 3\hspace{0.25in} \Rightarrow \hspace{0.25in}\,\,\,t = \eta + 3$

$y''\left( t \right) + 4y'\left( t \right) = \cos \left( {t - 3} \right) + 4t$

Notice that we put in the $$\left( t \right)$$ part on the derivatives to make sure that we get things correct here. We will next substitute in for $$t$$.

$y''\left( {\eta + 3} \right) + 4y'\left( {\eta + 3} \right) = \cos \left( \eta \right) + 4\left( {\eta + 3} \right)$

Now, to simplify life a little let’s define,

$u\left( \eta \right) = y\left( {\eta + 3} \right)$

Then, by the chain rule, we get the following for the first derivative.

$u'\left( \eta \right) = \frac{{du}}{{d\eta }} = \frac{{dy}}{{dt}}\frac{{dt}}{{d\eta }} = y'\left( {\eta + 3} \right)$

By a similar argument we get the following for the second derivative.

$u''\left( \eta \right) = y''\left( {\eta + 3} \right)$

The initial conditions for $$u\left( \eta \right)$$ are,

\begin{align*}u\left( 0 \right) & = y\left( {0 + 3} \right) = y\left( 3 \right) = 0\\ u'\left( 0 \right) & = y'\left( {0 + 3} \right) = y'\left( 3 \right) = 7\end{align*}

The IVP under these new variables is then,

$u'' + 4u' = \cos \left( \eta \right) + 4\eta + 12,\hspace{0.25in}u\left( 0 \right) = 0\,\,\,\,\,\,\,\,u'\left( 0 \right) = 7$

This is an IVP that we can use Laplace transforms on provided we replace all the $$t$$’s in our table with $$\eta$$’s. So, taking the Laplace transform of this new differential equation and plugging in the new initial conditions gives,

\begin{align*}{s^2}U\left( s \right) - su\left( 0 \right) - u'\left( 0 \right) + 4\left( {sU\left( s \right) - u\left( 0 \right)} \right) & = \frac{s}{{{s^2} + 1}} + \frac{4}{{{s^2}}} + \frac{{12}}{s}\\ \left( {{s^2} + 4s} \right)U\left( s \right) - 7 & = \frac{s}{{{s^2} + 1}} + \frac{{4 + 12s}}{{{s^2}}}\end{align*}

Solving for $$U(s)$$ gives,

\begin{align*}\left( {{s^2} + 4s} \right)U\left( s \right) & = \frac{s}{{{s^2} + 1}} + \frac{{4 + 12s + 7{s^2}}}{{{s^2}}}\\ U\left( s \right) & = \frac{1}{{\left( {s + 4} \right)\left( {{s^2} + 1} \right)}} + \frac{{4 + 12s + 7{s^2}}}{{{s^3}\left( {s + 4} \right)}}\end{align*}

Note that unlike the previous examples we did not completely combine all the terms this time. In all the previous examples we did this because the denominator of one of the terms was the common denominator for all the terms. Therefore, upon combining, all we did was make the numerator a little messier and reduced the number of partial fractions required down from two to one. Note that all the terms in this transform that had only powers of $$s$$ in the denominator were combined for exactly this reason.

In this transform however, if we combined both of the remaining terms into a single term we would be left with a fairly involved partial fraction problem. Therefore, in this case, it would probably be easier to just do partial fractions twice. We’ve done several partial fractions problems in this section and many partial fraction problems in the previous couple of sections so we’re going to leave the details of the partial fractioning to you to check. Partial fractioning each of the terms in our transform gives us the following.

\begin{align*}\frac{1}{{\left( {s + 4} \right)\left( {{s^2} + 1} \right)}} & = \frac{{\frac{1}{{17}}}}{{s + 4}} + \frac{1}{{17}}\left( {\frac{{ - s + 4}}{{{s^2} + 1}}} \right)\\ \frac{{4 + 12s + 7{s^2}}}{{{s^3}\left( {s + 4} \right)}} & = \frac{1}{{{s^3}}} + \frac{{\frac{{11}}{4}}}{{{s^2}}} + \frac{{\frac{{17}}{{16}}}}{s} - \,\frac{{\frac{{17}}{{16}}}}{{s + 4}}\end{align*}

Plugging these into our transform and combining like terms gives us

\begin{align*}U\left( s \right) & = \frac{1}{{{s^3}}} + \frac{{\frac{{11}}{4}}}{{{s^2}}} + \frac{{\frac{{17}}{{16}}}}{s} - \frac{{\frac{{273}}{{272}}}}{{s + 4}} + \frac{1}{{17}}\left( {\frac{{ - s + 4}}{{{s^2} + 1}}} \right)\\ & = \frac{{1\frac{{2!}}{{2!}}}}{{{s^3}}} + \frac{{\frac{{11}}{4}}}{{{s^2}}} + \,\frac{{\frac{{17}}{{16}}}}{s} - \frac{{\frac{{273}}{{272}}}}{{s + 4}} + \frac{1}{{17}}\left( {\frac{{ - s}}{{{s^2} + 1}} + \frac{4}{{{s^2} + 1}}} \right)\end{align*}

Now, taking the inverse transform will give the solution to our new IVP. Don’t forget to use $$\eta$$’s instead of $$t$$’s!

$u\left( \eta \right) = \frac{1}{2}{\eta ^2} + \frac{{11}}{4}\eta + \frac{{17}}{{16}} - \frac{{273}}{{272}}{{\bf{e}}^{ - 4\eta }} + \frac{1}{{17}}\left( {4\sin \left( \eta \right) - \cos \left( \eta \right)} \right)$

This is not the solution that we are after of course. We are after $$y(t)$$. However, we can get this by noticing that

$y\left( t \right) = y\left( {\eta + 3} \right) = u\left( \eta \right) = u\left( {t - 3} \right)$

So, the solution to the original IVP is,

\begin{align*}y\left( t \right) & = \frac{1}{2}{\left( {t - 3} \right)^2} + \frac{{11}}{4}\left( {t - 3} \right) + \frac{{17}}{{16}} - \frac{{273}}{{272}}{{\bf{e}}^{ - 4\left( {t - 3} \right)}} + \frac{1}{{17}}\left( {4\sin \left( {t - 3} \right) - \cos \left( {t - 3} \right)} \right)\\ y\left( t \right) & = \frac{1}{2}{t^2} - \frac{1}{4}t - \frac{{43}}{{16}} - \frac{{273}}{{272}}{{\bf{e}}^{ - 4\left( {t - 3} \right)}} + \frac{1}{{17}}\left( {4\sin \left( {t - 3} \right) - \cos \left( {t - 3} \right)} \right)\end{align*}

So, we can now do IVP’s that don’t have initial conditions that are at $$t = 0$$. We also saw in the last example that it isn’t always the best to combine all the terms into a single partial fraction problem as we have been doing prior to this example.

The examples worked in this section would have been just as easy, if not easier, if we had used techniques from the previous chapter. They were worked here using Laplace transforms to illustrate the technique and method.