Consider a positively oriented circle with $| z | = 2$. Calculate $$\oint \frac{z\;dz}{(4-z^2)(z+i)}$$
I did the following.
$$\oint\frac{z\;dz}{(4-z^2)(z+i)}=\oint\frac{z}{4-z^2}\cdot \frac{1}{z+i}\;dz=\oint\frac{\frac{z}{4-z^2}}{z-(-i)}\;dz$$
Pelo Teorema da Integral de Contorno de Cauchy
$$ \oint\frac{f(z)}{z-z_0}\;dz=2\pi if(z_0) $$
where in the case, $z_0=-i$, $f(z)=z/(4-z^2)$, therefore
$$\oint\frac{\frac{z}{4-z^2}}{z-(-i)}\;dz=2\pi i f(-i)=2\pi i \frac{-i}{4-(-i)^2}=\frac{2\pi}{5}$$
But in my book, the answer appearing in the end is $2\pi$, my book is wrong or was I wrong, where I went wrong?
Notice that your integrand has poles at $z = \pm 2$ as well as at $z=-i$. But your integrand contour passes through these points so you'll need to be a bit more careful here. You might like to try expanding the integrand around both of these points to see what's going on.