The uniqueness theorem

When solving electrostatic problems, we often rely on the uniqueness theorem

Assume you have a volume V, bounded by a collection of surfaces.
Assume you know the charge density ρ(r) everywhere inside the volume V, and on the surfaces of the volume you either know
(a)  the potential Φ (Dirichlet boundary conditions),
(b)  E∙n, i.e the normal derivatives of the potential (Neuman boundary conditions),
(c)  the surface is a conductor which carries a total charge Q,
then the solution Φ(r) inside V is unique except for possibly an arbitrary constant C fixing Φ(r) at a point.

Proof:

Assume that two solutions for Φ exist that satisfy the same boundary conditions.
2Φ1 = -ρ/ε0,  ∇2Φ2 = -ρ/ε0.
Let U = Φ1 - Φ2, then ∇2U = 0 inside V.

For Dirichlet boundary conditions U = 0 on the surfaces.
For Dirichlet boundary conditions ∂U/∂n  = 0 on the surfaces.
For a conductor with total charge Q
Φ1 = constant, Φ2 = constant --> U is constant on the surface,
and ∮S (∂U/∂n) dS = 0, since
S (∂Φ1/∂n) dS = ∮S (∂Φ1/∂n) dS = -∮S E∙ndS = -Qinside0.

Now apply Green's first identity with Φ = ψ = U.
V (U2U + U∙∇U) dV = ∮S U(∂U/∂n) dS.
2U = 0.  Therefore 
V|U|2 dV = ∮S U(∂U/∂n) dS.
For all boundary conditions the right hand side of this equation is zero.
Therefore ∫V|U|2 dV = 0.
Since |∇U|2 is a non-negative everywhere, this implies U = 0 everywhere inside V and U is constant.  Φ1 and Φ2 differ at most by a constant. 
Using any technique, if we find one solution Φ(r) inside V satisfying the boundary conditions (fixed at one point), we have found the only solution.


Green's first identity
V2ψ + Φ∙∇ψ) dV = ∮S Φ(∂ψ/∂n) dS
is derived starting with Green's theorem.
V∇∙A dV = ∮S A∙n dS.
Set A = Φψ, with Φ, ψ arbitrary scalar fields.
∇∙A = ∇∙ψ) =  Φ∇2ψ  +  Φ∙∇ψ.
A∙n = Φψ∙n = Φ(∂ψ/∂n).