Solving an IVP:
$$y'' - 2y' +5y = 0 $$ $$ y(0) = 2, y'(0) = 4$$
Taking the Laplace transform of both sides $$\mathcal{L}{y''} - 2\mathcal{L}{y'} +5\mathcal{L}{y} = 0$$ $$[YS^2 - S(y0) - y'(0)] - 2[SY - (y0)] + [5Y] = 0$$ $$YS^2 - S2 - 4 - 2SY + 4 + 5Y = 0$$ $$Y(S^2 -2S +5) - 2S = 0$$ $$Y = \frac{2S}{(S^2 -2S +5)}$$ $$Y = \frac{2S}{(S-1)^2 +4}$$
Taking the inverse Laplace transform we get $y = 2e^t \cos{2t}$, but the answer is supposed to be $y = 2e^t \cos{2t} + e^t \sin{2t}$. Where did I go wrong?
You've computed the inverse Laplace transform incorrectly: $$ \mathcal{L}^{-1}\left[\frac{2s}{(s-1)^2 + 4}\right](t) = e^t\mathcal{L}^{-1}\left[\frac{2(u+1)}{u^2 + 4}\right](t) = e^t\left( 2\mathcal{L}^{-1}\left[\frac{u}{u^2 + 4}\right](t) + 2\mathcal{L}^{-1}\left[\frac{1}{u^2 + 4}\right](t) \right) = e^t \left( \mathcal{L}^{-1}\left[\frac{u/2}{(u/2)^2 + 1}\right](t) + \frac{1}{2}\mathcal{L}^{-1}\left[\frac{1}{(u/2)^2 + 1}\right](t) \right) = e^t \left( 2\mathcal{L}^{-1}\left[\frac{w}{w^2 + 1}\right](2t) + \mathcal{L}^{-1}\left[\frac{1}{w^2 + 1}\right](2t) \right) = e^t (2\cos 2t + \sin 2t) $$