2

I am interested in the solution to this integral:

$$ I := \int_{-\infty}^{\infty} \frac{\sin^2(x)}{x^2(x^2 + 1)} \, dx. $$


My question:

  • How can I solve this integral differently, apart from Residue Theorem or my approach?

I use a version of Feynman's trick: introduce a parameter and differentiate under the integral sign. Define $$ I(t) := \int_{-\infty}^{\infty} \frac{\sin^2(tx)}{x^2(x^2 + 1)} \, dx. $$

Then the value we seek is simply $ I(1).$


Feynman's Trick - Differentiate under the integral sign

First derivative: \begin{aligned} I'(t) &= \int_{-\infty}^{\infty} \frac{2x \sin(tx) \cos(tx)}{x^2(x^2 + 1)} \, dx \\ &= \int_{-\infty}^{\infty} \frac{\sin(2tx)}{x(x^2 + 1)} \, dx \end{aligned}

Second derivative: $$ I''(t) = 2 \int_{-\infty}^{\infty} \frac{\cos(2tx)}{x^2 + 1} \, dx. $$

Third derivative:

\begin{aligned} I^{(3)}(t) &= -4 \int_{-\infty}^{\infty} \frac{x \sin(2tx)}{x^2 + 1} \, dx \\ &= -4 \int_{-\infty}^{\infty} \frac{x^2}{x^2 + 1} \cdot \frac{\sin(2tx)}{x} \, dx. \end{aligned}

Now use the identity $$ \frac{x^2}{x^2 + 1} = 1 - \frac{1}{x^2 + 1}, $$ so
\begin{aligned} I^{(3)}(t) &= -4 \int_{-\infty}^{\infty} \frac{\sin(2tx)}{x} \, dx + 4 \int_{-\infty}^{\infty} \frac{\sin(2tx)}{x(x^2 + 1)} \, dx \\ &= -4 \cdot \pi + 4I'(t), \end{aligned}

