Choose a star centre of the open star-shaped set and define the candidate antiderivative by a straight-segment contour integral:
For each fixed and all sufficiently small , the filled triangle with vertices lies in . Indeed, the compact segment has a neighbourhood of some positive radius contained in the open set , and every point of this triangle lies within of that segment. The zero triangle integral consequently gives
By continuity, the last integral tends to as . Hence
In particular, this proves the existence of the antiderivative without incorrectly assuming the star-shaped set is convex.
On a general domain, the conclusion can fail. Take and . Every filled triangle contained in has zero boundary integral by Cauchy integral theorem, but the unit circle has integral . 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.
A function is holomorphic when it is complex differentiable at every point of the open connected set . Morera's theorem states that a continuous function on a domain is holomorphic if its integral around every triangle whose interior lies in the domain is zero.
The integrand is continuous jointly in on , so the displayed integral defines a continuous function. For any triangle , Fubini's theorem and the Cauchy integral theorem give
Morera's theorem therefore proves that is entire.
The function is holomorphic on but has no antiderivative there, because an antiderivative would integrate to zero around every closed curve whereas
This is the standard period obstruction to a holomorphic antiderivative.