Solution (source code)

= Solution

Testing a weak <Neumann Poisson problem> with the constant function one gives $\int_\Omega f=0$, proving necessity. For sufficiency, use the closed <Hilbert space> of mean-zero $H^1$ functions. The given <Poincaré inequality> makes $\|\nabla v\|_{L^2}$ an equivalent norm there. Set
$$
a(u,v)=\int_\Omega\nabla u\cdot\nabla v,\qquad \ell(v)=-\int_\Omega fv.
$$
The negative sign corresponds to $\Delta u=f$. Poincare's inequality gives boundedness of $\ell$ and coercivity of $a$. The <Lax-Milgram theorem> supplies a unique mean-zero solution. Every $v\in H^1$ is the sum of its mean-zero part and a constant; since $\int f=0$, the weak identity extends to every $v\in H^1$. This is precisely the weak equation with zero normal derivative as its natural boundary condition. \b[Existence and uniqueness in the mean-zero space hold exactly when $\bar f=0$.]