# Complex: evaluating integral with residues

Having a bit of trouble here.

Having this integral $$\int_{0}^{\infty} \frac{dx}{(x^{2}+1)(x^{2}+4)^{2}}$$ I can tell it's even, so it has symmetry. Thus, $$\frac{1}{2} \int_{-\infty}^{\infty} \frac{dx}{(x^{2}+1)(x^{2}+4)^{2}}$$ The function $f(z)$ has poles at $\pm i$ and $\pm 2i$, but i can only focus on $i$ and $2i$ since I will use the residue theorem with a semicircular contour in the upper half plane.

Now this is the part that confuses me, $$Res_{z=i}f(z) = \frac{d}{dz} \frac{1}{(z+i)(z+2i)^2(z-2i)^2}$$

When trying to solve for it, I get a completely different answer than mathematica gives. What is the most optimal and practical way of evaluating this?

• At $i$, the integrand has a simple pole, so you shouldn't differentiate, the residue at $i$ is simply $\frac{1}{(i+i)(i^2+4)^2} = \frac{1}{18i}$. Mar 6, 2016 at 16:53
• Do you 'have to' use residues? Mar 6, 2016 at 17:12
• @DanielFischer okay, thats what i thought. But would i only differentiate when looking for the pole of order 2? Mar 6, 2016 at 18:51
• Yes, you'd only differentiate for poles of order $> 1$. It is however often more convenient to use other techniques. Here a partial fraction decomposition is an option, and for small orders of the pole, a Taylor expansion of the holomorphic factor to the required order is often less work than differentiating. Mar 6, 2016 at 19:06

$$\int_{0}^{\infty}\frac{1}{\left(x^2+1\right)\left(x^2+4\right)^2}\space\text{d}x=\lim_{n\to\infty}\int_{0}^{n}\frac{1}{\left(x^2+1\right)\left(x^2+4\right)^2}\space\text{d}x=$$ $$\lim_{n\to\infty}\int_{0}^{n}\left[\frac{1}{9\left(x^2+1\right)}-\frac{1}{3\left(x^2+4\right)^2}-\frac{1}{9\left(x^2+4\right)}\right]\space\text{d}x=$$ $$\lim_{n\to\infty}\left[\int_{0}^{n}\frac{1}{9\left(x^2+1\right)}\space\text{d}x-\int_{0}^{n}\frac{1}{3\left(x^2+4\right)^2}\space\text{d}x-\int_{0}^{n}\frac{1}{9\left(x^2+4\right)}\space\text{d}x\right]=$$ $$\lim_{n\to\infty}\left[\frac{1}{9}\int_{0}^{n}\frac{1}{x^2+1}\space\text{d}x-\frac{1}{3}\int_{0}^{n}\frac{1}{\left(x^2+4\right)^2}\space\text{d}x-\frac{1}{9}\int_{0}^{n}\frac{1}{x^2+4}\space\text{d}x\right]=$$ $$\lim_{n\to\infty}\left[\frac{1}{9}\int_{0}^{n}\frac{1}{x^2+1}\space\text{d}x-\frac{1}{3}\int_{0}^{n}\frac{1}{\left(x^2+4\right)^2}\space\text{d}x-\frac{1}{9}\int_{0}^{n}\frac{1}{4\left(\frac{x^2}{4}+1\right)}\space\text{d}x\right]=$$ $$\lim_{n\to\infty}\left[\frac{1}{9}\int_{0}^{n}\frac{1}{x^2+1}\space\text{d}x-\frac{1}{3}\int_{0}^{n}\frac{1}{\left(x^2+4\right)^2}\space\text{d}x-\frac{1}{36}\int_{0}^{n}\frac{1}{\frac{x^2}{4}+1}\space\text{d}x\right]=$$

For the integrand $\frac{1}{\frac{x^2}{4}+1}$, substitute $u=\frac{x}{2}$ and $\text{d}u=\frac{1}{2}\space\text{d}x$.

This gives a new lower bound $u=\frac{0}{2}=0$ and upper bound $u=\frac{n}{2}$:

