This is from Arfken, problem #11.4.8 (7th Edition).
I have to compute the complex integral, $$\oint_C\frac{dz}{z(2z+1)}$$ over the unit circle.
So I took my $f(z)=\frac1{2z+1}$, and my $z_0=0$, and the applied the Cauchy's integral formula, and I get the answer, $2\pi i f(z_0)=2\pi i$. Note my function is analytic within the contour $C$.
Now I can do the integral one more way, split the two factors into partial fractions, and do the integral. This way I get, $$\oint_C\frac{dz}{z}-\oint_C\frac{dz}{z+\frac12}=2\pi i - 2 \pi i = 0$$
So clearly, I get two different answers for the same problem. Where am I going wrong?
Update:
My first work had an issue, fixed it. $f(z)$ had a simple pole at $z=-\frac12$, which was within my contour.
Thank you guys for the prompt response. Didn't see that thing.
Using Cauchy's Formula:
$$\oint_C\frac{dz}{z(2z+1)}=\oint_C\frac{\frac1{2z}}{z+\frac12}dz=\left.2\pi i\frac1{2z}\right|_{z=-\frac12}=-2\pi i$$