I am trying to show that:
$$\int_{0}^{\infty} \frac{x^2}{(x^2 + a^2)^2} dx = \frac{\pi}{4a}$$
I know that this can be represented as $f(z) = \frac{z^2}{(z^2 + a^2)^2} dz$, and that this function will have poles at $z = \pm ia$. And I also know that this integral will equal the sum of the residues at the two poles multiplied by $2\pi i$, $z = ia$ and $z = -ia$. But from here I am a little confused as to how to get this answer of $\frac{\pi}{4a}$.
When I calculate the residue at $z = ia$ with order $= 2$, I get:
$$Res(f(z); z_0=ia) = \frac{1}{(2-1)!} \lim_{z \to ia} (z-ia)^2 \frac{d}{dz}\left( \frac{1}{(z^2 + a^2)^2} \right),$$ which equals:
$$\lim_{z \to ia} \frac{-(z-ia)^2}{4z(z^2 + a^2)^3}$$
But this evaluates to zero in the denominator when taking the limit. I am also getting zero in the denominator for the pole at $z = -ia$. Can anyone see where I am going wrong and help me fix this?
I believe that I have found the way to do it in spirit of how my course is taught. While @dan_fulea answer is correct, we haven't been taught to evaluate integrals using O(h) functions. This is how I I ended up solving this:
Prove that: $\int_{0}^{\infty} \frac{x^2}{(x^2 + a^2)^2} = \frac{\pi}{4a}$
We can solve this by the fact that:
$\int_{0}^{\infty} \frac{x^2}{(x^2 + a^2)^2} = \frac{1}{2} \int_{-\infty}^{\infty} \frac{x^2}{(x^2 + a^2)^2} --- Eq (1)$
First we want to find if there are any singularities/poles to this function, so let it become a function of z. $f(z) = \frac{z^2}{(z^2 + a^2)^2}$ , we will find that the roots are $z = +/- ia$ both of Order = 2. From there we can calculate this integral by calculating the sum of the residues of the singularities/poles. We will only consider the pole $z = + ia$, as the contour we are integrating over will be a semi circle only covering the upper half plane, and therefore will only enclose the pole $z = + ia$. We will call this integral I, and the pole's order of 2 will be equal to n:
$I = 2\pi i (Res(f(z);z_0 = ia))$ $= 2\pi i (\frac{1}{(n-1)!})\lim_{y\to z_o} \frac{d^{n-1}}{dz^{n-1}}[(z-z_0)^n (\frac{z^2}{(z^2 + a^2)^2})]$
$= 2\pi i (\frac{1}{(2-1)!})\lim_{y\to ia} \frac{d}{dz}[(z-ia)^2 (\frac{z^2}{z^2 + a^2})]$
Now to help simplify this, we can use the fact that $(z^2 + a^2) = (z+ia)(z-ia)$. Substituting into our equation we get:
$= 2\pi i \lim_{y\to ia} \frac{d}{dz}[(z-ia)^2 (\frac{z^2}{(z+ia)^2(z-ia)^2})]$ . Now cancel out the $(z-ia)^2$ terms to get:
$= 2\pi i \lim_{z \to ia} \frac{d}{dz}(\frac{z^2}{(z + ia)^2})$ . Taking the derivative we will get:
$= 2\pi i \lim_{z \to ia}(\frac{2iaz}{(z + ia)^3})$
$= 2 \pi i \frac{2ia(ia)}{(ia + ia)^3}$
$ = 2 \pi i \frac{2i^2a^2}{(2ia)^3}$
$ = 2 \pi i \frac{2i^2a^2}{8i^3a^3}$
$= \frac{4 \pi i}{8ia}$
$= \frac{2\pi}{4a}$
Now divide by two to satisfy Eq (1):
$= \frac{2\pi}{8a} = \frac{\pi}{4a}$
Thank you to all who took their time to try to help me solve this!