Integrate the given function around the unit circle using Cauchy's 
Integrate the given function around the unit circle

$\frac{z^3}{2z-i}$
I'm a bit confused here. So since the function is undefined at $z = \frac{1}{2}$, what does this imply? It implies that the function is not analytic everywhere does the integral does not equal 0 and we have to evaluate this by hand right? So...
Since the unit circle can be expressed as $z(t) = e^{it}$ and $\frac{dz}{dt} = ie^{it}$
we have:
$$f(z) = \frac{e^{3it}}{2e^{it} - i}$$
So the integral is:
$$\int_0^{2\pi} \frac{e^{3it}}{2e^{it} - i} \cdot ie^{it} $$
Is this the right setup? Where do I go from here?
 A: Here is how you could continue what you started:
$$
\begin{align}
\oint\frac{z^3}{2z-i}\,\mathrm{d}z
&=\int_0^{2\pi}\frac{i\,e^{4it}}{2e^{it}-i}\,\mathrm{d}t\tag1\\
&=\frac i2\int_0^{2\pi}\left[-\frac i8+\sum_{\substack{k=0\\k\ne3}}^\infty\frac{i^ke^{(3-k)it}}{2^k}\right]\,\mathrm{d}t\tag2\\
&=\frac\pi8+\frac i2\sum_{\substack{k=0\\k\ne3}}^\infty\left[\frac{i^ke^{(3-k)it}}{(3-k)2^k}\right]_0^{2\pi}\tag3\\[3pt]
&=\frac\pi8\tag4
\end{align}
$$
Explanation:
$(1)$: $z=e^{it}$
$(2)$: use the Taylor series for $\frac{iz^4}{2z-i}$, but separate out the $k=3$ term
$(3)$: integrate term by term
$(4)$: simplify

However, if you want to use Cauchy's Integral Formula, let $f(z)=z^3/2$:
$$
\begin{align}
f\!\left(\tfrac i2\right)&=\frac1{2\pi i}\oint\frac{f(z)}{z-\frac i2}\,\mathrm{d}z\tag5\\
-\tfrac i{16}&=\frac1{2\pi i}\oint\frac{z^3/2}{z-\frac i2}\,\mathrm{d}z\tag6\\
\frac\pi8&=\oint\frac{z^3}{2z-i}\,\mathrm{d}z\tag7
\end{align}
$$
Explanation:
$(5)$: Cauchy's Integral Formula
$(6)$: apply $f(z)=z^3/2$
$(7)$: simplify
A: I am assuming from your question that you do not know the Cauchy integral formula. Here is a simple approach: $f(z)=\frac{z^3}{2(z-\frac{i}{2})}=c_2(z-\frac{i}{2})^2+c_1(z-\frac{i}{2})+c_0+\frac{c_{-1}}{z-\frac{i}{2}}.$ Multiplying though by $2(z-\frac{i}{2})$, expanding and equating coefficients, you get $c_{-1}=-\frac{i}{16}.$ The other constants do not matter because when you integrate around your curve, the only non-zero integral is $\int_{\gamma}\frac{c_{-1}}{z-\frac{i}{2}}dz$ and this is equal to $2\pi i c_{-1}$ by direct calculation. Thus, your integral is $\frac{\pi}{8}.$
What we did above amounts to realizing that $f$ has a pole of order $1$ at $z=\frac{i}{2}$ so its Laurent expansion about $z=\frac{i}{2}$ is $f(z)=P(z-\frac{i}{2})+\frac{c_{-1}}{z-\frac{i}{2}}$ where $P$ is a polynomial. There are formulas for calculating $c_{-1}$, using the Residue Theorem.
Remark: a useful fact is that, somewhat loosely speaking, if two curves are path homotopic, then their integrals are the same. So, if we set $\gamma': z=\frac{i}{2}+e^{it}$ then $\gamma\sim \gamma'$ and $\int_{\gamma'}f(z)dz=i\int_0^{2\pi}e^{it}\frac{(\frac{i}{2}+e^{it})^3}{e^{it}}dt=i\int_0^{2\pi}(\frac{i}{2}+e^{it})^3dt=\frac{\pi}{8}.$