using the Dirichlet integral, which is well-known (and can be solved similarly using Feynman's trick): $$ \int_{-\infty}^{\infty} \frac{\sin(ax)}{x} \, dx = \pi \cdot \text{sgn}(a) = \pi \quad \text{for } a > 0. $$

Thus, we have the differential equation: $$ I^{(3)}(t) - 4I'(t) = -4\pi. $$


Quickly solving the differential equation

$$ I^{(3)}(t) - 4I'(t) = -4\pi. $$

The homogeneous equation: $$ y^{(3)} - 4y' = 0 \quad \Rightarrow \quad r(r^2 - 4) = 0 \quad \Rightarrow \quad r = 0, \pm 2. $$

The general solution to the homogeneous part is: $$ I_{\text{hom}}(t) = c_1 + c_2 e^{2t} + c_3 e^{-2t}. $$

Try a particular solution of the form ( I_p(t) = At ). Then: $$ I_p^{(3)}(t) - 4I_p'(t) = -4A = -4\pi \Rightarrow A = \pi. $$

So the full general solution is: $$ I(t) = c_1 + c_2 e^{2t} + c_3 e^{-2t} + \pi t. $$


With a few properties of $I(t)$, one can set up equations to determine the coefficients.

  • $I(0) = \int_{-\infty}^{\infty} \frac{\sin^2(0)}{x^2(x^2 + 1)} \, dx = 0$,

  • $I'(0) = \int_{-\infty}^{\infty} \frac{\sin(0)}{x(x^2 + 1)} \, dx = 0$,

  • $I''(0) = 2 \int_{-\infty}^{\infty} \frac{1}{x^2 + 1} \, dx = 2\pi $.

So:

  • $c_1 + c_2 + c_3 = 0$,

  • $2c_2 - 2c_3 + \pi = 0$,

  • $4c_2 + 4c_3 = 2\pi$.

From the third equation:

$$ c_2 + c_3 = \frac{\pi}{2}. $$

From the second:

$$ c_2 - c_3 = -\frac{\pi}{2}. $$

Solving gives:

  • $c_2 = 0$,

  • $c_3 = \frac{\pi}{2}$,

  • $c_1 = -c_2 - c_3 = -\frac{\pi}{2}$.

So:

$$ I(t) = -\frac{\pi}{2} + \frac{\pi}{2} e^{-2t} + \pi t. $$


We wanted:

$$ \int_{-\infty}^{\infty} \frac{\sin^2(x)}{x^2(x^2 + 1)} \, dx = I(1), $$

so:

$$ \begin{aligned} I(1) &= -\frac{\pi}{2} + \frac{\pi}{2} e^{-2} + \pi \\ &= \frac{\pi}{2} ( -1 + e^{-2} + 2 ) \\ &= \frac{\pi}{2} (1 + e^{-2}). \end{aligned} $$


$$ \boxed{ \int_{-\infty}^{\infty} \frac{\sin^2(x)}{x^2(x^2 + 1)} \, dx = \frac{\pi}{2} (1 + e^{-2}) } $$

Samuel
  • 1,051

3 Answers3

3

We have:$$2\sin^2(x)=1-\cos(2x)$$ $$\int_0^{\infty}\frac{\cos(ax)}{1+x^2}dx=\frac{\pi}{2}e^{-|a|}$$ Thus: $$\begin{align*} I &= \frac{\pi}{2}+\int_0^{\infty}\frac{\cos(2x)}{1+x^2}dx \\ &= \frac{\pi}{2} + \frac{\pi}{2}e^{-2} \end{align*}$$

Delta
  • 1
  • I‘m assuming you used the trig reduction formula and you also assume the result of the other integral to be trivial? How did you split the integrand? – Samuel May 31 '25 at 16:20
  • Look this :https://math.stackexchange.com/questions/3220248/evaluating-int-0-infty-frac-cosaxx21dx-without-complex-analysis-or-f?noredirect=1 – Delta May 31 '25 at 16:22
3

Note that, with $I(a)=\int_0^{\infty}\frac{\cos ax}{1+x^2}dx$ \begin{align} I’(a)&=- \int_0^{\infty}\frac{x\sin ax}{1+x^2}dx = -\int_0^{\infty} \int_0^{\infty} \sin ax\cos t \ e^{-x t} dt \ dx\\ &=- \int_0^{\infty} \frac{a\cos t}{a^2+t^2}dt \overset{ t\to at}=I(a)\\ \end{align} which leads to $I(a)=I(0)e^{-a}= \frac\pi2 e^{-a}$ and $$ \int_{-\infty}^{\infty} \frac{\sin^2x}{x^2(x^2 + 1)} dx = \int_{0}^{\infty}\frac{2\sin^2x}{x^2}-\frac1{1+x^2}+\frac{\cos 2x}{1+x^2}\ dx\\ = \pi -\frac\pi2 +\frac\pi 2 e^{-2} $$

Quanto
  • 120,125
0

Working the antiderivative $$I=\int\frac{\sin^2(x)}{x^2(x^2 + 1)} \, dx=\frac 12\int \Bigg(\frac 1{x^2(x^2+1)}-\frac{\cos(2x)}{x^2(x^2+1)} \Bigg)\,dx$$ $$I_1=\int \frac{dx}{x^2(x^2 + 1)}=\int \frac{dx}{x^2}-\int\frac{dx}{x^2+1}=-\frac{1}{x}-\tan ^{-1}(x)$$ Doing the same for $$I_2=\int \frac{\cos(2x)}{x^2}\,dx$$ one itegration by parts gives $$I_2=-\frac{\cos (2 x)}{x}-2\, \text{Si}(2 x)$$ So, what remains is $$I_3=\int \frac{\cos(2x)}{x^2+1}\,dx=\frac i2 \Bigg(\int \frac{\cos (2 x)}{x+i}\,dx -\int \frac{\cos (2 x)}{x-i} \,dx \Bigg)$$ $$\int \frac{\cos (2 x)}{x+a}\,dx=\int \frac{\cos (2 (t-a))}{t}\,dt$$ Expanding the cosine $$\cos (2 (t-a))=\sin (2 a) \sin (2 t)+\cos (2 a) \cos(2 t) \tag 1$$ $$\int \frac {\sin(2t)}t \,dt=\int \frac {\sin(u)}u \,du=\text{Si}(u)$$ $$\int \frac {\cos(2t)}t \,dt=\int \frac {\cos(u)}u \,du=\text{Ci}(u)$$ So, we have $I_3$ using $a=\pm i$ which will lead to hymerbolic sine and cosines for the front factors in $(1)$.

Recombining all the above and considering the integral between $-p\pi$ and $p\pi$, assuming that $p$ is an integer, a series expansion gives

$$J=\int_{-p \pi}^{+p \pi}\frac{\sin^2(x)}{x^2(x^2 + 1)} \, dx=\frac{\left(1+e^2\right) \pi }{2 e^2}-\frac{1}{3 (p\pi)^3 }+\frac{6}{5 (p\pi)^5}-\frac{64}{7 (p\pi)^7}+O\left(\frac{1}{p^9}\right)$$ which is a very good approximation.