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?
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}.$