I want to calculate $\displaystyle\int_{-\infty}^{\infty} \dfrac{x \sin(\pi x)}{(x-3)(x-2)} dx.$
Let $f(z)=\dfrac{ze^{i\pi z}}{(z-3)(z-2)}$ .
Integral Contour;
$C$ : $[-R, R]$
$C_R$ : $z=Re^{i\theta}, \theta : 0 \to \pi.$
$\displaystyle\int_{C_R} f(z) \to 0.$
$\text{Res}(f, 3)=-3, \text{Res}(f, 2)=-2$.
From Residue Theorem, $\displaystyle\int_{-\infty}^{\infty} f(x) dx=2\pi i (-3-2)=-10\pi i.$
Therefore, $\displaystyle\int_{-\infty}^{\infty} \dfrac{x \sin(\pi x)}{(x-3)(x-2)} dx=-10\pi.$
But according to wolfram alpha, $\displaystyle\int_{-\infty}^{\infty} \dfrac{x \sin(\pi x)}{(x-3)(x-2)} dx=-5\pi.$ https://www.wolframalpha.com/input/?i=%5Cint_%7B-%5Cinfty%7D%5E%7B%5Cinfty%7D+xsin%28%5Cpi+x%29%2F%7B%28x-3%29%28x-2%29%7D+dx&lang=ja
Where did I mistake ?
You are trying to apply here the theorem that says that, in order to compute an integral of the sort $\int_{-\infty}^\infty f(x)e^{i\alpha x}\,\mathrm dx$, with $\alpha>0$, you see $f$ as an analytic function from $f\colon\Bbb C\setminus F\longrightarrow\Bbb C$, where $F$ is a finite subset of $\Bbb C\setminus\Bbb R$, then, if $\lim_{z\to\infty}f(z)=0$,$$\int_{-\infty}^\infty f(x)e^{i\alpha x}\,\mathrm dx=2\pi i\sum_{z_0\in F,\ \operatorname{Im} z_0>0}\operatorname{res}_{z=z_0}\left(f(z)e^{i\alpha z}\right).$$But you cannot apply it here, since your $F$ is the set $\{2,3\}$. It should be a set of complex non-real numbers.