# Integral of Complex Polynomial with Quotient of Complex Sine

I'm stuck trying to finish the following problem:

Evaluate the integral $$\int_{C}\frac{2z^{2}-5z+2}{\sin(z)}~dz$$, where $$C$$ is the unit circle (oriented counterclockwise).

My work so far: We will use the Residue Theorem. Let $$f(z)=\frac{2z^{2}-5z+2}{\sin(z)}$$; then $$f$$ is holomorphic except at those $$z\in\mathbb{C}$$ with $$z=n\pi$$ for some $$n\in\mathbb{Z}$$. In particular, $$f$$ has poles at the points $$z=n\pi$$. The only pole that lies inside the counter $$\mathbb{C}$$ is the origin $$z=0$$. Hence, by the Residue Theorem, we have $$\int_{C}f(z)~dz=2\pi i\cdot\mathrm{Ind}_{C}(0)\cdot\mathrm{Res}_{0}(f).$$ Since $$C$$ is assumed to have the counterclockwise orientation, we have $$\mathrm{Ind}_{C}(0)=1$$. Also, since $$z=0$$ is a simple pole of $$f$$, we compute $$\mathrm{Res}_{0}(f)=\lim_{z\to 0}(z-0)f(z)=\lim_{z\to 0}\frac{2z^{3}-5z^{2}+2z}{\sin(z)}\overset{\mathrm{LH}}{=}\lim_{z\to 0}\frac{6z^{2}-10z+2}{\cos(z)}=2$$ (where the "LH" above the second to last equality sign denotes an application of l'Hospital's Rule). Hence, $$\int_{C}f(z)~dz=4\pi i$$.

My questions: Does my work look okay? I'm not very familiar with contour integration and want to make sure that I'm understanding this correctly.

Everything looks okay to me. Instead of L'Hospital's rule you could write $$z f(z) = \frac{2z^2-5z+2}{\frac{\sin(z)}{z}} = \frac{2z^2-5z+2}{1 + O(z^2)} \to 2$$ for $$z \to 0$$, or use the general rule that $$\operatorname{Res}_{a}(\frac{g}{h}) = \frac{g(a)}{h'(a)}$$ if $$g$$ and $$h$$ are holomorphic in a neighborhood of $$z=a$$ and $$h$$ has a simple zero at $$z=a$$.