Morera’s Theorem and simply connected sets

complex integrationcomplex-analysiscontour-integrationgeneral-topology

my lecture notes contain the following version of Morera's Theorem:

Let $f$ be a continuous complex-valued function on an open simply connected set $\Omega$. If $\int_\gamma f(w)dw=0$ for any triangular contour $\gamma$ in $\Omega$, then $f$ has a primitive on $\Omega$

Online, I read that the domain $\Omega$ need not be simply connected for Morera's Theorem to hold. However, the function $f(z)=\frac{1}{z}$ is clearly holomorphic (thus continuous) on an annulus about the origin and and also integrates to zero along any triangular contour inside that annulus, but does not have a primitive on the whole of the annulus. Does that not imply that $\Omega$ must indeed be simply connected?

Thanks in advance for your help!

Best Answer

The usual statement of Morera's Theorem is the following:

If $f$ is continuous on a domain $D$ and the integral of $f$ over any triangle in $D$ is $0$ the $f$ is analytic in $D$.

This has nothing to do with existence of a primitive and it does not require the domain to be simply connected. If you want to say that $f$ has a primitive then you have to assume that the region is simply connected.

PS: A primitive does exist locally for any domain but there need not be a global primitive.