My teacher showed in class that starting with $\int_{-\infty}^{\infty} e^{inx}g(x)dx$ for an even function $g(x)$ we have $$\int_{0}^{\infty} \cos(nx)g(x)dx=\pi i\sum \operatorname{Res}\left( f(z)\right)$$
and for an odd function $g(x)$: $$\int_{0}^{\infty} \sin(nx)g(x)dx=\pi \sum \operatorname{Res} \left(f(z)\right)$$
with $n>0$, $f(z)=e^{inz}g(z)$ and $\lim\limits_{z\to\infty}g(z)=0$
However, when he tried to do an example, by mistake he forgot to add an $x$ in the numerator and left it as $$\int_{0}^{\infty} \frac{\sin(4x)}{x^2+4}dx$$
and added the $x$ later. While
$$\int_{0}^{\infty} \frac{x\sin(4x)}{x^2+4}dx$$
is not that hard to evaluate, many solutions are found here
I tried to do the first one when I got home, but the methods that I learned until now were unsuccessful. Can I get some help on how to evaluate $I=\int_{0}^{\infty} \frac{\sin(4x)}{x^2+4}dx$ please?