Conditions for solvability of Poisson's equation with Neumann boundary condition

Suppose I have:

$$\begin{cases}-\Delta u= f, &\text{ on } \Omega\\ \nabla u \cdot n = g &\text{ on } \partial \Omega\\ \int_\Omega u = \operatorname{const}. \end{cases}$$

I'm supposed to find what conditions $f$ and $g$ satisfy for existence of solutions. I have no idea where to use the last condition that the area of $u$ vanishes. Any help? Please do not tell me the answer as it's homework.

I tried looking at the weak formulation and coercivity and boundedness of the bilinear form are fine on $H_0^1$.

• What do we know about $\Omega$: smooth boundary, connectedness, boundedness? You can work on $H^1(\Omega)/ F$ (quotient space) when you identify two functions which have the same gradient. – Davide Giraudo Feb 6 '12 at 19:56
• I think it's Lipschitz smooth and bounded. I don't think that quotient space route is the way to go as our class hasn't done anything related to that though. – qoat Feb 6 '12 at 20:07
• The last condition is to get uniqueness, since if we only consider the two first conditions, if $u$ is solution then so will be $u+C$ where $C$ is a constant. I'm not sure whether we can use $H^1_0(\Omega)$, since after writing the weak formulation, we won't be able to catch the condition on the boundary. – Davide Giraudo Feb 6 '12 at 20:16