Solution (source code)

= Solution

For $\mathbf F=\nabla\phi$, the definition of the <Laplacian> gives $\nabla\cdot\mathbf F=\nabla^2\phi=f$. Integrating over $V$ and applying the <divergence theorem> yields
$$
\boxed{\int_V f\,dV=\int_V\nabla\cdot\mathbf F\,dV
=\int_{\partial V}\mathbf F\cdot d\mathbf S.}
$$
This is the flux form of <Poisson equation>, for an outward-oriented piecewise smooth boundary and the usual smoothness of $\phi$ on a neighborhood of the volume. In particular, a singularity cannot be ignored when applying this identity.