Solving IVP's with Laplace Transform

You probably asked yourself why Laplace transform is in Differential Equations section. Answer is simple. Because we can solve initial-value problems with the help of Laplace transform.

Let's see how it is done.

Example 1. Solve y''+4y=t, y(0)=0, y'(0)=0

First step always is to take Laplace transform of both sides.

`L(y''+4y)=L(t)`

Or

`L(y'')+4L(y)=1/s^2`

Now, since `L(y'')=s^2Y(s)-sy(0)-y'(0)` (see table of Laplace transforms) then we obtain that

`s^2Y(s)-sy(0)-y'(0)+4Y(s)=1/s^2` or using initial conditions

`s^2Y(s)-s*0-0+4Y(s)=1/s^2` which yields `Y(s)=1/(s^2(s^2+4))` .

So, to find y(t) we must find inverse Laplace transform.

Partial fraction decomposition is `A/s+B/s^2+(Cs+D)/(s^2+4)=(As(s^2+4)+B(s^2+4)+(Cs+D)s^2)/(s^2(s^2+4))=((A+C)s^3+(B+D)s^2+4As+4B)/(s^2(s^2+4))=1/(s^2(s^2+4))`

So, the following system is obtained

`{(A+C=0),(B+D=0), (4A=0),(4B=1):}` which has solution `A=0, B=1/4, C=0, D=-1/4`

So,

`y(t)=L^-1(Y(s))=L^(-1)(1/(s^2(s^2+4)))=L^-1(1/4 1/(s^2)-1/4 1/(s^2+4))=1/4 L^-1(1/s^2)-1/4 L^-1(1/(s^2+4))=1/4 t -1/8 L^-1(2/(s^2+4))=1/4t-1/8 sin(2t)`

That's all. For the linear differential equations it is always the case that we take Laplace transform, algebraically find `Y(s)` and take inverse transform to obtain solution.

Also, it is easier to solve IVP's that involve step function or dirac function with Laplace transforms.

Example 2. Solve `y''+y'=u_1(t)` , y(0)=0, y'(0)=0

Take Laplace transform

`L(y'')+L(y')=L(u_1(t))`

Or

`(s^2Y(s)-sy(0)-y'(0))+(sY(s)-y(0))=(e^-s)/s`

Applying initial conditions gives

`s^2Y(s)+sY(s)=e^(-s)/s` or `Y(s)=e^(-s) 1/(s^2(s+1))`

Partical fraction decomposition for `1/(s^2(s+1))` is `1/s^2-1/s+1/(s+1)` .

So,

`y(t)=L^-1(e^(-s) 1/s^2)-L^-1(e^(-s) 1/s)+L^-1(e^(-s) 1/(s+1))=u_1(t)(t-1)-u_1(t)1+u_1(t)e^(-(t-1))=u_1(t)(t-2+e^(1-t))`

Of course we could rewrite Heaviside function by definition and solve differential equation on each interval separately, but this requires more amount of work.

Example 3. Calculate `y''+y'=t` , y(2)=0, y'(2)=0

Notice that initial conditions are not at 0. In order to use Laplace transform we need initial conditions to be at 0. For this use change of variable: let `a=t-2` then :

`y''(a+2)+y'(a+2)=a+2` , y(0)=0, y'(0)=0

To simplify expression let `y(a+2)=u(a)` then `y'(a+2)=u'(a)` and `y''(a+2)=u''(a)` , so equation can be rewritten as

`u''+u'=a+2` , u(0)=0, u'(0)=0

Now we can use Laplace transform:

`L(u'')+L(u')=L(a)+L(2)`

`s^2U(s)-su(0)-u'(0)+sU(s)-u(0)=1/s^2+2/s`

Applying initial conditions gives

`U(s)=(1/s^2+2/s)/(s^2+s)=(2s+1)/(s^3(s+1))`

Partial fraction decomposition is (verify!) `1/s^3+1/s^2+1/(s+1)-1/s`

So, `u(a)=L^-1(1/s^3+1/s^2+1/(s+1)-1/s)=L^-1(1/2 2/s^3+1/s^2+1/(s+1)-1/s)=1/2a^2+a+e^(-a)-1`

However we need `y(t)` , not `u(a)` . Recall, that `y(t)=y(a+2)=u(a)=u(t-2)` , so

`y(t)=1/2 (t-2)^2+t-2+e^(-(t-2))-1=1/2 t^2-t-1+e^(2-t)`

Laplace transform can be used to solve linear equations with non-constant coefficients, but in general it is very hard to solve them and Laplace transform can rearely help, however such cases exist.