$$\lim_{n\to\infty}\left[\frac{1}{9}\int_{0}^{n}\frac{1}{x^2+1}\space\text{d}x-\frac{1}{3}\int_{0}^{n}\frac{1}{\left(x^2+4\right)^2}\space\text{d}x-\frac{1}{18}\int_{0}^{\frac{n}{2}}\frac{1}{u^2+1}\space\text{d}u\right]=$$ $$\lim_{n\to\infty}\left[\frac{1}{9}\left[\arctan(x)\right]_{0}^{n}-\frac{1}{3}\int_{0}^{n}\frac{1}{\left(x^2+4\right)^2}\space\text{d}x-\frac{1}{18}\left[\arctan(u)\right]_{0}^{\frac{n}{2}}\right]=$$ $$\lim_{n\to\infty}\left[\frac{\arctan(n)-\arctan(0)}{9}-\frac{1}{3}\int_{0}^{n}\frac{1}{\left(x^2+4\right)^2}\space\text{d}x-\frac{\arctan\left(\frac{n}{2}\right)-\arctan(0)}{18}\right]=$$ $$\lim_{n\to\infty}\left[\frac{\arctan(n)-0}{9}-\frac{1}{3}\int_{0}^{n}\frac{1}{\left(x^2+4\right)^2}\space\text{d}x-\frac{\arctan\left(\frac{n}{2}\right)-0}{18}\right]=$$ $$\lim_{n\to\infty}\left[\frac{\arctan(n)}{9}-\frac{1}{3}\int_{0}^{n}\frac{1}{\left(x^2+4\right)^2}\space\text{d}x-\frac{\arctan\left(\frac{n}{2}\right)}{18}\right]=$$ $$\lim_{n\to\infty}\left[\frac{2\arctan(n)-\arctan\left(\frac{n}{2}\right)}{18}-\frac{1}{3}\int_{0}^{n}\frac{1}{\left(x^2+4\right)^2}\space\text{d}x\right]=$$

Substitute $x=2\tan(s)$ and $\text{d}x=2\sec^2(s)\space\text{d}s$.

Then $\left(x^2+4\right)^2=\left(4\tan^2(s)+4\right)^2=16\sec^4(s)$ and $s=\arctan\left(\frac{x}{2}\right)$.

This gives a new lower bound $s=\arctan\left(\frac{0}{2}\right)=0$ and upper bound $s=\arctan\left(\frac{n}{2}\right)$:

$$\lim_{n\to\infty}\left[\frac{2\arctan(n)-\arctan\left(\frac{n}{2}\right)}{18}-\frac{2}{3}\int_{0}^{\arctan\left(\frac{n}{2}\right)}\frac{\cos^2(s)}{16}\space\text{d}s\right]=$$ $$\lim_{n\to\infty}\left[\frac{2\arctan(n)-\arctan\left(\frac{n}{2}\right)}{18}-\frac{1}{24}\int_{0}^{\arctan\left(\frac{n}{2}\right)}\cos^2(s)\space\text{d}s\right]=$$ $$\lim_{n\to\infty}\left[\frac{2\arctan(n)-\arctan\left(\frac{n}{2}\right)}{18}-\frac{1}{24}\int_{0}^{\arctan\left(\frac{n}{2}\right)}\left[\frac{1}{2}+\frac{\cos(2s)}{2}\right]\space\text{d}s\right]=$$ $$\lim_{n\to\infty}\left[\frac{2\arctan(n)-\arctan\left(\frac{n}{2}\right)}{18}-\frac{1}{24}\left[\frac{1}{2}\int_{0}^{\arctan\left(\frac{n}{2}\right)}1\space\text{d}s+\frac{1}{2}\int_{0}^{\arctan\left(\frac{n}{2}\right)}\cos(2s)\space\text{d}s\right]\right]=$$ $$\lim_{n\to\infty}\left[\frac{2\arctan(n)-\arctan\left(\frac{n}{2}\right)}{18}-\frac{1}{24}\left[\frac{1}{2}\left[x\right]_{0}^{\arctan\left(\frac{n}{2}\right)}+\frac{1}{2}\int_{0}^{\arctan\left(\frac{n}{2}\right)}\cos(2s)\space\text{d}s\right]\right]=$$ $$\lim_{n\to\infty}\left[\frac{2\arctan(n)-\arctan\left(\frac{n}{2}\right)}{18}-\frac{1}{24}\left[\frac{\arctan\left(\frac{n}{2}\right)-0}{2}+\frac{1}{2}\int_{0}^{\arctan\left(\frac{n}{2}\right)}\cos(2s)\space\text{d}s\right]\right]=$$ $$\lim_{n\to\infty}\left[\frac{2\arctan(n)-\arctan\left(\frac{n}{2}\right)}{18}-\frac{1}{24}\left[\frac{\arctan\left(\frac{n}{2}\right)}{2}+\frac{1}{2}\int_{0}^{\arctan\left(\frac{n}{2}\right)}\cos(2s)\space\text{d}s\right]\right]=$$

