$$\oint_{\gamma}\frac{z^2+2z-5}{(4+z^2)^2(z^2+2z+2)}$$ $\gamma = \{z \in \mathbb{C} \:\mid\: |z| = R \},\; R > 0$
I think this integral depends on the values that $R$ takes on. there are four points where the function is not analytic $-1\pm i$ and $\pm2i$ so when $R < \sqrt2$ f is analytic and since $\gamma$ is a smooth, closed and simple curve by cauchy's theorem it should be equal to $0$ and when $\sqrt2 < R < 2$ I thought that by applying cauchy's formula to $f(z)=\frac{z^2+2z-5}{(4+z^2)^2}$ and for some point $w$ and after deriving the formula once I would be able to find it but it's been an hour that I'm struggling to solve this so I decided to ask for help I would appreciate any advices, tips or methods on how to get to the answer.
thanks!
The given integral is $$\int_\gamma\dfrac{z^2+2z-5}{(z+2i)^2(z-2i)^2(z+i+1)(z-i+1)}dz$$
So the singularities occur at $z=2i,-2i,-i-1,-1+i$ each of which are poles and $\gamma=\{z:|z|=R\}$. If we choose $R>2$, then all the singularities will fall inside the circle. In that case the value of the integral will be $2\pi i\sum\text{Res}_{z=z_i}f(z)$. If we choose $1<R<2$ then the value of integrals with singularities $2i$ and $-2i$ will be 0.