I'm trying to solve the following ODE using the Laplace Transform: $$\frac{d^2u}{dt^2} + u = e^{-t}\cos{t}$$
With $u(0)$ and $\frac{du}{dt}(0)$ given like that.
I have found that the transform of $e^{-t}\cos{t}$ is:$$\frac{s+1}{s^2+2s+2}$$
Therefore my transformed solution is: $$\hat{u}(s) = \frac{1}{s^2+1}\big (\frac{s+1}{s^2+2s+2} +su(0)+\frac{du}{dt}(0) \big )$$
I don't see how I can calculate the inverse transform of this expression, I know about the Bromwich contour but I can't seem to figure out how to apply it in this case. Any ideas?
Many thanks!
From your transformed equation, $$\hat{u}(s) = \frac{1}{s^2+1}\big (\frac{s+1}{s^2+2s+2} +su(0)+\frac{du}{dt}(0) \big )$$
Using partial fractions you'll get $$\hat{u}(s) = -\frac{1}{5} \frac{s}{s^2+1} + \frac{3}{5} \frac{1}{s^2+1} + \frac{1}{5}\frac{s+1}{s^2+2s+2} - \frac{2}{5}\frac{1}{s^2+2s+2} + u(0) \frac{s}{s^2+1} + \frac{du}{dt}(0) \frac{1}{s^2+1}$$
$$\implies \hat{u}(s) = \big( u(0)-\frac{1}{5} \big) \frac{s}{s^2+1} + \big(\frac{du}{dt}(0) + \frac{3}{5} \big) \frac{1}{s^2+1} + \frac{1}{5}\frac{s+1}{(s+1)^2+1} - \frac{2}{5}\frac{1}{(s+1)^2+1}$$
Inverse Laplace of these functions can be easily seen,
$$\implies u(t) = \big( u(0)-\frac{1}{5} \big) \cos(t) + \big(\frac{du}{dt}(0) + \frac{3}{5} \big) \sin(t) + \frac{1}{5} e^{-t} \cos(t) - \frac{2}{5} e^{-t} \sin(t)$$
Hope this helps you