Mathematical analysis → Complex analysis 
Complex analysis 

Complex numbers 
Complex functions 
Basic Theory 
Geometric function theory 
People 

In complex analysis, a branch of mathematics, Morera's theorem, named after Giacinto Morera, gives an important criterion for proving that a function is holomorphic.
Morera's theorem states that a continuous, complexvalued function f defined on an open set D in the complex plane that satisfies
for every closed piecewise C^{1} curve in D must be holomorphic on D.
The assumption of Morera's theorem is equivalent to f having an antiderivative on D.
The converse of the theorem is not true in general. A holomorphic function need not possess an antiderivative on its domain, unless one imposes additional assumptions. The converse does hold e.g. if the domain is simply connected; this is Cauchy's integral theorem, stating that the line integral of a holomorphic function along a closed curve is zero.
The standard counterexample is the function f(z) = 1/z, which is holomorphic on C − {0}. On any simply connected neighborhood U in C − {0}, 1/z has an antiderivative defined by L(z) = ln(r) + iθ, where z = re^{iθ}. Because of the ambiguity of θ up to the addition of any integer multiple of 2π, any continuous choice of θ on U will suffice to define an antiderivative of 1/z on U. (It is the fact that θ cannot be defined continuously on a simple closed curve containing the origin in its interior that is the root of why 1/z has no antiderivative on its entire domain C − {0}.) And because the derivative of an additive constant is 0, any constant may be added to the antiderivative and it's still an antiderivative of 1/z.
In a certain sense, the 1/z counterexample is universal: For every analytic function that has no antiderivative on its domain, the reason for this is that 1/z itself does not have an antiderivative on C − {0}.
There is a relatively elementary proof of the theorem. One constructs an antiderivative for f explicitly.
Without loss of generality, it can be assumed that D is connected. Fix a point z_{0} in D, and for any , let be a piecewise C^{1} curve such that and . Then define the function F to be
To see that the function is welldefined, suppose is another piecewise C^{1} curve such that and . The curve (i.e. the curve combining with in reverse) is a closed piecewise C^{1} curve in D. Then,
And it follows that
Then using the continuity of f to estimate difference quotients, we get that F′(z) = f(z). Had we chosen a different z_{0} in D, F would change by a constant: namely, the result of integrating f along any piecewise regular curve between the new z_{0} and the old, and this does not change the derivative.
Since f is the derivative of the holomorphic function F, it is holomorphic. The fact that derivatives of holomorphic functions are holomorphic can be proved by using the fact that holomorphic functions are analytic, i.e. can be represented by a convergent power series, and the fact that power series may be differentiated term by term. This completes the proof.
Morera's theorem is a standard tool in complex analysis. It is used in almost any argument that involves a nonalgebraic construction of a holomorphic function.
For example, suppose that f_{1}, f_{2}, ... is a sequence of holomorphic functions, converging uniformly to a continuous function f on an open disc. By Cauchy's theorem, we know that
for every n, along any closed curve C in the disc. Then the uniform convergence implies that
for every closed curve C, and therefore by Morera's theorem f must be holomorphic. This fact can be used to show that, for any open set Ω ⊆ C, the set A(Ω) of all bounded, analytic functions u : Ω → C is a Banach space with respect to the supremum norm.
Morera's theorem can also be used in conjunction with Fubini's theorem and the Weierstrass Mtest to show the analyticity of functions defined by sums or integrals, such as the Riemann zeta function
or the Gamma function
Specifically one shows that
for a suitable closed curve C, by writing
and then using Fubini's theorem to justify changing the order of integration, getting
Then one uses the analyticity of α ↦ x^{α−1} to conclude that
and hence the double integral above is 0. Similarly, in the case of the zeta function, the Mtest justifies interchanging the integral along the closed curve and the sum.
The hypotheses of Morera's theorem can be weakened considerably. In particular, it suffices for the integral
to be zero for every closed (solid) triangle T contained in the region D. This in fact characterizes holomorphy, i.e. f is holomorphic on D if and only if the above conditions hold. It also implies the following generalisation of the aforementioned fact about uniform limits of holomorphic functions: if f_{1}, f_{2}, ... is a sequence of holomorphic functions defined on an open set Ω ⊆ C that converges to a function f uniformly on compact subsets of Ω, then f is holomorphic.