Substitute $p=2s$ and $\text{d}p=2\space\text{d}s$.

This gives a new lower bound $p=2\cdot0=0$ and upper bound $p=2\arctan\left(\frac{n}{2}\right)$:

$$\lim_{n\to\infty}\left[\frac{2\arctan(n)-\arctan\left(\frac{n}{2}\right)}{18}-\frac{1}{24}\left[\frac{\arctan\left(\frac{n}{2}\right)}{2}+\frac{1}{4}\int_{0}^{2\arctan\left(\frac{n}{2}\right)}\cos(p)\space\text{d}p\right]\right]=$$ $$\lim_{n\to\infty}\left[\frac{2\arctan(n)-\arctan\left(\frac{n}{2}\right)}{18}-\frac{1}{24}\left[\frac{\arctan\left(\frac{n}{2}\right)}{2}+\frac{1}{4}\left[\sin(p)\right]_{0}^{2\arctan\left(\frac{n}{2}\right)}\right]\right]=$$ $$\lim_{n\to\infty}\left[\frac{2\arctan(n)-\arctan\left(\frac{n}{2}\right)}{18}-\frac{1}{24}\left[\frac{\arctan\left(\frac{n}{2}\right)}{2}+\frac{\sin\left(2\arctan\left(\frac{n}{2}\right)\right)-\sin(0)}{4}\right]\right]=$$ $$\lim_{n\to\infty}\left[\frac{2\arctan(n)-\arctan\left(\frac{n}{2}\right)}{18}-\frac{1}{24}\left[\frac{\arctan\left(\frac{n}{2}\right)}{2}+\frac{\sin\left(2\arctan\left(\frac{n}{2}\right)\right)-0}{4}\right]\right]=$$ $$\lim_{n\to\infty}\left[\frac{2\arctan(n)-\arctan\left(\frac{n}{2}\right)}{18}-\frac{1}{24}\left[\frac{\arctan\left(\frac{n}{2}\right)}{2}+\frac{\sin\left(2\arctan\left(\frac{n}{2}\right)\right)}{4}\right]\right]=$$ $$\lim_{n\to\infty}\left[\frac{2\arctan(n)-\arctan\left(\frac{n}{2}\right)}{18}-\frac{2\arctan\left(\frac{n}{2}\right)+\sin\left(2\arctan\left(\frac{n}{2}\right)\right)}{96}\right]=$$ $$\lim_{n\to\infty}\left[\frac{32\arctan(n)-22\arctan\left(\frac{n}{2}\right)-3\sin\left(\arctan\left(\frac{n}{2}\right)\right)}{288}\right]=$$ $$\frac{1}{288}\lim_{n\to\infty}\left[32\arctan(n)-22\arctan\left(\frac{n}{2}\right)-3\sin\left(\arctan\left(\frac{n}{2}\right)\right)\right]=$$ $$\frac{1}{288}\left[32\lim_{n\to\infty}\arctan(n)-22\lim_{n\to\infty}\arctan\left(\frac{n}{2}\right)-3\lim_{n\to\infty}\sin\left(\arctan\left(\frac{n}{2}\right)\right)\right]=$$ $$\frac{1}{288}\left[32\cdot\frac{\pi}{2}-22\cdot\frac{\pi}{2}-3\cdot0\right]=$$ $$\frac{1}{288}\left[32\cdot\frac{\pi}{2}-22\cdot\frac{\pi}{2}-0\right]=$$ $$\frac{1}{288}\left[32\cdot\frac{\pi}{2}-22\cdot\frac{\pi}{2}\right]=$$ $$\frac{1}{288}\left[5\pi\right]=\frac{5\pi}{288}$$

So:

$$\color{red}{\int_{0}^{\infty}\frac{1}{\left(x^2+1\right)\left(x^2+4\right)^2}\space\text{d}x=\frac{5\pi}{288}}$$