Computation real integral with residue theorem

I need to compute $$I:=\int_{-\infty}^{\infty} \frac{\sin(ax)}{x(\pi^2-a^2x^2)}dx$$ ($a>0$)

Probably there is a way to compute it with residue theorem.

My thoughts:

  • The singularity at $x=0$ is removable
  • $I=\displaystyle \DeclareMathOperator{Im}{Im} \Im \left( \int_{-\infty}^{\infty} \frac{e^{iax}}{x(\pi^2-a^2x^2)}dx \right)$ . I usually solve those integrals by using the residue theorem to integrate over the upper semicircle (then the integral over the arc goes to 0 as the radius goes to $\infty$ and we are left with I) but this doesn't work since we have non-removable singularities. I also thought about integrating over a circular sector whose border doesn't contain the singularities (the integrand is an even function) but then the integral over the arc does not go to $0$ anymore and I don't get the expression for $I$ anyway.

$$I=\int\frac{\sin (a x)}{x \left(\pi ^2-a^2 x^2\right)}\,dx=\int \frac{\sin (t)}{(t-\pi)t(t+\pi) }\,dt$$ $$\frac{1}{(t-\pi)t(t+\pi) }=\frac 1 {\pi^2}\Bigg[\frac{1}{2 (t-\pi )}+\frac{1}{2 (t+\pi )}-\frac{1}{t} \Bigg]$$

Consider $$\int \frac {\sin(t)}{t+k}\,dt=\int\frac {\sin(u-k)}{u}\,du=\cos (k)\int\frac{ \sin (u)}{u}\,du-\sin (k)\int\frac{ \cos (u)}{u}\,du$$ So now, you just face sine and cosine integrals.

Back to $x$, you will have $$I=\frac 1{2\pi^2}\Big[2 \text{Si}(a x)+\text{Si}(ax-\pi )+\text{Si}(a x+\pi ) \Big]$$ $$J=\int_{-p}^{+p}\frac{\sin (a x)}{x \left(\pi ^2-a^2 x^2\right)}\,dx=\frac 1{\pi^2}\Big[2 \text{Si}(a p)+\text{Si}(ap-\pi )+\text{Si}(a p+\pi ) \Big]\sim \frac 4{\pi^2}\text{Si}(a p)$$ Now, using the asymptotics $$K=\int_{-\infty}^{+\infty}\frac{\sin (a x)}{x \left(\pi ^2-a^2 x^2\right)}\,dx=\frac{2 |a|}{\pi a}$$


Assume without loss of generality that $a$ is positive. Using the change of variable $ax=\pi t$ we get rid of $a$ $$ I = \frac{1}{\pi^2} \int_{-\infty}^\infty \frac{\sin \pi t}{t(1-t)(1+t)}\,\mathrm dt $$ Apply the residue theorem (or Cauchy's theorem) to $\frac{e^{\pi i t}}{t(1-t)(1+t)}$ with the following contour enter image description here

The large semi-circle has radius $\rho$ and the small ones have radius $\delta$. Take the imaginary part both sides, then use dominated convergence theorem as $\rho \to \infty$ and $\delta \to 0$.

EDIT

For example, the integral around $t=1$ is $$ I_1(\delta) = \int_0^\pi \frac{\exp(\pi i(\overbrace{1+\delta e^{i\theta}}^{t}) )}{(\underbrace{1+\delta e^{i\theta}}_{t}) (\underbrace{-\delta e^{i\theta}}_{1-t}) (\underbrace{2+\delta e^{i\theta}}_{1+t})} \underbrace{(-i \delta e^{i\theta})\,\mathrm d\theta}_{\mathrm dt} =-i\int_0^\pi \frac{ \exp(\pi i \delta e^{i\theta})}{(1+\delta e^{i\theta})(2+\delta e^{i\theta})}\,\mathrm d\theta $$ The integrand is continuous in $(\delta,\theta)$ for $\delta$ small enough, so we can use DCT (or any « continuity under $\int$ » theorem) to get $$ I_1 :=\lim_{\delta\to 0} I_1(\delta) = -i \int_0^\pi \frac{1}{2}\,\mathrm d\theta = -\frac{\pi i}{2} $$ Similarly $I_{-1} = -\frac{\pi i}{2}$ and $I_0=-\pi i$. Hence, as $\rho \to \infty$ and $\delta\to 0$ $$ \int_{-\infty}^\infty \frac{\sin \pi t}{t(1-t)(1+t)}\,\mathrm dt = -\operatorname{Im}(I_{-1} + I_0 + I_1) = 2\pi $$


Not a solution

Partial Fraction Decomposition of the denominator is straight forward as

$$ \frac{A}{x} + \frac{B}{\pi-ax} + \frac{C}{\pi+ax} $$

Remains the Sine Integral type. You might consider their asymptotic behavior or win with Residue Calculus.