TITLE: Does Cauchy's theorem's hold if we only assume boundedness?
QUESTION [6 upvotes]: Let $f$ be a function $\mathbb  C \to \mathbb C$. I am not assuming $f$ is analytic on $\mathbb C$, so Cauchy-Goursat does not apply.
Suppose $\gamma$ is a simple closed contour, and suppose that the region $D = {\rm int}(\gamma) \cup \gamma$ can be approximated arbitrarily by little squares of arbitrarily small size. I would like to know whether $\oint_\gamma f = 0$, under the assumption that $f$ is continuous and bounded on $D$.
I believe the answer is yes. Since the integral around $\gamma$ is equivalent to adding up the integrals from all the small squares, it is sufficient to show that the integral around the small squares approaches zero, which trivially follows from the Cauchy ML-inequality if $f$ is bounded on $D$.  
Is this correct? So there is no need to assume analyticity if a continuous function is bounded?

REPLY [8 votes]: Kenny Wong has nicely explained why your proposed argument is wrong.  The conclusion of the argument is also false, and in fact is false in the strongest possible way: the result of Cauchy's theorem is true only for analytic functions and no others.  More precisely, the following theorem (known as Morera's theorem) is true:

Theorem: Suppose $U$ is an open subset of $\mathbb{C}$ and $f:U\to\mathbb{C}$ is a continuous function such that $\int_\gamma f(z)\,dz = 0$ for any rectifiable (or even just piecewise linear) closed curve $\gamma$ in $U$.  Then $f$ is analytic.

To sketch the proof, if $f$ satisfies this condition then we can find an antiderivative of $f$ by integrating (just like we do with the fundamental theorem of calculus for functions on $\mathbb{R}$, except that we need to know the integral on a closed curve is always $0$ to be sure that this is well-defined).  But the derivative of an analytic function is analytic, so this implies $f$ is analytic.