Nonharmonic solutions of Laplace's equation Let $f \colon U \to \mathbb{R}$ be a twice differentiable function, where $U$ is an open subset of $\mathbb{R}^n$. Here twice differentiable means that all the second partial derivatives $\frac{\partial}{\partial x_i} (\frac{\partial}{\partial x_j} f)$ exist (however they are not necessarily continuous). Suppose $\Delta f = 0$, i.e. $\sum_{i=1}^n \frac{\partial^2}{\partial x_i^2} f = 0$. Does this imply that $f$ is harmonic, i.e. that $f$ is twice continuously differentiable? (For $n = 1$ it does, so let's assume that $n \ge 2$.)
Remark: I have read somewhere that if $f$ is weakly harmonic, then it is harmonic. However I think the second derivatives of $f$ here are not necessarily the same as the weak second derivatives. So my guess is that there is a counterexample, but I was not able to find one. Such a counterexample would be an obstruction to the extension of the Lebesgue integral to more general functions, such that the Fubini theorem and the Newton-Leibniz theorem both remain true.
 A: Here's a counterexample in $n\ge3$ dimensions. With $\lVert\cdot\rVert$ denoting the Euclidean norm, set
$$
f(x)=\begin{cases}
x_1x_2x_3\lVert x\rVert^{-n-4},&{\rm if\ }x\not=0,\cr
0,&{\rm if\ }x=0.
\end{cases}
$$
This is harmonic on $x\not=0$, has first and second order derivatives at the origin, but $f$ along with all its derivatives are discontinuous at the origin.
Note that, $f=c\frac{\partial^3(\lVert x\rVert^{-n+2})}{\partial x_1\partial x_2\partial x_3}$ is a third order derivative of a harmonic function, so is harmonic (away from the origin). As $f$ vanishes whenever all but two coordinates are zero, it along with its first order derivatives all vanish on the coordinate axes. So, $f$ along with all its first and second order derivatives vanish at the origin.
Next, here's a counterexample in $n=2$ dimensions. Using $i=\sqrt{-1}$, define $f\colon\mathbb{R}^2\to\mathbb{R}$ by,
$$
f(x,y)=\begin{cases}
\Re\left[\exp\left(-(x+iy)^{-4}\right)\right],&{\rm if\ }(x,y)\not=0,\cr
0,&{\rm if\ }x=y=0.
\end{cases}
$$
As the real part of an analytic function, $f$ is harmonic away from the origin. Also, $f$ along with its derivatives to any order are bounded by a multiple of a power of $\lVert x\rVert$ mutiplied by $\exp(-\lVert x\rVert^{-4})$ on any bounded subset of the coordinate axes (outside of the origin). So, $f$ together with all partial derivatives to all orders exist and are zero at the origin. On the other hand, $f$ is not continuous at the origin.
Note, this also gives an alternative counterexample to the first one above in $n\ge3$ dimensions by making $f$ independent of $x_3,\ldots,x_n$. 
A: Here is a general result.  If $f$ is a distribution on $U$ and $\Delta f\in C^\infty(U)$, then $u\in C^\infty(U)$.  More generally, you can replace $\Delta$ with any properly supported elliptic pseudodifferential operator on $U$.  In particular, any  elliptic operator with smooth coefficients is a properly supported  elliptic pseudodifferential operator.
A: If $U$ is an open subset of $\mathbb R^n$, $f$ is a distribution on $U$ such that $\Delta f$ is analytic on $U$, then $f$ is analytic on $U$. This hypoellipticity result is true for any elliptic differential operator with analytic coefficients.
