An extension of Morera's Theorem Morera's Theorem states that

If $f$ is continuous in a region $D$ and satisfies $\oint_{\gamma} f = 0$ for 
  any closed curve $\gamma$ in $D$, then $f$ is analytic in $D$.

I have two questions:


*

*If $f$ is continuous in $D$ and  $\oint_C f = 0$ for any circle $C$ in $D$,
can we deduce that $\oint_{\gamma} f = 0$ for any closed curve $\gamma$ in $D$?

*(more ambitiously) If  $f$ is continuous and  $\oint_C f = 0$ for any circle $C$ in $D$, is $f$ analytic in $D$ ?
Partial ansers for question 2 seem to be here, but I  doubt their argument, specificly, the construction of the original function.
 A: The answer is yes, and a proof can be found for example on this webpage: http://anhngq.wordpress.com/2009/07/20/a-generalization-of-the-morera%E2%80%99s-theorem/
A brief summary: Suppose $f$ is continuous and $\int_C f = 0$ for every circle $C$, but $\int_\gamma f \neq 0$ for some closed curve $\gamma$. By convolving $f$ with a smooth approximation to the identity, we may assume $f$ is smooth. But then by applying Green's formula to $\int_C f = 0$ for small circles $C$, we see that $f$ must satisfy the Cauchy-Riemann equations, so $\int_\gamma f = 0$, a contradiction.
A: First of all, your questions 1 and 2 are equivalent (by the usual Morera theorem).
Second, even stronger generalizations of Morera are available (one does not need all circles).
There is an old nice survey of Zalcman, Offbeat Integral Geometry, in the Monthly.
In particular it contains the following result for the case $D=C$: if the integrals over all
circles of two fixed radii $r_1$ and $r_2$ are zero, then the function is analytic,
unless the ratio of these radii is a zero of Bessel's function $J_1$.
On some more modern research on the topic, I recommend the papers of Hansen, Nadirashvili
and Tumanov   MR2046196.
