Question about integral $$
\int_{-\infty}^{+\infty} \frac{x\sin x}{4+x^2}dx.
$$
How  can  we  calculate  this  integral  by  Feynman  integration  method?
Let for $t&gt;0$ 
$$
F(t)=\int_{-\infty}^{\infty}\frac{x\sin(xt)}{4+x^2}{\rm d}x\tag 1
$$
so that 
$$
F(1)=\int_{-\infty}^{\infty}\frac{x\sin x}{4+x^2}{\rm d}x\tag{$\star$}
$$
Fixing $t &gt; 0$, set $y = xt$, so ${\rm d}y = t \,{\rm d}x$ and
$$
F(t)=\int_{-\infty}^{\infty}\frac{y\sin y}{4t^2+y^2}{\rm d}y\tag 2
$$
This new integral will be accessible to differentiation under the integral sign. Differentiating under the integral sign we obtain
$$
F'(t)=\int_{-\infty}^{\infty}\frac{\partial}{\partial t}\left(\frac{y\sin y}{4t^2+y^2}\right){\rm d}y=\int_{-\infty}^{\infty}\frac{-8t\, y\sin y}{(4t^2+y^2)^2}{\rm d}y\tag 3
$$
We want to compute $F''(t)$ using differentiation under the integral sign.
We obtain
$$
F''(t)=\int_{-\infty}^{\infty}\frac{\partial^2}{\partial t^2}\left(\frac{y\sin y}{4t^2+y^2}\right){\rm d}y=\int_{-\infty}^{\infty}\frac{\partial^2}{\partial y^2}\left(\frac{-4y}{4t^2+y^2}\right)\sin y\ {\rm d}y\tag 4
$$
and integrating by parts twice we obtain
$$
F''(t)=-\int_{-\infty}^{\infty}\cos y\frac{\partial}{\partial y}\left(\frac{-4y}{4t^2+y^2}\right)\ {\rm d}y=\int_{-\infty}^{\infty}\frac{4y\sin y}{4t^2+y^2}\ {\rm d}y\tag 5
$$
that is 
$$
F''(t)=4F(t)\tag 6
$$
The equation (6) is a second order linear ODE whose general solution is 
$$
F(t)=A{\rm e}^{2t}+B{\rm e}^{-2t}\tag 7
$$
for all $t &gt; 0$ and some real constants $A$ and $B$. 

To determine $A$ and $B$ we look at the behavior as $t\to 0^+$ and as $t\to\infty$.
For $t\to 0^+$, from (2) we have
$$
F(0)=A+B=\int_{-\infty}^{\infty}\frac{\sin y}{y}{\rm d}y=\pi
$$
that is $B=\pi-A$ and the (7) becomes
$$
F(t)=A{\rm e}^{2t}+(\pi-A){\rm e}^{-2t}.
$$
For $t\to \infty$, from (1) integrating by parts we have
$$
F(t)=\int_{-\infty}^{\infty}\frac{x\sin(xt)}{4+x^2}{\rm d}x=\left[-\frac{\cos(xt)}{t}\frac{x}{4+x^2}\right]_{-\infty}^{\infty}+\frac{1}{t}\int_{-\infty}^{\infty}\cos(xt)\frac{4-x^2}{(4+x^2)^2}{\rm d}x
$$
from wich we obtain 
$$
\lim_{t\to \infty}F(t)=0
$$
and then $A=0$.

Finally we have
$$
F(t)=\pi{\rm e}^{-2t}\tag 8
$$
and for $t=1$ we find
$$
F(1)=\int_{-\infty}^{\infty}\frac{x\sin x}{4+x^2}{\rm d}x=\frac{\pi}{{\rm e}^2}.\tag{$\star\star$}
$$
Without Feyman (go guess the parameter that will work!), but with complex analysis

Define

$$f(z)=\frac{ze^{iz}}{4+z^2}\;,\;\;C_R=[-R,R]\cup\gamma_R:=\{z\in\Bbb C\;z=Re^{it}\;,\;0&lt;\le t&lt;\pi\}\;$$

The only residue of $\;f\;$ within the domain enclosed by $\;C_R\;$ , with $\;R\;$ big enough, is $\;2i\;$ , so

$$\text{Res}_{z=2i}(f)=\lim_{z\to 2i}(z-2i)f(z)=\frac{2ie^{-2}}{4i}=\frac1{2e^2}$$

so by the Cauchy's RT

$$\oint\limits_{C_R}f(z)dz=2\pi i\frac1{2e^2}=\frac{\pi i}{e^2}$$

Now

$$\left|\int\limits_{\gamma_R}f(z)dz\right|\le\pi \max_{z\in\gamma_R}\frac{|z||e^{iz}|}{|4+z^2|}\le\pi\frac{Re^{-R\sin t}}{4-R^2}\xrightarrow[R\to\infty]{}0$$

so

$$\frac{\pi i}{e^2}=\lim_{R\to\infty}\oint\limits_{C_R}f(z)dz=\int\limits_{-\infty}^\infty \frac{xe^{ix}}{x^2+4}dx$$

and now just compare imaginary parts.