Let $\gamma (t)=1+e^{it}, 0\le t\le 2\pi$. I have to find the line integral of $\frac{1}{(z^2-1)}$ with respect to $\gamma$.
My attempt : $\gamma$ is the unit circle in the complex plane centered at 1. I can find an open set $G$ containing $\gamma$ but not containing the points $1,-1$. $f$ is analytic in $G$. So $f$ has a primitive in $G$. Since $\gamma$ is closed, the line integral is, therefore, $0$.
Edit : So I did $\frac{1}{z^2-1}=\frac{1}{2} [\frac{1}{z-1}-\frac{1}{z+1}]$. We can find an open ball centred at $1$ containing $\gamma$ where the 2nd function is analytic. So the integral of the 2nd term is $0$. Integral of the 1st function is easy to compute and I got final answer $\pi i$.
You have to evaluate
$$\oint_\gamma \dfrac{1}{z^2-1}dz=\dfrac{1}{2}\oint_\gamma \dfrac{1}{z-1}dz+\dfrac{1}{2}\oint_\gamma \dfrac{1}{z+1}dz=\dfrac{1}{2}\int_{0}^{2\pi}\dfrac{1}{\gamma(t)-1}\dfrac{dz}{dt}dt+0$$ $$= \dfrac{1}{2}\int_{0}^{2\pi}\dfrac{i\exp(it)}{\exp(it)}dt=\pi i.$$
Note the second line integral vanishes because the function is holomorphic in this region.