# Evaluate $\int_{-\infty}^{\infty}\frac{x^2dx}{(x^2+1)^2}$

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

My attempt:

$z=i$ is a pole with order $2$ in the upper part on the plain.

$$\text{Res} (f,i)=\lim\limits_{x\to i}\frac{x^2}{(x+i)^2}=\frac 1 4$$

$$\Longrightarrow \int_{-\infty}^{\infty} f(x)=\frac{\pi i}{2}$$

but the answer should be $\frac{\pi }{2}$

• $$\frac{\pi}{2}$$ is the right result Jan 30, 2016 at 15:18

If $a$ is a $p$th order pole of $f$, $\text{Res}\left(f,\,a\right)=\left.\partial_z^{p-1}\left(\left(z-a\right)^p f\left(z\right)\right)\right|_{z=a}$. In this case $$\text{Res}\left(\frac{z^2}{\left(z^2+1\right)^2},\,i\right)=\left.\partial_z\left(\frac{z^2}{\left(z+i\right)^2}\right)\right|_{z=i}=\left.\frac{2iz}{\left(z+i\right)^3}\right|_{z=i}=\frac{2i^2}{8i^3}=\frac{1}{4i}.$$ Multiplying by $2\pi i$ gives $\frac{\pi}{2}$.

You have an error in the residue formula.

Since $i$ is a pole of order $2$, $Res(f,i) = \frac{1}{(2-1)!}\lim\limits_{x\rightarrow i}\frac{d}{dx}(x-i)^2f(x) = \lim\limits_{x\rightarrow i}\frac{2xi}{(x+i)^3}=\frac{1}{4i}$.

So, the integral equals $\frac{2\pi i}{4i}=\frac{\pi}{2}$.

Using more elementary methods, notice that $d(1+\frac{1}{x})=1-\frac{1}{x^{2}}$, and $d(1-\frac{1}{x})=1+\frac{1}{x^{2}}$. Then the integrand is basically $\frac{1}{2}\frac{(1-1/x^{2})+(1+1/x^{2})}{x^{2}+1/x^{2}+2}$, and so the integral is $(\int_{\infty}^{2} \frac{dz}{z^{2}}+\int_{2}^{\infty} \frac{dz}{z^{2}})+\int_{-\infty}^{\infty} \frac{dy}{y^{2}+4}$ where $z=(x+1/x)$ and $y=(x-1/x)$. The first two integrals essentially sum to 0, and it is only the latter integral $\int_{-\infty}^{\infty} \frac{dy}{y^{2}+4}$ that counts.

Edit: Another way of seeing that the contribution from the first two integrals vanishes, is to use a change of variables $x \rightarrow 1/x$, to see that $\int_{0}^{\infty} \frac{1}{x^{2}}\frac{dx}{x^{2}+1/x^{2}+2}=\int_{0}^{\infty} \frac{dx}{x^{2}+1/x^{2}+2}$ , and thus $\int_{0}^{\infty}(1-\frac{1}{x^{2}})\frac{dx}{x^{2}+1/x^{2}+2}=0$.

Another more elementary way to solve it would be to use $x=\tan{\theta}$ $$\mathrm{d}x=\sec^2\theta\mathrm{d}\theta$$ $$\Rightarrow \int_{-\infty}^{+\infty}\frac{x^2}{(1+x^2)^2}\mathrm{d}x=\int_{-\pi/2}^{\pi/2}\frac{\tan^2\theta \sec^2\theta}{(1+\tan^2\theta)^2}\mathrm{d}\theta=\int_{-\pi/2}^{\pi/2}\frac{\tan^2\theta\sec^2\theta}{\sec^4\theta}\mathrm{d}\theta=\int_{-\pi/2}^{\pi/2}sin^2\theta\mathrm{d}\theta=\frac{\pi}{2}$$