Improper integral of rational function $k^2/(1+a^2k^2)^2$ I've got the integral $\int^\infty_{-\infty} dk \frac{k^2}{(1+a^2 k^2)^2}$ where $a$ is a real number.  I can't seem to find a $u$-substitution or trigonometric substitution that will work.  Any hints?
 A: Assuming that $a>0$,
$$\begin{eqnarray*}\int_{\mathbb{R}}\frac{x^2\,dx}{(1+a^2 x^2)^2}&=&\frac{1}{a^3}\int_{\mathbb{R}}\frac{x^2\,dx}{(1+x^2)^2}=\frac{1}{a^3}\left(\int_{\mathbb{R}}\frac{dx}{1+x^2}-\int_{\mathbb{R}}\frac{dx}{(1+x^2)^2}\right)\\&=&\frac{1}{a^3}\left(\pi-\frac{\pi}{2}\right)=\color{red}{\frac{\pi}{2a^3}}.\end{eqnarray*}$$
The two integrals $\int_{\mathbb{R}}\frac{dx}{x^2+1}$ and $\int_{\mathbb{R}}\frac{dx}{(x^2+1)^2}$ can be evaluated by simply computing the residue of the integrand function in the pole with positive imaginary part $x=i$. 
Hence we have, for any $a\in\mathbb{R}\setminus\{0\}$:

$$\int_{\mathbb{R}}\frac{x^2\,dx}{(1+a^2 x^2)^2}=\frac{\pi}{2|a|^3}.$$

A: Try $u = \tan(k)/a$.  Be careful when handling the endpoints.
A: Let's write the integral as

$$ I = 2\int^\infty_{0} dk \frac{k^2}{(1+a^2 k^2)^2}. $$

Use the change of variables $1+a^2k^2=\frac{1}{u}$ which will cast the integral in terms of the beta function 

$$ I = \frac{1}{a^3} \int^1_{0} u^{-1/2}(1-u)^{1/2}du =\frac{1}{a^3} \frac{\Gamma(1/2)\Gamma(3/2)}{\Gamma(2)}=\frac{\Gamma(1/2)^2}{2a^3} = \frac{\pi}{4a^3}. $$

See related techniques. 
Note: The beta function is defined as

$$ \mathrm{\beta}(x,y) = \int_0^1t^{x-1}(1-t)^{y-1}\,\mathrm{d}t \,\quad Re(x)>0,\, Re(y)>0.  $$

Notes: 
1)

$$ \Gamma(1/2)= \sqrt{\pi}. $$

2) It is a general technique that allows you to handle more harder problems as you can see in the links.
