Evaluating $\int_\gamma \frac{\cos(z)}{z^3+2z^2} \ dz$ Let $\gamma(t)=e^{it},t \in [0,2\pi]$. We take a look at:
$$\int_\gamma \frac{\cos(z)}{z^3+2z^2} dz$$
We let $$f(z)=\frac{\cos(z)}{z^2+2z}$$ and have
$$\int_\gamma \frac{\cos(z)}{z^3+2z^2} dz=\int_\gamma \frac{f(z)}{z}dz$$
The problem is that $\lim_{z\rightarrow 0} f(z)=\infty$. Now, I can't use the Cauchy integral formula to evaluate the integral. What can be done?

$$\frac{\cos z}{z^2(z+2)}=\frac{1}{z^2}\left(1-\frac{z^2}{2!}+\frac{z^4}{4!}-...\right)\left(\frac{1}{2}\frac{1}{1+\frac{z}{2}}\right)=$$
$$\frac{1}{2z^2}\left(1-\frac{z}{2}+\frac{z^2}{4}-...\right)\left(1-\frac{z^2}{4}+...\right)=\frac{1}{2z^2}-\frac{1}{4z}+...\Longrightarrow Res_{z=0}\left(\frac{\cos z}{z^2}\right)=-\frac{1}{4}$$
Thus, the integral equals $\,\displaystyle{-\frac{1}{4}2\pi i=-\frac{\pi i}{2}}$
