# Laplace Transform to Find Solution

1. May 17, 2014

### jakejakejake

Use Laplace transfer to find the solution of the following initial value problem:

y''+4y'+4y=f(t)
where f(t) = cos(ωt) if 0<t<π and f(t)=0 if t>π ?

Also, y(0) = 0, y'(0) = 1

Currently, I have gotten to here, but not sure how to perform inverse Laplace:

(s+2)² * F(s) − 1 = [s/(s²+w²)] + e^(−πs) * [s/ (s²+ω²)]

Last edited: May 18, 2014
2. May 18, 2014

### LCKurtz

I suggest you put appropriate parentheses in that last line so we don't have to guess what that right hand side is supposed to really be.

3. May 18, 2014

### jakejakejake

Sorry - Edited!

4. May 18, 2014

### SteamKing

Staff Emeritus
After this point, you do some algebra to isolate F(s) by itself as the LHS of the equation.
Then you examine the resulting RHS and refer to a table of Laplace transforms to see if the resulting expressions in 's' can be algebraically manipulated into one or more of the forms in the table.

5. May 18, 2014

### jakejakejake

I isolated F(s):
F(s) = [[s/(s²+w²)] + e^(−πs) * [s/ (s²+ω²)]] + 1 / ((s+2)²)

But I have no idea how to manipulate it to look like the ones in the table...

6. May 18, 2014

### SteamKing

Staff Emeritus
I think you have left out a factor of (1/s) when you formed the Laplace transform of the Unit Step Function, so check the F(s) equation.

Also, be careful when writing complicated rational terms: you want to make sure you use parentheses to correctly group the terms in the numerator and the denominator.

In order to analyze the F(s) expressions, split up a complicated sum into its component parts and analyze each term. After all, the Laplace transform of a sum = sum of the Laplace transforms. You will need to do even more algebra here.

7. May 18, 2014

### jakejakejake

@ted s:

For the Right Hand Side, I got
L[coswt]+L[cos(ωt+π)], or s/(s^2+w^2) + L[cos(ωt+π)],
where cos(ωt+π), using the identity for cos(x+y), =cos(−ωt)
Therefore, the LHS is:
s/(s^2+w^2)+e^(−πs)⋅s/(s^2+ω^2)
Is that not correct?

8. May 18, 2014

### SteamKing

Staff Emeritus
I'm a little rusty on this, but bear with me:

The original RHS for the ODE was:

f(t) = cos(ωt) if 0<t<π and
f(t) = 0 if t>π

which can be re-written as:

f(t) = cos(ωt) * [U(t) - U(t-π)],

where U(t-c) is the delayed Unit Step Function at t = π

I believe you have used the delayed unit impulse function δ(t-π) instead of the Unit Step Function in your re-writing of the RHS.

The delayed unit impulse function δ(t-π) = 1 at t = π and zero everywhere else.

The Unit Step Function U(t) = 1, when t > 0 and U(t) = 0 when t < 0, which also implies
that the Delayed Unit Step Function U(t-π) = 1 for t > π and zero everywhere else.

9. May 18, 2014

### Ray Vickson

Using Maple, I get
$${\cal L}(f)(s) = \int_0^{\pi} e^{-st} \cos(\omega t) \, dt = \frac{s}{s^2+\omega^2} -\frac{\cos(\pi \omega) \, s\, e^{-\pi s}}{s^2+\omega^2} +\frac{\omega \sin(\pi \omega) \, e^{-\pi s}}{s^2 + \omega^2}$$
Wolfram Alpha gives the same result.

10. May 18, 2014

### jakejakejake

I too plugged it into Wolfram Alpha and got that result. I guess I can agree to that, though I still do not see the direct process used to derive the second and third terms.
If somebody can assist, that would be great.

Secondly, this is only half the problem - once we have this, we have to inverse Laplace to find y(t), which I am still having trouble with. There are no easy ways to group it, once dividing everything by (s + 2)^2...

11. May 18, 2014

### LCKurtz

Do you have the formula $\mathcal L(f(t)u(t-a)) = e^{-as}\mathcal L(f(t+a))$? Your function is
$$\cos(\omega t)(1-u(t-\pi)) = \cos(\omega t) - \cos(\omega t)u(t-\pi)$$Use the above formula on that second term.

Last edited: May 18, 2014
12. May 19, 2014

### jakejakejake

Right, but that just means the second term is e^(−πs)*L[cos(ωt+π)],
where cos(ωt+π), using the identity for cos(x+y), = cos(−ωt), no?

13. May 19, 2014

### LCKurtz

Not quite. If $f(t) = \cos(\omega t)$ then $f(t+\pi) = \cos(\omega(t+\pi))=\cos(\omega t + \omega \pi)$. Not quite what you wrote and this will get you to the correct answer.

14. May 19, 2014

### jakejakejake

OK I almost got it. One last thing: Why is it cos(ω(t+π)) and not cos(ω(t-π))?

15. May 19, 2014

### LCKurtz

Because of the above formula. If what you are really asking is where that formula comes from, try working out$$\mathcal L(f(t)u(t-a))=\int_0^\infty e^{-st}f(t)u(t-a)~dt$$

16. May 19, 2014

### jakejakejake

Right, I understand the formula, but I thought that at the end, when I have completed the inverse Laplace and put the UnitStep function back into the formula for y(s), wherever there's a "t," I should put a "t-pi"? Which appears contradictory to placing "t+pi" here.

17. May 19, 2014

### LCKurtz

That is a different question. For doing inverses you need the formula for $\mathcal L^{-1} (e^{-as}F(s))$.