Calculate the integral $\int_{\ |z| = 2} \frac{1}{(z^2 +1)^n} dz$ I want to calculate the integral $$\int_{\ |z| = 2} \frac{1}{(z^2 +1)^n} dz$$ for $n \in \mathbb{N}$
I thought about using the conclusion from Cauchy's formula which says: 
$$f^{(n)}(z_0) = \frac{n!}{2 \pi i} \int_{\ |z| = r} \frac{1}{(z-z_0)^n} dz$$ 
but here: 
$$\int_{\ |z| = 2} \frac{1}{(z^2 +1)^n} dz = \int_{\ |z| = 2} \frac{1}{(z-i)^n(z+i)^n} dz$$ and both $i$ and $-i$ are inside the circle $|z| < 2$ so I am not really sure what to do.
Help would be appreciated
 A: That integral is equal to $0$, because it is equal to$$\int_0^{2\pi}\frac{2ie^{it}}{\bigl((2e^{it})^2+1\bigr)^n}\,\mathrm dt.$$But\begin{align}\int_0^{2\pi}\frac{2ie^{it}}{\bigl((2e^{it})^2+1\bigr)^n}\,\mathrm dt&=\int_0^\pi\frac{2ie^{it}}{\bigl((2e^{it})^2+1\bigr)^n}\,\mathrm dt+\int_{\pi}^{2\pi}\frac{2ie^{it}}{\bigl((2e^{it})^2+1\bigr)^n}\,\mathrm dt\\&=\int_0^\pi\frac{2ie^{it}}{\bigl((2e^{it})^2+1\bigr)^n}\,\mathrm dt+\int_0^\pi\frac{2ie^{i(t+\pi)}}{\bigl((2e^{i(t+\pi)})^2+1\bigr)^n}\,\mathrm dt\\&=\int_0^\pi\frac{2ie^{it}}{\bigl((2e^{it})^2+1\bigr)^n}\,\mathrm dt-\int_0^\pi\frac{2ie^{it}}{\bigl((2e^{it})^2+1\bigr)^n}\,\mathrm dt\\&=0.\end{align}
A: You may apply residue theorem. To compute $\operatorname{res}_{z=i}\frac{1}{(z-i)^n(z+i)^n}$ you may express $\frac{1}{(z+i)^n}$ as a Taylor series around $i$ and find the $(n-1)$-th coefficient. Do the same for residue at $z=-i$
Edit:
So, $$\frac{1}{(z+i)^n}=\frac{1}{((z-i)+(2i))^n}=\frac{1}{(u+2i)^n}=f(u)$$
We want to find the coefficient of $u^{n-1}$ in the Taylor expansion around $u=0$. This is $f^{(n-1)}(0)/(n-1)!=\frac{1}{(n-1)!}(-1)^{n-1}(n)(n+1)\dots(2n-1)(2i)^{-2n+1}$.
So,$\operatorname{res}_{z=i}\frac{1}{(z-i)^n(z+i)^n}= \frac{1}{(n-1)!}
(-1)^{n-1}(n)(n+1)\dots(2n-1)(2i)^{-2n+1}$
Similar approach proves $\operatorname{res}_{z=-i}\frac{1}{(z-i)^n(z+i)^n}= 
\frac{1}{(n-1)!}(-1)^{n-1}(n)(n+1)\dots(2n-1)(-2i)^{-2n+1}$
So when you add residues you get $0$.
