Consider the Green’s function problem in the domain $D=\{(x,y) \in \mathbb{R} \times[0,a]\}$ i.e $-\infty<x<\infty, 0\leq y \leq a$ where $a > 0$: $$\Delta G(x,y|s,t)=\delta(x-s)\delta(y-t)\ \ in \ \ D$$ $$G(x,y|s,t)=0\ \ at \ y=0,y=a$$
I want to construct a Green’s function solution to this problem using images.
$\mathbf{My\ attempt}:$
Let $G= f+g$ where $f$ is the free space Green's ,i.e, $f=\frac{1}{2\pi} \ln \sqrt {(x-s)^2+(y-t)^2}$ where $(s,t) \in D$, and $g$ being any harmonic function such that $g=-f$ at $y=0,y=a$. I tried the function $g=-\frac{1}{2\pi}\ln \sqrt{(x-s)^2+(y+t)^2-4yt}$ which clearly satisfies $f=-g$ at $y=0,y=a$ but $g$ is not harmonic in D.
I would appreciate any help or hint about that.
Hint: The function $$ G(x,y\vert s,t)=\frac1{2\pi}\ln\sqrt{(x-s)^2+(y-t)^2}- \frac1{2\pi}\ln\sqrt{(x-s)^2+(y-(2a-t))^2} $$ Satisfies $\Delta G=\delta(x-s)\delta(y-t)$ and $ G(x,a\vert s,t)=0$. Can you add another function to ensure it vanishes on $y=0$, using the same sort of technique?
The idea of the above physically is to place an oppositely charged particle on the other side of the line $y=a$ to ensure $ G=0$ on $y=a$ (this new function is harmonic for $0\leq y\leq a$ because the Green's function is away from the point of singularity). To complete the problem, you do the same thing to ensure $ G=0$.