[proofplan]
Integrate the equation $\Delta u = f$ over $\Omega$ and apply the [divergence theorem](/theorems/28) to convert the volume integral of the Laplacian into a boundary integral of $\partial_\nu u$. The [Neumann boundary condition](/page/Neumann%20boundary%20condition) $\partial_\nu u = h$ then directly forces an integral relation between $f$ and $h$.
[/proofplan]
[step:Integrate the PDE over the domain]
Integrating $\Delta u = f$ over $\Omega$:
\begin{align*}
\int_\Omega f(x) \, d\mathcal{L}^n(x) = \int_\Omega \Delta u(x) \, d\mathcal{L}^n(x).
\end{align*}
[guided]
Since $u$ is assumed to be a solution of $\Delta u = f$ in $\Omega$, the two sides agree pointwise. Integration preserves equality, so integrating both sides over $\Omega$ with respect to [Lebesgue measure](/page/Lebesgue%20Measure) $\mathcal{L}^n$ gives
\begin{align*}
\int_\Omega f(x) \, d\mathcal{L}^n(x) = \int_\Omega \Delta u(x) \, d\mathcal{L}^n(x).
\end{align*}
Both integrals are finite: $f \in C(\Omega)$ and $\Delta u \in C(\Omega)$ on the bounded set $\Omega$.
[/guided]
[/step]
[step:Convert the Laplacian to a boundary integral via the divergence theorem]
Since $\Delta u = \nabla \cdot (\nabla u)$, the [Gauss-Green Theorem](/theorems/28) gives
\begin{align*}
\int_\Omega \Delta u(x) \, d\mathcal{L}^n(x) = \int_{\partial\Omega} \partial_\nu u(\sigma) \, d\mathcal{H}^{n-1}(\sigma).
\end{align*}
[guided]
Write the Laplacian as a divergence: $\Delta u = \nabla \cdot (\nabla u)$. The [Gauss-Green Theorem](/theorems/28) states that for a vector field $F \colon \overline{\Omega} \to \mathbb{R}^n$ of class $C^1(\overline{\Omega})$ on a bounded [open set](/page/Open%20Set) with smooth [boundary](/page/Boundary),
\begin{align*}
\int_\Omega \nabla \cdot F(x) \, d\mathcal{L}^n(x) = \int_{\partial\Omega} F(\sigma) \cdot \nu(\sigma) \, d\mathcal{H}^{n-1}(\sigma),
\end{align*}
where $\nu$ is the outward unit normal. We apply this with $F = \nabla u$. The hypotheses are satisfied: $\partial\Omega$ is smooth by assumption, and $u \in C^2(\Omega) \cap C^1(\overline{\Omega})$ guarantees that $\nabla u \colon \overline{\Omega} \to \mathbb{R}^n$ is $C^1$ in $\Omega$ and continuous up to $\overline{\Omega}$. The resulting boundary integrand $\nabla u \cdot \nu = \partial_\nu u$ is the outward normal derivative, so
\begin{align*}
\int_\Omega \Delta u(x) \, d\mathcal{L}^n(x) = \int_{\partial\Omega} \partial_\nu u(\sigma) \, d\mathcal{H}^{n-1}(\sigma).
\end{align*}
[/guided]
[/step]
[step:Substitute the Neumann boundary condition to obtain the compatibility condition]
Since $\partial_\nu u = h$ on $\partial\Omega$, combining the two equalities yields
\begin{align*}
\int_\Omega f(x) \, d\mathcal{L}^n(x) = \int_{\partial\Omega} h(\sigma) \, d\mathcal{H}^{n-1}(\sigma).
\end{align*}
This is a necessary condition on the data $f$ and $h$ for the Neumann problem to admit a solution.
[guided]
Chaining the results of the previous two steps:
\begin{align*}
\int_\Omega f(x) \, d\mathcal{L}^n(x) = \int_\Omega \Delta u(x) \, d\mathcal{L}^n(x) = \int_{\partial\Omega} \partial_\nu u(\sigma) \, d\mathcal{H}^{n-1}(\sigma).
\end{align*}
The [Neumann boundary condition](/page/Neumann%20boundary%20condition) prescribes $\partial_\nu u(\sigma) = h(\sigma)$ for every $\sigma \in \partial\Omega$, so the boundary [integral](/page/Integral) becomes
\begin{align*}
\int_{\partial\Omega} \partial_\nu u(\sigma) \, d\mathcal{H}^{n-1}(\sigma) = \int_{\partial\Omega} h(\sigma) \, d\mathcal{H}^{n-1}(\sigma).
\end{align*}
Therefore
\begin{align*}
\int_\Omega f(x) \, d\mathcal{L}^n(x) = \int_{\partial\Omega} h(\sigma) \, d\mathcal{H}^{n-1}(\sigma).
\end{align*}
Since this identity was derived solely from the assumption that a solution $u$ exists, it is a necessary condition on the data. If this integral balance fails, no classical solution to the Neumann problem can exist.
[/guided]
[/step]