Boundary condition for Green's function Suppose we have an equation $\nabla^2V = -\rho/\epsilon_0$ and the boundary condition for $V$ is given. I have a question regarding the boundary condition for Green's function for this equation. What determines the boundary conditions for the Green's function? Why should we choose a particular boundary condition?
 A: The Green's function for this problem is a generalized function that satisfies the equation $\nabla^2 G(x,x') = -\delta(x-x')$. We want it to satisfy boundary conditions such that we can write the solution $V$ to the general problem as
$$V(x) = \int_\Omega G(x,x') \frac{\rho(x')}{\epsilon_0} d x'.$$
From the equations above, we see that we can interpret the Green's function $G(x,x')$ as the potential that arises at the point $x$ due to a point charge at the position $x'$, and that we can write the full potential $V$ as a superposition of these point-charge potentials.
If $V$ has to satisfy homogeneous boundary conditions of some sort (e.g. Dirichlet or Neumann), this can be guaranteed by imposing the same boundary conditions on $G$ viewed as a function of its first argument.
In the case of Dirichlet boundary conditions, for instance, we require that
$V(x) = 0$ when $x \in \partial \Omega$, and we should then require that $G(x,x')=0$ when $x \in \partial \Omega$.
How do we then treat inhomogeneous BCs? Well, the typical approach is to divide the problem in two. Say that we require $V(x) = f(x)$ when $x\in \partial \Omega$. Then we can write $V(x) = V_\rho(x) + V_\text{hom}(x)$ where
$$\nabla^2 V_\text{hom}(x) = 0, \qquad V_\text{hom}(x) = f(x) \text{  when  } x \in \partial \Omega,$$
$$\nabla^2 V_\rho(x) = -\frac{\rho}{\epsilon_0}, \qquad V_\rho(x) = 0 \text{  when  } x \in \partial \Omega.$$
We can then use the Green's function to find $V_\rho$, which satisfies homogeneous BCs, and separately solve the Laplace equation for $V_\text{hom}$ with the specified inhomogeneous BC.
