How do you evaluate $\int_{|z|=1} \frac{\sin(z)}{z^2+(3-i)z-3i}dz$? How do you evaluate $\int_{|z|=1} \frac{\sin(z)}{z^2+(3-i)z-3i}dz$ ? 
Here is my thought process: 
I want to use Cauchy's Integral Formula, but in order to use it I need to find the poles and make sure one of them is in the interior of the unit circle (the contour we are supposed to integrate over).
First, I need to set the denominator in the integral to $0$ and solve the quadratic equation: $z^2+(3-i)z-3i=0$
Using Wolfram, here: https://www.wolframalpha.com/input/?i=solve+z%5E2+%2B+(3-i)z+-3i+%3D+0
I get $z=-3$ and $z=i$
A requirement for Cauchy's Integral Formula is one of these poles must be in the intereior of the curve we are integrating over (in this case the unit circle).  However, $z=-3$ is outside the unit circle and $z=i$ is on the unit circle itself, not in its interior. So I cannot use Cauchy's Integral Formula. 
What other options do I have?
 A: First, we can write the integrand as 
$$\frac{\sin(z)}{(z+3)(z-i)}=\underbrace{\frac1{3+i}\left(\frac{\sin(z)-\sin(i)}{z-i}-\frac{\sin(z)}{z+3}\right)}_{\text{Analytic for }|z|\le1}+\underbrace{\frac1{3+i}\left(\frac{\sin(i)}{z-i}\right)}_{\text{Has simple pole at }z=i}$$
The key observation is that the integral $\oint_{|z|=1}\frac1{z-i}\,dz$ is not defined since the path of integration actually contains the simple pole singularity point $z=i$.  
However, if we exclude a "small" neighborhood of $i$ from the unit circle and integrate over the path parametrically described by $z=e^{i\phi}$, $\phi\in [\pi/2+\Delta \phi,\pi/2+2\pi-\Delta \phi]$, for $\Delta \phi>0$, then we find 
$$\begin{align}
\int_{\pi/2+\Delta \phi}^{\pi/2+2\pi-\Delta \phi}\frac{ie^{i\phi}}{e^{i\phi}-i}\,d\phi&=i\int_{\Delta \phi}^{2\pi-\Delta \phi}\frac{1-\cos(\phi)-i\sin(\phi)}{2(1-\cos(\phi))}\,d\phi\\\\
&=i(\pi+\Delta \phi)
\end{align}$$
Letting $\Delta \phi\to0$, we have 
$$\text{PV}\left(\oint_{|z|=1}\frac{\sin(z)}{z^2+(3-i)z}\right)=\frac{i\pi \sin(i)}{3+i}=-\frac1{10}(3-i)\pi\sinh(1)$$
where $\text{PV}$ denotes the Cauchy principal value of the contour integral.  
Interestingly, this result is exactly the arithmetic average of the integral over the circular contours $|z|=1+\epsilon$ and $|z|=1-\epsilon$, $0<\epsilon<2$.  The former would yield $2\pi i \text{Res}\left(\frac{\sin(z)}{(z+3)(z-i)}, z=i\right)=-\frac2{10}(3-i)\pi \sinh(1) $, while the latter would yield $0$.
A: Since $\sin(i)\neq 0$, we're integrating across a pole. That is, we're integrating something comparable to $\frac{c}{z-i}$ on a path that approaches $i$ on two sides. The integral diverges, by comparison to $\int_0^1 \frac1x\,dx$.
Now, there is still a way to assign a value. If we cut out a symmetric piece of the curve around $i$, and let that cut tend to zero, we are left with a principal value integral. As can be seen by closing the curve with a small semicircle on either side, this principal value contributes to the integral as if the residue there were halved.
A: You must be in Dr. Gowda's Complex Analysis class as well. See the new email from Dr. Gowda that says to integrate over $\left\lvert z\right\rvert=2$ instead. We cannot use Cauchy's integral formula here because $z=i$ lies on the boundary of $\left\lvert z\right\rvert=1$, so he updated it to the contour $\left\lvert z\right\rvert=2$. With the updated version, consider $f\left(z\right)=\frac{\sin z}{z+3}$, then using Cauchy's integral formula, we have
$$\int_{\left\lvert z\right\rvert=2}\frac{\sin z}{\left(z-i\right)\left(z+3\right)}\text{d}z=2\pi i\left(\frac{1}{2\pi i}\int_{\left\lvert z\right\rvert=2}\frac{\sin z}{\left(z-i\right)\left(z+3\right)}\text{d}z\right)=2\pi i\frac{\sin\left(i\right)}{i+3},$$
which can be changed into
$$\frac{\pi\left(1-e^{2}\right)}{10e}\left(3-i\right)$$
using the fact that $\sin x=\frac{e^{ix}-e^{-ix}}{2i}$.
