Solution (source code)

= Solution

Use the <product rule> for the <vector field> $F=\phi\nabla\psi-\psi\nabla\phi$:
$$
\nabla\cdot F=\nabla\phi\cdot\nabla\psi+\phi\nabla^2\psi-\nabla\psi\cdot\nabla\phi-\psi\nabla^2\phi=\phi\nabla^2\psi-\psi\nabla^2\phi.
$$
The mixed <dot products> cancel. Applying the <divergence theorem> with the outward <unit normal> gives <Green's second identity>,
$$
\boxed{\int_V(\phi\nabla^2\psi-\psi\nabla^2\phi)dV=\int_S(\phi\,n\cdot\nabla\psi-\psi\,n\cdot\nabla\phi)dS.}
$$
The fields and boundary are assumed sufficiently regular; a Green-function singularity is handled by excising a small ball or by using <distributions>.