The problem is to evaluate (with proof)
$$f(a) = \int_{0}^{\infty} \frac{x^2}{(x^2 - a^2)^2 + x^2} \text{ d}x$$
where $a$ is a real number.
Scroll down for a solution.
Surprisingly, the answer is independent of $a$!.
For $a=0$, the integral is the standard $\int_{0}^{\infty} \frac{dx}{1+x^2} = \frac{\pi}{2}$.
A valuable tool when evaluating integrals is substitution and it really helps here.
First, assume $a \neq 0$, and make the substitution $u = \frac{a^2}{x}$
This gives us that
$$f(a) = \int_{0}^{\infty} \frac{\frac{a^4}{u^2}}{((\frac{a^4}{u^2} - a^2)^2 + \frac{a^4}{u^2})} \frac{a^2\text{d}u}{u^2}$$
$$ = \int_{0}^{\infty} \frac{a^2}{(u^2 - a^2)^2 + u^2} \text{ d}u$$
$$ = \int_{0}^{\infty} \frac{a^2}{(x^2 - a^2)^2 + x^2} \text{ d}x$$
Thus by adding the original, we get that
$$2f(a) = \int_{0}^{\infty} \frac{x^2 + a^2}{(x^2 - a^2)^2 + x^2} \text{ d}x$$
$$ = \int_{0}^{\infty} \frac{1 + \frac{a^2}{x^2}}{(x - \frac{a^2}{x})^2 + 1} \text{ d}x$$
Now make the substitution $u = x - \frac{a^2}{x}$ to get
$$2f(a) = \int_{-\infty}^{\infty} \frac{1}{u^2 +1} \text{ d}u = \pi$$
And so
$$\int_{0}^{\infty} \frac{x^2}{(x^2 - a^2)^2 + x^2} \text{ d}x = \frac{\pi}{2}$$
Note: The substitutions need to be justified because technically, the integral is an improper integral, but we leave that to the reader :)