# Seeking help in understanding the proof of the mean value property for harmonic functions

I am currently trying to understand the proof of the mean value property from 'Harmonic Function Theory' by Axler, Bourdon, and Ramet.

Mean-Value Property: If $$u$$ is harmonic on $$\bar{B}(a, r)$$, then $$u$$ equals the average of $$u$$ over $$\partial B(a, r)$$. More precisely,

$$u(a) = \int_S u(a + r\zeta) \, d\sigma(\zeta)$$

Here is the beginning of the proof:

First assume that $$n > 2$$. Without loss of generality we may assume that $$B(a, r) = B$$. Fix $$\epsilon \in (0, 1)$$. Apply Green's identity with $$\Omega = \{x \in \mathbb{R}^n : \epsilon < |x| < 1\}$$ and $$v(x) = |x|^{2 - n}$$ to obtain

$$0 = (2 - n) \int_S u \, ds - (2 - n)\epsilon^{1 - n} \int _{\epsilon S}u \, ds - \int_S D_\textbf{n}u \, ds - \epsilon^{2 - n} \int_{\epsilon S}D_\textbf{n}u \, ds$$

They use Green's identity:

$$\int_{\Omega} (u\Delta v - v\Delta u) \, dV = \int_{\partial\Omega} (uD_\textbf{n} v - vD_\textbf{n} u) \, dS$$

Where $$D_\mathbf{n}$$ represents the directional derivative with respect to the normal vector $$\mathbf{n}$$.

I understand that the left side is $$0$$ because $$u$$ and $$v$$ are both harmonic, but I am having trouble understanding the right side of the equation. This is what I have done so far, and I'm unsure if it is correct.

$$D_\textbf{n}|x|^{2 - n} = \nabla |x|^{2 - n}\cdot\textbf{n} = (2 - n)|x|^{-n}x \cdot \textbf{n} = (2 - n)|x|^{-n}|x| = (2 - n)|x|^{1-n}$$

Then I don't know how to proceed.

Note that $$\partial\Omega$$ is the union of two connected components. The first is the unit sphere $$S$$, and the second is the sphere $$\epsilon S$$ of radius $$\epsilon$$ and centered at the origin. So, for any (nice enough) function $$f$$, when we integrate against the area measure $$dA$$, we get \begin{align} \int_{\partial \Omega}f\,dA&=\int_Sf\,dA+\int_{\epsilon S}f\,dA. \end{align} Now, plug in \begin{align} f&=uD_\mathbf{n_{\partial\Omega}}v-vD_{\mathbf{n}_{\partial\Omega}}u. \end{align} This is when we have to be extra careful with signs. Note that since $$\partial \Omega$$ is oriented using its outward unit normal, $$S$$ has the usual orientation “outward”, but on the surface $$\epsilon S$$, the outward direction to $$\partial\Omega$$ is actually the opposite of its usual orientation (draw a picture, so this should be clear).
So, at points $$x\in S$$, we have $$\mathbf{n}_{\partial\Omega}(x)=\frac{x}{|x|}=x$$, since $$|x|=1$$, so on $$S$$, we have \begin{align} f(x)&=u(x)\cdot (2-n)(1)^{n-1}-(1)^{n-2}D_{\mathbf{n}_{\partial \Omega}}u(x)=(2-n)u(x)-D_{\mathbf{n}_{\partial\Omega}}u(x). \end{align} For points $$x\in \epsilon S$$, we have $$\mathbf{n}_{\partial\Omega}(x):=-\mathbf{n}_{\epsilon S}(x)=-\frac{x}{|x|}=-\frac{x}{\epsilon}$$, so when evaluating $$D_{\mathbf{n}_{\partial\Omega}}v(x)$$, we get an extra minus sign: \begin{align} D_{\mathbf{n}_{\partial\Omega}}v(x)&=\langle\nabla v(x),\mathbf{n}_{\partial\Omega}(x)\rangle=\left\langle (2-n)|x|^{1-n}\frac{x}{|x|},-\frac{x}{|x|}\right\rangle=-(2-n)\epsilon^{1-n}. \end{align} Thus, \begin{align} \int_{\partial\Omega}(uD_{\mathbf{n_{\partial\Omega}}}v-vD_{\mathbf{n}_{\partial\Omega}}u)\,dA&=\int_S\left[(2-n)u-D_{\mathbf{n}_{\partial\Omega}}u\right]\,dA\\ &+\int_{\epsilon S}\left[u\cdot \left(-(2-n)\epsilon^{1-n}\right)-|\epsilon|^{2-n}D_{\mathbf{n}_{\partial\Omega}}u\right]\,dA\\ &=(2-n)\int_Su\,dA-(2-n)\epsilon^{1-n}\int_{\epsilon S}u\,dA\\ &-\int_{S}D_{\mathbf{n}_{\partial\Omega}}u\,dA-\epsilon^{2-n}\int_{\epsilon S}D_{\mathbf{n}_{\partial\Omega}}u\,dA. \end{align} This is exactly what you have. If it were me, I would have liked (because I just like it:) to simplify the $$\mathbf{n}_{\partial\Omega}$$ on the two spheres, which amounts to flipping the sign of the fourth term.
To finish off, note that the third term is actually zero (use the divergence theorem to write it as $$\int_{B_1(0)}\Delta u\,dV$$, and use that $$u$$ is harmonic in the ball). The fourth term vanishes as $$\epsilon\to 0$$, because the surface area of $$\epsilon S$$ grows like $$\epsilon^{n-1}$$, and $$u$$ is well-behaved, so that integral is $$\mathcal{O}(\epsilon)$$. The second term approaches $$(2-n)A_{n-1}u(0)$$, where $$A_{n-1}$$ is the surface area of the unit sphere, by continuity (you’re essentially taking the average of a continuous function, over spheres of smaller radii). By cleaning up, you get the mean-value theorem.