Solution (source code)

= Solution

Reflect the physical source across $z=0$, writing $\overline{\mathbf r'}=(x',y',-z')$. Its radius is still $s=|\mathbf r'|$, and its spherical image is $\overline{\mathbf r^*}$. The <Dirichlet Green function inside a hemisphere> is
$$
\boxed{G_1(\mathbf r,\mathbf r')=G_0(\mathbf r,\mathbf r')-G_0(\mathbf r,\overline{\mathbf r'}).}
$$
Explicitly this four-source <method of images> is
$$
G_1=-\frac1{4\pi}\left[
\frac1{|\mathbf r-\mathbf r'|}-\frac1{|\mathbf r-\overline{\mathbf r'}|}
-\frac1{s|\mathbf r-\mathbf r^*|}+\frac1{s|\mathbf r-\overline{\mathbf r^*}|}\right].
$$
Both $G_0$ terms vanish on the spherical cap. On the flat equatorial disc, reflection equates the two physical-source distances and also the two image-source distances, so both pairs cancel. The reflected physical source lies in the lower half-ball and the two inverted images lie outside the sphere. Consequently the only source in the upper half-ball is $\mathbf r'$, with the correct coefficient:
$$
\boxed{\Delta_{\mathbf r}G_1=\delta(\mathbf r-\mathbf r'),\qquad G_1=0\text{ on both boundary pieces}.}
$$
The <Dirichlet uniqueness for the Poisson equation> then identifies this as the required Green function.