Neumann problem for Laplace equation on Balls by using Green function

In a halfspace, the construction of Neumann-Green function proceeds by reflection similar to the construction of Dirichlet-Green function; the difference is that one uses even reflection instead of odd reflection, thus achieving zero derivative instead of zero value. So, in $n\ge 3$ dimensions the function is (according to one convention) $$G(x;y) = -\frac{c_n}{|x-y|^{n-2}}-\frac{c_n}{|x-\xi|^{n-2}}$$ where $\xi$ is the reflection of $y$ in the boundary of the halfspace.

On a bounded domain such as a ball, the Neumann-Green function has to be defined a bit differently from the Dirichlet-Green function, because having $\Delta_x G(x;y)=\delta_y$ is incompatible with the Neumann boundary condition. Instead, the requirement on the Laplacian is $$\Delta_x G(x;y)=\delta_y-k,\quad \text{ where } \ k=|\Omega|^{-1}\tag{1}$$ Some authors prefer to put Laplacian on the second variable here; but when normalized by condition $\int G(x,y)\,dx=0$, the function is symmetric.

The requirement (1) makes the integral $\int_\Omega \Delta_x G(x;y)\,dx$ equal to zero, which is consistent with the boundary condition $\frac{\partial }{\partial n_x}G(x;y)=0$ on $\partial\Omega$. Note that the usage of Neumann-Green function is not affected by this $-k$; given any reasonable function $f$ with $\int_\Omega f=0$, we can solve the Neumann problem for the Poisson equation $\Delta u=f$ as $$ u(x)=\int_\Omega G(x;y) f(y)\,dy $$ since $$\Delta u(x)=\int_\Omega \Delta_x G(x;y) f(y)\,dy = f(x)- \int_\Omega k f(y)\,dy = f(x)$$

Explicit formulas

The singular part of the Laplacian in (1) is contributed by the fundamental solution; the constant part can be contributed by a quadratic polynomial. The hard part is to find a harmonic function to cancel out the normal derivative. A step toward finding it is to perform even reflection as for half-plane; in two dimensions this is enough but in three dimensions one needs further correction.

In the book Partial Differential Equations by Emmanuele DiBenedetto, pages 106-107, one can find the following formulas for $G(x;y)$ in the ball of radius $R$. (NB: DiBenedetto uses the convention $\Delta_y G(x;y)=-\delta_x+k$.)

Two dimensions $$G(x;y) = -\frac{1}{2\pi}\left( \ln|\xi-y|\frac{|x|}{R} +\ln|x-y|\right) - \frac{1}{4\pi R^2} |y|^2$$

where $\xi=\frac{R^2}{|x|^2}x$ is the reflection of $x$ across the boundary of the ball.

Three dimensions

$$G(x;y) = \frac{1}{4\pi}\left( \frac{1}{|x-y|} + \frac{R}{|x|} \frac{1}{|\xi-y|}\right) + \frac{1}{4\pi}\ln\left( (\xi-y)\cdot \frac{x}{|x|} +|\xi-y|\right) -\frac{1}{8\pi R^3} |y|^2 $$

Unlike the Dirichlet case, the author does not give a formula for $n$ dimensions, which suggests there isn't a simple one.