I've been given the task to evaluate the integral
$$\int_\Gamma \frac{3z+1}{z^2-z}\,dz$$
over the following two curves
- $\Gamma=1+\sqrt{3}e^{it} \,\,\,\,-\pi/2\leq t\leq 0$
- $\Gamma=1+\sqrt{3}e^{-it}\,\,\,\, \pi/2\leq t\leq 2\pi$
For the first curve, we use the fundamental theorem of contour integrals. We note that, by partial fractions,
$$\int\frac{3z+1}{z^2-z}\,dz=\int\frac{4}{z-1}-\frac{1}{z}\, dz=4\ln{(z-1)}-\ln z$$
The curve has endpoints $a=1-\sqrt{3}i$ and $b=1+\sqrt{3}$. So, the integral evaluates to
$$4\ln{\sqrt{3}}-\ln{(1+\sqrt{3})}-4\ln{(-\sqrt{3}i)}+\ln{(1-\sqrt{3}i)}=\ln({\sqrt{3}-1})+\frac{5\pi}{3}i$$
which is the correct answer. However, by the fundamental theorem , the second curve should lead to the same evaluation since it has the same endpoints. This is incorrect. But, if we combine these curves into one closed curve $\Gamma = \Gamma_1-\Gamma_2$, we can also evaluate this integral using cauchy's theorem. We note that the integrand has two singularities, one at $z=0$ and one at $z=1$. By Cauchy's theorem, we then have
$$\int_\Gamma\frac{3z+1}{z^2-z}=2\pi i*(Res[0]+Res[1])=6\pi i$$
We can split the original integral into two pieces to solve for the unknown integral
$$\int_{\Gamma_2}\frac{3z+1}{z^2-z}=-6\pi i+\int_{\Gamma_1}\frac{3z+1}{z^2-z}=-6\pi i + \ln{(\sqrt{3}-1)}+\frac{5\pi}{3}i=\ln{(\sqrt{3}-1)}-\frac{13\pi}{3}i$$
which is the correct answer. My question is, why can't I use the fundamental theorem for the second curve, but I can for the first? What assumption fails?


The fundamental theorem of calculus only works if your function is holomorphic along the entire path of integration. Note that
$$ f(z) = \frac{3z+1}{z(z-1)}$$
has two branch points at $z=0$ and $z=1$ and therefore has a principal branch cut along $(-\infty,0)\cup(1,\infty)$. If you use this branch cut to evaluate the antiderivative, it violates the FTOC since the path intersects it.
A way around this is to employ an alternate branch cut on $(0,1)$. I'll leave the computations to you