# Laplace Transform with omega. y'' + w^2y = cos(t). Need help with some of the algebra

1. Apr 15, 2012

### GNRtau

1. The problem statement, all variables and given/known data
y'' + w^2y = cos(t)
y(0) = 1
y'(0) = 0

w^2 not equal to 4

2. Relevant equations
Laplace integral, transform via table/memory...
Y(s) = F(s) or whatever you like to use

3. The attempt at a solution
s^2Y(s) - sy(0) - y'(0) + w^2Y(s) = s/(s^2 + 1). Right side is L(cos(t))
Group together, you get. (s^2 + w^2)Y(s) = L(cos(t)) + s For simplicity's sake, s^2 + w^2 equals a.
Divide by left side. L(cos(t))/a + s/a = Y(s). The second term is just cos(wt), so that part is done.
I'm a little stuck on how you expand the partial fraction here. I've never really done it before Laplace transforms, so I'm having some problems doing it in situations that are a little different like this.

s/(s^2+1)(a). So I would do As+B/(s^2 + 1) + Cs+D/(a)? After that, multiply by both sides, but from there I get a mess... a(As+B) + (s^2+1)(Cs+D). I plugged in 0, got Bw^2 + D = 0. Is there a more efficient way to do this(I'm sure the people here would know a way), or do I just to need to grind through the algebra? Sorry about the notation if unfamiliar.

Thanks for all the help in advance. I appreciate it.

2. Apr 15, 2012

### LCKurtz

Re: Laplace Transform with omega. y'' + w^2y = cos(t). Need help with some of the alg

Assuming what you wrote for the partial fraction expansion means this$$\frac{As+B}{s^2+\omega^2}+\frac{Cs+D}{s^2+1}$$it looks correct. Yes, you just have to grind it out. Sometimes you can shorten the work by equating powers of $s$ or picking clever values of $s$ after multiplying it out. I don't know any nice shortcut.