Integrating complex numbers

I was asked to evaluate the following:

$\displaystyle \oint _C \frac{dz}{z^2-1}$

where C is the circle $\displaystyle \left | z \right |=2$

Well I figure that is the function $\displaystyle f(z)= \frac{1}{z^2-1}$ is analytical then according to Cauchy's intergral theorem:

$\displaystyle \oint _C f(z)=0$

This is somewhat complicated since it's difficult to separate the function into the real and imaginary part to take their derivatives. I pluged it into the calculator and it seems like it's not analytical. So, I went about trying to do it.

$\displaystyle z=r e^{it}$ and $\displaystyle dz=ire^{it}dt$

then it becomes:

$\displaystyle \oint _C \frac{dz}{z^2-1}=\int_0^{2\pi} \frac{ire^{it}dt}{r^2 e^{2it}-1}=\frac{i}{r}\int_0^{2\pi} \frac{e^{it}dt}{e^{2it}-\frac{1}{r^2}}$

let:

$\displaystyle u=e^{2it}-\frac{1}{r^2}$ and $\displaystyle dv=e^{it}dt$

then:

$\displaystyle du=2ie^{2it}$ and $\displaystyle v=\frac{e^{it}}{i}$

And using by parts:

$\displaystyle =(e^{2it}-\frac{1}{r^2})\frac{e^{it}}{i}-\int\frac{e^{it}}{i}2ie^{2it}dt$

$\displaystyle =\frac{e^{3it}-\frac{e^{it}}{r^2}}{i}-2\int e^{3it}dt$

$\displaystyle =\frac{e^{3it}-\frac{e^{it}}{r^2}}{i}-2\frac{e^{3it}}{3i}$

$\displaystyle =\frac{3e^{3it}-2e^{3it}-\frac{3e^{it}}{r^2}}{3i}$

since $\displaystyle \left | z \right |=2$ r=2, and we have:

$\displaystyle =\frac{e^{3it}-\frac{3e^{it}}{4}}{3i}$

Now pluging in the limits $\displaystyle 2\pi$ and 0 we have:

$\displaystyle =\frac{1-\frac{3}{4}}{3i}-\frac{1-\frac{3}{4}}{3i}=0$

How can this be? It shouldn't be 0 since it's not analytical. What am I missing here?