= Solution
Choose a star centre $a$ of the open <star-shaped set> $D$ and define the candidate <antiderivative> by a straight-segment <contour integral>:
$$
F(z)=\int_{[a,z]}f(\zeta)\,d\zeta.
$$
For each fixed $z\in D$ and all sufficiently small $h$, the filled <triangle> with vertices $a,z,z+h$ lies in $D$. Indeed, the <compact> segment $[a,z]$ has a neighbourhood of some positive radius contained in the open set $D$, and every point of this <triangle> lies within $|h|$ of that segment. The zero <triangle> integral consequently gives
$$
F(z+h)-F(z)=\int_{[z,z+h]}f(\zeta)\,d\zeta
=h\int_0^1f(z+th)\,dt.
$$
By <continuity>, the last integral tends to $f(z)$ as $h\to0$. Hence
$$
\boxed{F'(z)=f(z)\quad(z\in D)}.
$$
In particular, this proves the existence of the <antiderivative> without incorrectly assuming the <star-shaped set> is <convex>.
On a general <domain>, \b[the conclusion can fail]. Take $D=\mathbb C\setminus\{0\}$ and $f(z)=1/z$. Every filled <triangle> contained in $D$ has zero boundary integral by <Cauchy integral theorem>, but the unit <circle> has integral $2\pi i$. An <antiderivative> would make every closed <contour integral> zero. This is the <period obstruction to a holomorphic antiderivative>: the local conclusion of <Morera's theorem> does not remove the global obstruction.
Back to article page