TITLE: Green's identity contradicts Helmholtz theorem
QUESTION [9 upvotes]: Let F be a vector field on a bounded domain $V \subset \mathbb{R}^3$, which is twice differentiable, let $S := \partial V$.
According to the Helmholtz Theorem, F can be decomposed, such that:
$$ 
\mathbf{F} = -\nabla \Phi + \nabla \wedge \mathbf{A} 
$$
, where 
$$
\Phi (\mathbf{x}) = \frac{1}{4\pi} \int_V {\nabla ' \mathbf{F}(\mathbf{x} ') \over |\mathbf{x} - \mathbf{x}'|}dV' - \frac{1}{4 \pi} \oint_S {\langle \mathbf{n}', \mathbf{F}(\mathbf{x} ') \rangle \over | \mathbf{x} - \mathbf{x}' |}dS' \\
$$
$$
\mathbf{A} (\mathbf{x}) = \frac{1}{4\pi} \int_V {\nabla ' \wedge \mathbf{F}(\mathbf{x} ') \over |\mathbf{x} - \mathbf{x}'|}dV' - \frac{1}{4 \pi} \oint_S { \mathbf{n}' \wedge \mathbf{F}(\mathbf{x} ') \over | \mathbf{x} - \mathbf{x}' |}dS'
$$
Applying this for instance to the static Maxwell's equations:
$$
\mathbf{E}(\mathbf{x} ) = -\nabla \Phi (\mathbf{x})
$$
$$
\nabla \mathbf{E}(\mathbf{x} ) = {\rho( \mathbf{x} ) \over \epsilon_0 }
$$
we obtain:
$$
\Phi (\mathbf{x}) = \frac{1}{4\pi\epsilon_0} \int_V { \rho(\mathbf{x} ') \over |\mathbf{x} - \mathbf{x}'|}dV' + \frac{1}{4 \pi} \oint_S \frac{\langle \mathbf{n}', \nabla ' \Phi(\mathbf{x} ') \rangle}{| \mathbf{x} - \mathbf{x}' |}dS' \\
$$
Using Green's second identity, we can obtain a similiar result:
$$
\Psi(\mathbf{x} ) = {1 \over 4\pi } \int_V { 1 \over | \mathbf{x} - \mathbf{x} ' |} \Delta \Psi(\mathbf{x} ') dV'
 + {1 \over 4\pi }  \oint_{S} { \langle \mathbf{n '} (\mathbf{x} ' ), \nabla ' \Psi(\mathbf{x} ' ) 
\rangle \over | \mathbf{x} - \mathbf{x} ' | } dS'
 - {1 \over 4\pi }  \oint_{S} \Psi(\mathbf{x} ') \langle \mathbf{n '} (\mathbf{x} ' ), \nabla '
{ 1 \over | \mathbf{x} - \mathbf{x} ' | } \rangle  dS'
$$
$$
\Psi(\mathbf{x} ) = {1 \over 4\pi\epsilon_0}  \int_V { \rho(\mathbf{x} ') \over | \mathbf{x} - \mathbf{x} ' | }  dV' 
 + {1 \over 4\pi }  \oint_{S} { \langle \mathbf{n '} (\mathbf{x} ' ), \nabla ' \Psi(\mathbf{x} ' ) 
\rangle \over | \mathbf{x} - \mathbf{x} ' | } dS'
 - {1 \over 4\pi }  \oint_{S} \Psi(\mathbf{x} ') \langle \mathbf{n '} (\mathbf{x} ' ), \nabla '
{ 1 \over | \mathbf{x} - \mathbf{x} ' | } \rangle  dS'
$$
I'm bothered by the additional term in the second variant. 
At the first glance the different variants do not have to contradict since the potential of a field is not uniquely determined without additional conditions imposed. But for a given field $E: V\subset \mathbb{R}^3 \rightarrow \mathbb{R}^3$, $E = - \nabla \Phi = - \nabla \Psi$ implies that 
$$
0 = {1 \over 4\pi } \nabla  \oint_{S} \Psi(\mathbf{x} ') \langle \mathbf{n '} (\mathbf{x} ' ), \nabla '
{ 1 \over | \mathbf{x} - \mathbf{x} ' | } \rangle  dS'
$$
However, this does not seem to be true in general (take a potential that is constant ($\neq 0$) on $\partial V$ for instance).
What am I missing here?

REPLY [2 votes]: the potential of a field is not uniquely determined without additional conditions imposed

True. In the Helmholtz decomposition $\mathbf{F} = -\nabla \Phi + \nabla \wedge \mathbf{A}$ we can add any harmonic function to $\Phi$, because the gradient of a harmonic function is a solenoidal field, which can be absorbed by the term $\nabla \wedge \mathbf{A}$.  
So, when you decompose $\mathbf{E}(\mathbf{x} ) = -\nabla \Phi (\mathbf{x})$, you recover $\Phi$ up to  a harmonic function. And the term that bothers you, 
$$\oint_{S} \Psi(\mathbf{x} ') \left \langle \mathbf{n '} (\mathbf{x} ' ), \nabla '
{ 1 \over | \mathbf{x} - \mathbf{x} ' | } \right \rangle  dS'$$
is harmonic in $V$. 
In other words, your last line needs a one-symbol correction:
$$0 = {1 \over 4\pi } \Delta   \oint_{S} \Psi(\mathbf{x} ') \left\langle \mathbf{n '} (\mathbf{x} ' ), \nabla '
{ 1 \over | \mathbf{x} - \mathbf{x} ' | } \right \rangle  dS'$$