The integral along the path $\gamma(t)=e^{2ti},\;t\in[0,2\pi]$ is $\begin{equation*} \int_{\gamma}\frac{1}{z^{2}-1}dz \end{equation*}$.
I approached this like a real integral in the hopes things would work out, first by performing a u sub $\begin{equation*} u=e^{2ti}\Rightarrow du=2e^{2ti}dt\Rightarrow dt=\frac{du}{2e^{2ti}} \end{equation*}$
Which brought me to $\begin{align*} &\int_{t=0}^{t=2\pi}\frac{i}{u^{2}-1}du= i\int_{t=0}^{t=2\pi}\frac{1}{(u+1)(u-1)}du\\ &=i\frac{1}{2}\int_{t=0}^{t=2\pi}\frac{1}{(u+1)}du- i\frac{1}{2}\int_{t=0}^{t=2\pi}\frac{1}{(u-1)}du\end{align*}$
In the reals this would obviously $\frac{i}{2}\log(e^{2ti}-1)-\frac{i}{2}\log(e^{2ti}+1)|_{t=0}^{2\pi}$ but i am pretty sure this is wrong in the complex plane. I know there is a singularity at $z=e^{2ti}=\pm 1$, is this why I am ending up with problems? How should I evaluate integrals like this?