TITLE: Do discontinuous harmonic functions exist?
QUESTION [15 upvotes]: A function, $u$, on $\mathbb R^n$ is normally said to be harmonic if $\Delta u=0$, where $\Delta$ is the Laplacian operator $\Delta=\sum_{i=1}^n\frac{\partial^2}{\partial x_i^2}$. So obviously, according to this definition, $u$ must be twice differentiable and therefore continuous. However, if $u$ is at least continuous, being harmonic is equivalent to the condition that the average value of $u$ in any ball centered at a point $p$ is actually equal to $u(p)$: $$u(p)=\frac{1}{Vol(B_r(p))}\int_{B_r(p)}u\, dV.$$
My question is whether there are any integrable functions $u$ for which the above equation holds for all $r$ and $p$ but for which $u$ is not continuous.

REPLY [8 votes]: I would say "it depends". I was rather surprised by the following example, shown to me by a colleauge the other day. Dropping the assumptions that $u$ is locally integrable, strange things can happen!
Let $f(z) = \exp(-1/z^4)$, and let $u(x,y) = \Re f(x+iy)$. Then $u$ is clearly harmonic outside the origin. Extend $u$ to whole plane, by putting $u(0,0) = 0$. Then (outside the origin)
$$ u(x,0) = \exp(-1/x^4) \quad\text{and}\quad u(0,y) = \exp(-1/y^4). $$
It is not hard to see that both partial derivatives of $u$ exist at the origin, and in fact a little more work shows that the same holds for the second order partial derivatives. (However $u$ is of course not continuous at the origin, and neither is any of its derivatives.) All the derivatives above are in fact equal to $0$! In other words, the function $u$ satisfies "Laplace's equation"
$$ u''_{xx} + u''_{yy} = 0$$
everywhere on $\mathbb{R}^2$. A moment of contemplation also shows that $u$ fails to be integrable on any neighborhood of the origin, and hence does not define a distribution.