Evaluating $ \int_{|z|=1} \frac{e^z}{(z+3)\sin(2z)} \ dz$ Consider the following integral:
$\displaystyle \int_{|z|=1} \frac{e^z}{(z+3)\sin(2z)}dz$.
To apply the Cauchy integral formula, I rewrite it as:
$\displaystyle \int_{|z|=1} \frac{ze^z}{z(z+3)\sin(2z)}dz$ and take
$\displaystyle f(z)=\frac{ze^z}{(z+3)\sin(2z)}$.
The problem now is that I would compute $f(0)$ in the next step, but $\sin(2\cdot 0)=0$, so the denominator of $f$ is undefined. How would I deal with this?
 A: Hint: What type of singularity is $z = 0$ for the function $$f(z) = \frac{ze^z}{(z+3)\sin(2z)} = \frac{e^z}{z+3}\frac{z}{\sin(2z)}?$$
In other words: is there any reasonable way of defining $f(0)$, perhaps by some sort of limit?
A: The following applies for some neighbourhood of zero, which is what we're interested in (the only possible singularity of the function within the unit circle)
$$\frac{1}{3\left(1+\frac{z}{3}\right)}\frac{1}{\sin 2z}e^z=\frac{1}{3}\left(1-\frac{z}{3}+\frac{z^2}{9}-...\right)\frac{1}{2z-\frac{8z^3}{3!}+...}\left(1+z+\frac{z^2}{2!}+...\right)=$$
$$=\frac{1}{3}\left(1-z+\frac{z^2}{9}-...\right)\,\frac{1}{2z}\frac{1}{1-\frac{4z^2}{3}+...}\left(1+z+\frac{z^2}{2!}+...\right)=$$
$$=\frac{1}{6z}\left(1-z+\frac{z^2}{9}+...\right)\left(1+z+\frac{z^2}{2}+...\right)\left(1+\frac{4z^2}{3}+...\right)=\frac{1}{6z}+...$$
Thus, the function's residue at $\,z=0\,$ is $\,1/6\,$ and by the residue's theorem the integral's value is 
$$\frac{1}{6}2\pi i=\frac{\pi i}{3} $$
Of course, the residue of this pole (because that is what $\,z=0\,$ is: a simple pole, as can be easily checked) is waaaaaay easier to evaluate by the well-known formula
$$Res_{z=0}(f)=\lim_{z\to 0}\frac{ze^z}{(z+3)\sin 2z}=\frac{1}{6}$$
but using power series can be serious fun...and pretty helpful sometimes if the pole's order is high.
