Evaluate $\int_{-\infty}^\infty \frac{1}{(x^2 + D^2)^2}dx$. $$\int_{-\infty}^\infty \frac{1}{(x^2 + D^2)^2}dx$$
Edit : $D> 0$.
My work:
Let $x = D\tan \theta$
$$\int_{-\infty}^\infty \frac{1}{(x^2 + D^2)^2}dx=\int_{-\infty}^\infty \frac{1}{(D^2\sec^2 \theta)^2}dx$$
$$=\int_{-\infty}^\infty \frac{1}{(D^2\sec^2 \theta)^2}D\sec^2\theta d\theta
= \frac{1}{D^3}\int_{-\infty}^\infty \cos^2 \theta d\theta$$
$$=\frac{1}{D^3}[\frac{\theta}{2} + \frac{\sin {2\theta}}{4} + C]_{-\infty}^\infty$$
Put $\theta = \arctan{\frac{x}{D}}$;
$$=\frac{1}{D^3}[\frac{\arctan{\frac{x}{D}}}{2} + \frac{\sin {(2\arctan{\frac{x}{D})}}}{4} + C]_{-\infty}^\infty$$
We get the integral as $\frac{\pi}{2D^3}$. Since $\lim_{x \to +\infty} \arctan(x) = \frac{\pi}{2}$ and $\lim_{x \to -\infty} \arctan(x) = \frac{-\pi}{2}$
I feel something isn't right here. Can anyone point the mistake please. Thank you very much.

Here is another method to solve. Let
\begin{eqnarray}
I&=&\int_{-\infty}^\infty \frac{1}{(x^2 + D^2)^2}dx=\frac{2}{D^3}\int_{0}^\infty \frac{1}{\bigg[\big(\frac{x}{D}\big)^2 + 1)\bigg]^2}d(\frac xD)\\
&\stackrel{x/D\to x}{=}&\frac{2}{D^3}\int_{0}^\infty \frac{1}{(x^2 + 1)^2}dx\tag1\\
&\stackrel{1/x\to x}{=}&\frac{2}{D^3}\int_{0}^\infty \frac{x^2}{(x^2 + 1)^2}dx\\\tag2.
\end{eqnarray}
Adding (1) to (2) gives
\begin{eqnarray}
2I&=&\frac{2}{D^3}\int_{0}^\infty \frac{x^2+1}{(x^2 + 1)^2}dx\\
&=&\frac{2}{D^3}\int_{0}^\infty \frac{1}{x^2+1}dx\\
&=&\frac{2}{D^3}\cdot\frac{\pi}{2}
\end{eqnarray}
and hence $I=\frac{\pi}{2D^3}$.
