Showing that $\int_{-\infty}^{\infty}\frac{x^2}{(x^2+a^2)(x^2+b^2)}dx=\frac{\pi}{a+b}$ via Fourier Transform

Note that we can write

$$\begin{align} \int_{-\infty}^\infty \frac{x^2}{(x^2+a^2)(x^2+b^2)}\,dx&=\frac12\int_{-\infty}^\infty \frac{(x^2+b^2)+(x^2+a^2)}{(x^2+a^2)(x^2+b^2)}\,dx-\frac{1}2\int_{-\infty}^\infty\frac{a^2+b^2}{(x^2+a^2)(x^2+b^2)}\,dx\\\\ &=\frac12\int_{-\infty}^\infty \frac1{x^2+a^2}\,dx+\frac12\int_{-\infty}^\infty \frac1{x^2+b^2}\,dx\\\\ &-\frac{a^2+b^2}2\int_{-\infty}^\infty\frac{1}{(x^2+a^2)(x^2+b^2)}\,dx\\\\ &=\frac\pi {2a}+\frac\pi {2b} -\frac{a^2+b^2}2\int_{-\infty}^\infty\frac{1}{(x^2+a^2)(x^2+b^2)}\,dx\tag1 \end{align}$$

Now apply Parseval to the integral on the right-hand side of $(1)$ with $f(x)=\frac{1}{x^2+a^2}$ and $g(x)=\frac1{x^2+b^2}$ and $F(k)=\frac{\pi}{|a|}e^{-|a|k}$ and $G(k)=\frac\pi{|b|}e^{-|b|k}$.


HINT: Unless you’re dead-set on using the Fourier transform, I would try using that $$\frac{x^2}{(x^2+a^2)(x^2+b^2)}=\frac{1}{a^2-b^2}\bigg(\frac{a^2}{x^2+a^2}-\frac{b^2}{x^2+b^2}\bigg)$$


If you are able to use theorems from complex analysis (although it is likely you can not) then this integral is easily solved using the residue theorem. Since such an answer might be useful to others, I'll put it here for posterity.

First, note that

$$\int_{-\infty}^{\infty}\frac{z^2}{(z^2+a^2)(z^2+b^2)}dz=\lim_{R\to\infty}\left(\int_{0}^{R}\frac{z^2}{(z^2+a^2)(z^2+b^2)}dz+\int_{-R}^{0}\frac{z^2}{(z^2+a^2)(z^2+b^2)}dz\right)$$

Define $\gamma$ to be the counter-clockwise path traveled on the upper-plain semicircle of radius $R$. That is, $\gamma=\{Re^{i\theta}:0\leq \theta\leq \pi\}$. Turned into a line integral, this is

$$\int_\gamma \frac{z^2}{(z^2+a^2)(z^2+b^2)}dz=\int_{0}^{\pi} \frac{(Re^{i\theta})^2}{((Re^{i\theta})^2+a^2)((Re^{i\theta})^2+b^2)} Rie^{i\theta}d\theta$$

However, since the numerator has $R^3$ and the denominator has $R^4$, we know that

$$\lim_{R\to\infty}\left(\int_{0}^{\pi} \frac{(Re^{i\theta})^2}{((Re^{i\theta})^2+a^2)((Re^{i\theta})^2+b^2)} Rie^{i\theta}d\theta\right)=0$$

This implies

$$\lim_{R\to\infty}\left(\int_{0}^{R}\frac{z^2}{(z^2+a^2)(z^2+b^2)}dz+\int_{-R}^{0}\frac{z^2}{(z^2+a^2)(z^2+b^2)}dz\right)$$

$$=\lim_{R\to\infty}\left(\int_{0}^{R}\frac{z^2}{(z^2+a^2)(z^2+b^2)}dz+\int_{-R}^{0}\frac{z^2}{(z^2+a^2)(z^2+b^2)}dz+\int_\gamma \frac{z^2}{(z^2+a^2)(z^2+b^2)}dz\right)$$

Putting these three path integrals together, we get a simple closed curve (call it $\beta$) which starts at $(-R,0)$, goes to $(R,0)$, and then follows $\gamma$ back to $(-R,0)$. This implies the integral is equal to

$$=\lim_{R\to\infty}\left(\int_\beta \frac{z^2}{(z^2+a^2)(z^2+b^2)}dz\right)$$

Since this is a simple, closed, positively-oriented curve, the residue theorem applies. Now, for $R>\text{max}\{a,b\}$ the function

$$\frac{z^2}{(z^2+a^2)(z^2+b^2)}$$

has two singular points inside $\beta$ at $ia$ and $ib$. To calculate the residues at these points, we simply need

$$\text{Res}(ia)=\lim_{z\to ia} (z-ia)\frac{z^2}{(z^2+a^2)(z^2+b^2)}=\lim_{z\to ia} (z-ia)\frac{z^2}{(z-ia)(z+ia)(z^2+b^2)}$$

$$=\lim_{z\to ia}\frac{z^2}{(z+ia)(z^2+b^2)}=\frac{-a^2}{2ia(b^2-a^2)}=\frac{-a}{2i(b^2-a^2)}$$

For $ib$, we get a residue of

$$\text{Res}(ib)=\frac{-b}{2i(a^2-b^2)}$$

Then the residue theorem states

$$\int_\beta \frac{z^2}{(z^2+a^2)(z^2+b^2)}dz=2\pi i\left( \text{Res}(ia)+\text{Res}(ib)\right)$$

$$=2\pi i\left(\frac{-a}{2i(b^2-a^2)}+\frac{-b}{2i(a^2-b^2)}\right)=\frac{\pi}{a+b}$$

We conclude

$$\int_{-\infty}^{\infty}\frac{z^2}{(z^2+a^2)(z^2+b^2)}dz=\lim_{R\to\infty}\left(\int_\beta \frac{z^2}{(z^2+a^2)(z^2+b^2)}dz\right)$$

$$=\lim_{R\to\infty}2\pi i\left( \text{Res}(ia)+\text{Res}(ib)\right)=\lim_{R\to\infty}\frac{\pi}{a+b}=\frac{\pi}{a+b}$$