Solution (source code)

= Solution

The supplied positive free-space kernel satisfies $-\Delta H=\delta$, so use the same sign convention for the <Dirichlet Green function>. For an interior source $Q=(\xi,\eta,\zeta)$, require
$$
-\Delta_PG(P;Q)=\delta_Q(P),\qquad G=0\text{ on }x=0\text{ and }z=0,\qquad G(P;Q)\to0\text{ as }|P|\to\infty.
$$
Away from $Q$, the function is <harmonic>, and $G-H$ is regular near $Q$. The <method of images> reflects the source in each coordinate plane, reversing its sign on each reflection. Therefore
$$
\boxed{G(P;Q)=\frac1{4\pi}\sum_{i,j=0}^1\frac{(-1)^{i+j}}{\sqrt{(x-(-1)^i\xi)^2+(y-\eta)^2+(z-(-1)^j\zeta)^2}}}.
$$
On either face, the terms cancel in pairs. Only the original source lies in the domain, so the other three terms are <harmonic> there; the required singularity and decay also follow. This is the <Dirichlet Green function for a three-dimensional quarter-space>. Using $\Delta G=\delta$ instead would change the sign of the kernel and the representation formula together, as in <sign conventions for a Dirichlet Green function>.