$$\int_C \frac{z^2}{z^2 +4} dz$$ where $C$ is the rectangle with vertices$ −2,2,−2 + 4i,2 + 4i$ traversed in the anticlockwise direction.
Anyone know how to do this question? i've tried using cauchy integral formula but i'm not sure on how to do this particular integral as it has a rectangular path.
There is only one singular point inside the rectangle. It is $2i$. Therefore according to residue theorem $$\int_C\frac{z^2}{z^2+4}dz=2\pi i\ \text{Res}\left(\frac{z^2}{z^2+4};\ 2i\right)=-2\pi.$$