I need help with this Laplace question. $$f(t) = e^{-t} \sin(t) $$
Answer should be $\dfrac{1}{s^2 + 2s + 2}$
What I'm currently doing is as follows:
$u = \sin(t)\qquad$ $dv = e^{-(s+1)t}dt$
$du = \cos(t)dt\qquad$ $v = \dfrac{e^{-(s+1)t}}{-(s+1)}$
$\dfrac{-\sin(t) e^{-(s+1)t}}{-(s+1)} - \int\dfrac{ e^{-(s+1)t}\cos(t)}{ -(s+1)} dt$
But even if I solved the integral, I wouldn't get this (which is what I should, see picture).
You need not integrate by parts to evaluate this integral. In fact, one would need to integrate by parts twice. See the section following the highlighted SPOILER ALERT
So, I thought it would be instructive to present a "trick" that we can use to quickly evaluate the integral of interest and other similar integrals.
HERE IS A HINT:
$$\sin(t)=\text{Im}\left(e^{it}\right) \tag 1$$
SPOILER ALERT: Scroll over the highlighted area to reveal the solution
The last result in the OP was
$$\int_0^\infty e^{-t}\sin(t)e^{-st}\,dt=\left.\left(\frac{-\sin(t) e^{-(s+1)t}}{-(s+1)}\right)\right|_0^\infty - \int_0^{\infty}\dfrac{ e^{-(s+1)t}\cos(t)}{ -(s+1)} dt$$
Continuing we have
$$\begin{align} \int_0^\infty e^{-t}\sin(t)e^{-st}\,dt&=\frac{1}{s+1} \int_0^{\infty} e^{-(s+1)t}\cos(t)\,dt \tag 2 \end{align}$$
We integrate by parts $(2)$ with $u=\cos(t)$ and $v=-\frac{e^{-(s+1)t}}{s+1}$. Then, we obtain
$$\begin{align} \int_0^\infty e^{-t}\sin(t)e^{-st}\,dt&=\frac{1}{s+1}\left.\left(-\frac{\cos(t)e^{-(s+1)t}}{s+1}\right)\right|_0^\infty -\frac{1}{(s+1)^2}\int_0^\infty \sin(t)e^{-(s+1)t}\,dt\\\\ &=\frac{1}{(s+1)^2}-\frac{1}{(s+1)^2}\int_0^\infty \sin(t)e^{-(s+1)t}\,dt\\\\ ((s+1)^2+1)\int_0^\infty e^{-t}\sin(t)e^{-st}\,dt&=1\\\\ \int_0^\infty e^{-t}\sin(t)e^{-st}\,dt&=\frac{1}{s^2+2s+2} \end{align}$$
as expected!