How do I integrate $\int_{-\infty}^\infty {x^2\over(x^2+1)^2}\mathrm dx$ I'm hinted to use $x = a\tan(\theta)$, but after simplifying everything, I'm ending up with a bunch of $\sec(\theta)$ to powers of 2 and 4 on the numerator and denominator. Nothing is cancelling out.
 A: If $a>0$ we have
$$ I(a) = \int_{-\infty}^{+\infty}\frac{dx}{a+x^2}=\frac{\pi}{\sqrt{a}}\tag{1} $$
hence:
$$ -I'(a) = \int_{-\infty}^{+\infty}\frac{dx}{(a+x^2)^2}=\frac{\pi}{2a\sqrt{a}}\tag{2} $$
and by $(1)$ and $(2)$ at $a=1$ we get:
$$ \int_{-\infty}^{+\infty}\frac{x^2}{(1+x^2)^2}\,dx = I(1)+I'(1) = \color{red}{\frac{\pi}{2}}.\tag{3}$$
A: Let $x=\tan u$. Note $\mathrm{d}x=\sec^2 u \mathrm{d}u$.  The integral becomes $$\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}}\frac{\tan^2 u }{\sec^2 u}\;\mathrm{d}u  =\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}}\sin^2 u\;\mathrm{d}u =\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}}\frac{1-\cos 2u}{2}\mathrm{d}u=\frac{\pi}{2}$$
As $$\frac{\tan^2 x}{\sec^2 x}=\frac{\sin^2 x}{\cos^2 x} \times \frac{\cos^2 x}{1}=\sin^2 x$$And from using the half angle formula. 
A: Setting
$$
x=\tan\theta,
$$
we have
\begin{eqnarray}
\int_{-\infty}^\infty\dfrac{x^2}{(x^2+1)^2}\,dx&=&\int_{-\pi/2}^{\pi/2}\dfrac{\tan^2\theta}{(\tan^2\theta+1)^2}\cdot(1+\tan^2\theta)\,d\theta=2\int_0^{\pi/2}\dfrac{\tan^2\theta}{\tan^2\theta+1}\,d\theta\\
&=&2\int_0^{\pi/2}\left(1-\dfrac{1}{\tan^2\theta+1}\right)\,d\theta=\pi-2\int_0^{\pi/2}\cos^2\theta\,d\theta\\
&=&\pi-\int_0^{\pi/2}(1+\cos2\theta)\,d\theta=\pi-\dfrac{\pi}{2}=\dfrac{\pi}{2}
\end{eqnarray}
A: HINT: we have $$\frac{x^2}{x^2+1}=\frac{x^2+1-1}{x^2+1}=1-\frac{1}{x^2+1}$$
in the corrected case write
$$\frac{x^2}{(x^2+1)^2}=x\cdot \frac{x}{(x^2+1)^2}$$ and use Integration by parts
A: Note that $$I=\int_{-\infty}^{\infty}\frac{x^{2}}{\left(1+x^{2}\right)^{2}}dx=2\int_{0}^{\infty}\frac{x^{2}}{\left(1+x^{2}\right)^{2}}dx$$ $$\stackrel{x^{2}=u}{=}\int_{0}^{\infty}\frac{u^{1/2}}{\left(1+u\right)^{2}}du=B\left(\frac{3}{2},\frac{1}{2}\right)=\color{red}{\frac{\pi}{2}}$$ which follows from the identity $$B\left(m+1,n+1\right)=\int_{0}^{\infty}\frac{u^{m}}{\left(1+u\right)^{m+n+2}}du$$ and obviously $B(x,y)$ is the Beta function.
A: Use partial fractions to break up the fraction and integrate separately from there, or use a trig sub and let $x=\tan(\theta)$ then simplify using trig identities to integrate. Finally, use limits to evaluate the bounds of $+\infty$ and $-\infty$.
A: Put $x=\tan(z)$  then integrate changing limits
A: Glaisher's theorem says that if $f(x)$ is an even meromorphic function with series expansion around $x = 0$ given by:
$$f(x) = \sum_{k=0}^{\infty} (-1)^k a_k x^{2k}$$
then:
$$\int_{-\infty}^{\infty}f(x) dx = \pi a_{-\frac{1}{2}}$$
if the integral converges. Here $a_{-\frac{1}{2}}$ looks to be an ill defined quantity, it is defined by analytic continuation after expressing the expansion coefficients in terms of factorials and replacing those factorials by gamma functions. In practice it just boils down to substituting $k = -\frac{1}{2}$ in an analytic formula for the expansion coefficients.
In this case the series expansion is easily found, e.g. by considering the geometric series for $\frac{1}{1+x}$, differentiating that series term by term to obtain the series for $\frac{1}{(1+x)^2}$, multiplying by $x$ to obtain the series for $\frac{x}{(1+x)^2}$ and finally replacing $x$ by $x^2$ to obtain the result:
$$\frac{x^2}{(1+x^2)^2} = \sum_{k=0}^{\infty}(-1)^k (-k) x^{2k}$$
We thus have $a_{-\frac{1}{2}} = \frac{1}{2}$, the integral is thus equal to $\frac{\pi}{2}$.
