Poisson Equation: Prove that $\int_\Omega f\cdot d\vec x + \int_{\partial\Omega}g\cdot ds=0$ has either no solutions or infinitely many solutions I am to consider Poisson’s equation with Neumann boundary conditions:
$-\nabla^2 u = f$ in  $\Omega$ 
$\nabla u \cdot \vec n = g$ in $\partial \Omega$
and I am asked to prove that  $\int_\Omega f\cdot d\vec x + \int_{\partial\Omega}g\cdot ds=0$ has either no solutions or infinitely many solutions 
Now I am not really sure how to show this, but my thinking is to show that there is a unique solution for each $u$ up to a constant, which then means there are infinitely many solutions?
I know the integral can be rewritten as  $\int_\Omega f\cdot d\vec x + \int_{\partial\Omega} \nabla u \cdot \vec nds=0$ and maybe this is of help?
Any hints would be really useful thanks.
 A: I assume we are operating in $\Bbb R^n$, since in any event everything said here holds in $n$ dimensions.  Thus $\Omega \subset \Bbb R^n$ etc.  Furthermore I take $d \vec x$ to be the ordinary volume measure on $\Bbb R^n$, and $ds$ to be the hypersurface volume element induced on $\partial \Omega$ from $d \vec x$.
If by the assertion that
$\displaystyle \int_\Omega f \cdot d \vec x + \int_{\partial \Omega} g \cdot ds = 0 \tag 1$
"has a solution", where we take $\vec n$ to be the outward pointing unit normal vector on $\partial \Omega$ (the existence of which being guaranteed if $\partial \Omega$ is sufficiently well-behaved, e.g. is a differentiable submanifold of the ambient space $\Bbb R^n$), we mean that there exists a (sufficiently differentiable, of course) function $u$ on $\bar \Omega = \Omega \cup \partial \Omega$ such that
$-\nabla^2 u = f \; \text{on} \; \Omega \tag 2$
and
$\nabla u \cdot \vec n = g \; \text{on} \; \partial \Omega, \tag 3$
so that (1) binds, then we immediately see that is has a great many solutions; all we need do to generate pairs $(f, g)$ such that (2)-(3) hold is to begin with any $u \in C^2(\bar \Omega, \Bbb R)$ and define $f$ and $g$ via (2) and (3); then
$\displaystyle \int_\Omega f \cdot d \vec x + \int_{\partial \Omega} g \cdot ds = \int_\Omega (-\nabla^2 u) \cdot d \vec x + \int_{\partial \Omega} (\nabla u \cdot \vec n) \cdot ds$
$= \displaystyle -\int_\Omega (\nabla \cdot \nabla u) \cdot d \vec x + \int_{\partial \Omega} (\nabla u \cdot \vec n) \cdot ds; \tag 4$
from the divergence theorem of Gauss we have
$\displaystyle \int_\Omega (\nabla \cdot \nabla u) \cdot d \vec x = \int_{\partial \Omega} (\nabla u \cdot \vec n) ds, \tag 5$
and inserting this into (4) yields
$\displaystyle \int_\Omega f \cdot d \vec x + \int_{\partial \Omega} g \cdot ds = -\int_{\partial \Omega} (\nabla u \cdot \vec n) ds + \int_{\partial \Omega} (\nabla u \cdot \vec n) ds = 0, \tag 6$
so we see the pair $(f, g)$ satisfies the requisite constraint; thus indeed there are many such pairs $(f, g)$.
The above remarks essentially demonstrate that (1) is a necessary condition for the existence of $u$ satisfying (2) and (3); we have not addressed the question of sufficiency.  Though it well may be the case that the existence of $(f, g)$ obeying (1), in addition to some suitable continuity hypotheses, is sufficient to guarantee the existence of a suitable $u$, it appears that the proof of such an assertion is considerably more complicated than what we have done here.  We also observe that finding such $(f, g)$ is in principle not a difficult matter:  we simply choose $f$ such that
$\vert \displaystyle \int_\Omega f \cdot d \vec x \vert\ < \infty, \tag7$
and then choose any $g$ on $\partial \Omega$ such that
$0 < \displaystyle \vert \int_{\partial \Omega} g \cdot ds \vert < \infty, \tag 8$
and if necessary re-scale such $g$ by a factor
$C = -\dfrac{ \displaystyle \int_\Omega f \cdot d \vec x}{ \displaystyle\int_{\partial \Omega} g \cdot ds}; \tag 9$
it is now easy to see that
$\displaystyle \int_\Omega f \cdot d \vec x + \int_{\partial \Omega} (Cg) \cdot ds = \int_\Omega f \cdot d \vec x + C\int_{\partial \Omega} g \cdot ds = 0. \tag{10}$
This argument indicates that there are a great many pairs $(f, g)$ satisfying (1); whether they all correspond to a $u$ as in (2)-(3) I do not know, though I would not be surprised if this were so at least for some domains $\Omega$.
In the event that some $(f, g)$ does give rise to a $u$ in accord with (2)-(3), we can in fact show there are an infinite number of pairs $(f, g)$ which are also "solutions".  An extremely simple demonstration merely replaces $u$ by $u + r$, $r \in \Bbb R$; then
$-\nabla^2 (u + r) = -\nabla^2 u = f \tag{11}$
and
$\nabla (u + r) \cdot \vec n = \nabla u \cdot \vec n = g; \tag{12}$
we see that shifting $u$ by a constant yields a new solution, and there are clearly an infinite number of such.  
A vastly more extensive family of solutions may be had if we allow $u$ to be adjusted by the addition of a harmonic function $v$:  suppose we take $v \in C^2(\bar \Omega, \Bbb R)$ to satisfy
$\nabla^2 v = 0; \tag{12}$
then
$-\nabla^2(u + v) = -\nabla^2 u - \nabla^2 v = -\nabla^2 u = f, \tag{13}$
and 
$\nabla (u + v) \cdot \vec n = \nabla u \cdot \vec n + \nabla v \cdot \vec n = g + \nabla v \cdot \vec n; \tag{14}$
thus
$\displaystyle \int_\Omega f \cdot d \vec x + \int_{\partial \Omega} (g + \nabla v \cdot \vec n) \cdot ds = \int_\Omega f \cdot d \vec x + \int_{\partial \Omega} g \cdot ds + \int_{\partial \Omega} (\nabla v \cdot \vec n) \cdot ds$
$= \displaystyle \int_\Omega f \cdot d \vec x +\int_{\partial \Omega} g \cdot ds + \int_\Omega \nabla^2 v \cdot d \vec x = \int_\Omega f \cdot d \vec x +\int_{\partial \Omega} g \cdot ds = 0, \tag{15}$
which shows that $(f, g + \nabla v \cdot \vec n)$ is also a solution pair in the sense we have defined it, corresponding to $u + v$.  It should be noted that the family of functions $u + v$ is in fact far larger than $u + r$, $r \in \Bbb R$.
We have thus shown that if there is a single solution, as we have taken it, to (1), then there are in fact an infinite number of same.
