# Solving Initial Value Problems

Author: John J Weber III, PhD Corresponding Textbook Sections:

• Section 7.5 – Solving Initial Value Problems

## Expected Educational Results

• Objective 22–1: I can use the Laplace transform to solve an initial value problem.

## Solving Initial Value Problems

### Method

1. Take the Laplace transform of both sides of IVP;
2. Solve the transform for $F(s)$ (more frequently referred to as $Y(s)$);
3. Take the inverse Laplace transform of both sides of the equation from step 2 Recall: $\mathcal{L}^{-1}\left\{Y(s)\right\}(t)=y(t)$.

Example 01:

Solve: $\displaystyle y^{\,\prime\prime}(t)-5y^{\,\prime}(t)+6y(t)=\sinh{(t)}$, $y(0)=0$, $y^{\,\prime}(0)=1$.

Solution:

Apply Laplace transform:

$\mathcal{L}\left\{y^{\,\prime\prime}(t)-5y^{\,\prime}(t)+6y(t)\right\}(s)=\mathcal{L}\left\{\sinh{(t)}\right\}(s)$

Evaluate Laplace transforms:

$\Rightarrow s^2Y(s)-sy(0)-y^{\,\prime}(0)-5\left[sY(s)-y(0)\right]+6Y(s) = \dfrac{1}{s^2-1}$

Expand using algebra:

$\Rightarrow s^2Y(s)-sy(0)-y^{\,\prime}(0)-5sY(s)+5y(0)+6Y(s) = \dfrac{1}{s^2-1}$

Substitute initial conditions:

$\Rightarrow s^2Y(s)-0-1-5sY(s)+5(0)+6Y(s) = \dfrac{1}{s^2-1}$

Simplify/rewrite:

$\Rightarrow s^2Y(s)-1-5sY(s)+6Y(s) = \dfrac{1}{s^2-1}$

Factor out $Y(s)$:

$\Rightarrow Y(s)\left[s^2-5s+6\right]-1 = \dfrac{1}{s^2-1}$

Rewrite:

$\Rightarrow Y(s)\left[s^2-5s+6\right] = \dfrac{1}{s^2-1}+1$

Solve for $Y(s)$:

$\Rightarrow Y(s) = \dfrac{1}{s^2-5s+6}\left[\dfrac{1}{s^2-1}+1\right]$

Apply inverse Laplace transforms:

$\Rightarrow \mathcal{L}^{-1}\left\{Y(s)\right\}(t) = \mathcal{L}^{-1}\left\{\dfrac{1}{s^2-5s+6}\left[\dfrac{1}{s^2-1}+1\right]\right\}(t)$

Note: Do NOT expand denominators.

Use method of partial fractions:

#### Use Technology to use the method of partial fractions

Mathematica

1(* Separate into partial fractions: 1/(s^2-5s+6)(1/(s^2+1)+1) *)2Apart[1/(s^2-5s+6)(1/(s^2+1)+1)]

Warnings:

1. Be very careful with the syntax. Syntax is the set of rules on how to write computer code. Every software program has its own unique syntax. Some basic Mathematica syntax is located at: http://www.jjw3.com/TECH_Common_Functions.pdf.
2. To execute code (including comment codes), press and hold the SHIFT key and press the ENTER key.

$\Rightarrow \mathcal{L}^{-1}\left\{Y(s)\right\}(t) = \mathcal{L}^{-1}\left\{-\dfrac{1/3}{s-2}+\dfrac{1/4}{s-1}-\dfrac{1/24}{s+1}+\dfrac{1/8}{s-3}+\dfrac{1}{s-3}-\dfrac{1}{s-2}\right\}(t)$

Use algebra to combine “like” terms:

$\Rightarrow \mathcal{L}^{-1}\left\{Y(s)\right\}(t) = \mathcal{L}^{-1}\left\{-\dfrac{4/3}{s-2}+\dfrac{1/4}{s-1}-\dfrac{1/24}{s+1}+\dfrac{9/8}{s-3}\right\}(t)$

Use knowledge of Laplace transforms:

$\Rightarrow y(t) = -\frac{4}{3}e^{2t}+\frac{1}{4}e^t-\frac{1}{24}e^{-t}+\frac{9}{8}e^{3t}$

#### Investigation 01

Use the Laplace transform to solve the following IVPS:

1. $\displaystyle y^{\,\prime}+4y=\cos{(t)}$, $y(0)=0$
2. $\displaystyle y^{\,\prime\prime}+7y^{\,\prime}+12y=0$, $y(0)=1$, $y^{\,\prime}(0)=2$
3. $\displaystyle y^{\,\prime\prime}-y^{\,\prime}-2y=0$, $y(0)=-2$, $y^{\,\prime}(0)=5$
4. $\displaystyle y^{\,\prime\prime}+4y^{\,\prime}+4y=x^2e^{-2x}$, $y(0)=0$, $y^{\,\prime}(0)=0$
5. $\displaystyle y^{\,\prime\prime}+4y=3\sin{(t)}$, $y(0)=1$, $y^{\,\prime}(0)=3$
6. $\displaystyle y^{\,\prime\prime}-2y^{\,\prime}+2y=e^{-t}+2e^{2t}$, $y(0)=0$, $y^{\,\prime}(0)=1$
7. $\displaystyle y^{\,\prime\prime\prime}-7y^{\,\prime}+6y=0$, $y(0)=1$, $y^{\,\prime}(0)=-1$, $y^{\,\prime\prime}(0)=1$