Partial fractions for $\frac{1}{(z^2+1)^2}$ I am trying to decompose the following:
$$\frac{1}{(z^2+1)^2}$$
for the calculation of the integral $$\int_{|z|=2} \frac{e^{iz}}{(z^2+1)^2}dz$$
by using Cauchy's formula.
The only thing I am stuck with is the 3rd expression in
$$\frac{1}{(z^2+1)^2}=\frac{1}{4}\left( \frac{1}{(z-i)^2}+\frac{1}{(z+i)^2}-\frac{2}{z^2+1} \right)$$
How do I integrate it?
I mean, I can go on with partial fractions for it too but it becomes too long for my exercise. I guess there is a shorter way.
Or is there something wrong with my decomposition of the integrand?

The shorter way for computing these integrals is to use residue theorem, which in this case you have two poles of order two $i,-i$ in the given domain, try to find the integral by residue theorem...
Observe that if you want to use just Cauchy's integral formula, you have to make denominators linear or powers of linear functions...
In your case we have
$$
\frac{-2}{z^2+1}=\frac{i}{z-i}-\frac{i}{z+i}
$$
Now you can use Cauchy's integral formula...
