# Calculate the integral $\int_C \frac{1}{z-a}dz$

I am asked to calculate the integral $$\int_C \frac{1}{z-a}dz$$ where $$C$$ is the circle centered at the origin with radius $$r$$ and $$|a|\neq r$$

I parametrized the circle and got $$\int_0^{2\pi}\frac{ire^{it}}{re^{it}-a}dt=\text{log}(re^{2\pi i}-a)-\text{log}(r-a)=\text{log}(r-a)-\text{log}(r-a)=0$$

Because of how the complex logarithm is defined, I am pretty sure that the first equaility is wrong, it it is, what is the correct solution?

If $$r<|a|$$ the integral is indeed $$0$$, but if $$r>|a|$$, then using Cauchy integral formula (or more generally, Residue theorem), you get $$2i\pi$$.

You can also do what you did, but :

Notice that if $$a\in \mathbb R$$, $$a>0$$, then :

• If $$r>a$$, then $$\ln(re^{2i\pi}-a)=\ln(e^{2i\pi}(r-a))=2i\pi+\ln(r-a),$$

• If $$r, then $$\ln(re^{2i\theta }-a)-\ln(r-a)=\ln(e^{i\pi}(a-r))-\ln(e^{i\pi}(a-r))=0.$$

You can generalize this to the case $$a\in \mathbb C$$, and distinguish the case $$r>|a|$$ or $$r<|a|$$.

By Cauchy's Integral Formula, we get $$2\pi i$$, if $$|a|\lt r$$. Otherwise we get $$0$$, by Cauchy's theorem.