Artificial intelligent assistant

Why is $\oint_p \frac{1}{z} dz=0$ in simply connected regions? According to Cauchy's Theorem, $\oint_p f(z) dz=0$ for any function $f(z)$ holomorphic on a simply connected region $U$ along any closed-path around any point $p$, provided point and path are within $U$. When it comes to the function $f(z)=\frac{1}{z}$ and the problematic origin, I understand why $\oint_0 \frac{1}{z} dz=2 \pi i$, since evaluating $\log(z)$ along a loop equals to evaluating a difference of $2\pi$ in the argument of $z$. However, if we calculate $\oint_p \frac{1}{z} dz$ in such a region $U$, won't we deal again with a loop of a logarithm and obtain again $2\pi i$? Why $0$?

As said in the comments, Cauchy's theorem only applies to simply connected regions. For example, if you choose $U=\mathbb C\setminus \\{0\\}$, then $\frac1z$ is holomorphic in $U$, but $U$ is not simply connected.

If $U$ is simply connected and does not contain $0$, then you cannot find a path that winds around $0$, so you dont have to worry about contour integrals whose path winds around $0$.

Note that the evaluation of the "loop of the logarithm" can only be nonzero, if you wind around $0$ (at least) once.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 51da09a60b25c8c0ec153473d97cdc4c