laplace transform, initial value problem I have tried this problem multiple times, I have the solution but not the steps. I keep getting the wrong answer. I believe it may be in the algebra after I have taken the Laplace on both sides.
$y''+y = \sin(t) ;\:\: y(0) = 1, \:\: y'(0) = -1 $
 A: You know that the LHS is,
$$\mathcal{L}(y'') + \mathcal{L}(y)= [s^2 \mathcal{L}(y) - sy(0) - y'(0)] + \mathcal{L}(y) = \mathcal{L}(y)(s^2+1) - s + 1, $$
and for the RHS we have, $$\mathcal{L}(\sin t) = \dfrac{1}{s^2 + 1}.$$
Equate both sides and isolate for $\mathcal{L}(y)$ to get, $$\mathcal{L}(y) = \color{red}{\frac{1}{(s^2+1)^2}}- \color{blue}{\frac{1}{s^2 + 1}} +\frac{s}{s^2 + 1}.$$
If you do the inverse laplace, you should find that $$y = \color{red}{\frac{1}{2}(\sin t - t \cos t)} -\color{blue}{\sin t}+\cos t = \frac{-1}{2} \sin t + \left (1 - \frac{t}{2} \right)\cos t.$$
A: Follow the next steps I describe for you below:


*

*Take Laplace transform on both sides of the ODE to have:


$$ s^2 Y(s) - s y_0 - y'_0 + Y(s) = \frac{1}{s^2+1}, \quad Y(s) = \mathcal{L}_s [y(t)]$$


*

*Substitute data and solve for $Y(s)$:


$$Y(s) =  \frac{1}{s^2+1} \left( s - 1 + \frac{1}{s^2 +1}  \right)$$


*

*Inverse-Laplace-transform both sides to find:


\begin{align}
\color{blue}{y(t)} & = \mathcal{L}^{-1}_t[Y(s)] = \mathcal{L}^{-1}_t \left[ \underbrace{\color{green}{\frac{s-1}{s^2+1}}}_{\text{tabulated}} + \color{red}{\frac{1}{(s^2+1)^2}} \right] = \\ 
&=\color{green}{\cos{t} - \sin{t} }+ \color{red}{\frac{1}{2} (\sin{t} - t\cos{t})} = \color{blue}{ \cos{t} - \frac{1}{2} \sin{t} - \frac{t}{2}\cos{t} } .
\end{align}


*

*You can hereby identify the solution of the homogeneous equation as $y_h(t) = \cos{t} - 1/2 \, \sin{t}$ and the particular solution as $y_p(t) = - t/2 \, \cos{t} $.


Hope this helps!
Cheers.
Edit: you can  check that the inverse Laplace transform of $1/(s^2+1)^2$ can be computed as (convolution property):
$$ \mathcal{L}^{-1}_t [G(s)F(s)] = \int^t_0 g(t-\tau) f(\tau) \, \mathrm{d}\tau = \int^t_0 \sin(t-\tau) \sin{\tau} \, \mathrm{d} \tau = \frac{1}{2}(\sin{t} - \cos{t}).$$
A: Instead of a Laplace transform (and to be different from everyone else), why not try an annihilator? If $D$ is a differential operator we have
$(D^2+1)(y)=\sin(t)$
$(D^2+1)(D^2+1)(y)=(D^2+1)\sin(t)=0$
Solution of this equation is $y=C_1\sin(t)+C_2\cos(t)+C_3t\sin(t)+C_4t\cos(t)$
Plugging this in to the first equation, and noting that $C_1\sin(t)+C_2\cos(t)$ are solutions of the homogeneous equation, we have
$(D^2+1)(C_3t\sin(t)+C_4t\cos(t))=2C_3\cos(t)-2C_4\sin(t)=\sin(t)$
$\therefore C_3=0,C_4=-\frac12$
Plugging in the initial values as well we have
$y(t)={ \cos{t} - \frac{1}{2} \sin{t} - \frac{t}{2}\cos{t} }$
