The Cauchy–Riemann equations and analyticity I would be interested to learn if the following generalization of the classical Looman-Menchoff theorem is true.

Assume that the function $f=u+iv$, defined on a domain $D\subset\mathbb{C}$, is such that

*

*$u_x$, $u_y$, $v_x$, $v_y$ exist almost everywhere in $D$.

*$u$, $v$ satisfy the Cauchy–Riemann equations almost everywhere in $D$.

*$f=f(x,y)$ is separately continuous (in $x$ and $y$) in $D$.

*$f$ is locally integrable.


Question: Does it follow that $f$ is analytic everywhere in $D$?


Remark 1. Condition 3 is essential (take $f=1/z$).
Remark 2. G. Sindalovskiĭ proved analyticity of $f$ under conditions 2-4 when the partial derivatives exist everywhere in $D$, except on a countable union of closed sets of finite linear Hausdorff measure (link).
 A: No.
Let $c$ be the Cantor function on $[0,1]$, so that $c$ is continuous, $c' = 0$ a.e., but $c$ is not constant.  Then take $u(x+iy) = v(x+iy)=c(x)c(y)$.  We have $u_x=u_y=v_x=v_y=0$ a.e. so the Cauchy–Riemann equations are trivially satisfied, and $f(z)=u(z)+iv(z)$ is bounded and continuous on the unit square, but certainly not analytic.
Almost everywhere differentiability is almost never the right condition for solutions to a PDE.  A better condition would be to have $u,v$ in some Sobolev space.
A: See this related question. Denjoy proved that there exist a continuous function $f$ on the unit square and a continuous curve $\gamma$, which is the graph of a continuous function, such that $f$ is holomorphic on the square minus $\gamma$ but not on the whole square. Thus $f$ satisfies the CR equations almost everywhere, and actually on the whole square minus the support of $\gamma$, but not on the whole square.
Thus the general answer to your question seems to be a solid no. Using the postive parts of Denjoy's result, one can imagine to answer in the affirmative if the set where CR fails is a countable union of curves with sufficiently nice behaviour, but it seems difficult to do better than Sindalovskii. See also here for a different proof of his result.
