= Solution
Fix $\mathbf x'$ inside $V$ and put $\psi(\mathbf x)=G(\mathbf x,\mathbf x')$ in <Green's second identity>. The volume integral becomes
$$
\int_V\big[\phi(\mathbf x)(-\delta^{(3)}(\mathbf x-\mathbf x'))-G(\mathbf x,\mathbf x')\cdot0\big]dV=-\phi(\mathbf x').
$$
Here <Laplace's equation> eliminates the second term, and the <Dirac delta> evaluates the first. Reversing the signs in the boundary integral gives
$$
\boxed{\phi(\mathbf x')=\int_S\left[G(\mathbf x,\mathbf x')\,n\cdot\nabla_{\mathbf x}\phi(\mathbf x)-\phi(\mathbf x)\,n\cdot\nabla_{\mathbf x}G(\mathbf x,\mathbf x')\right]dS.}
$$
All boundary derivatives act on the integration variable $\mathbf x$, not on the fixed evaluation point $\mathbf x'$.
Back to article page