Electrostatics is the theory of electricity when nothing is changing in time. This means that all the time derivatives are zero, and we won't consider any magnetic fields. In this case, all we need is Poisson's equation,
Ñ^{2}Φ = ρ
or if there are no charges present, LaPlace's equation
Ñ^{2}Φ = 0
Let's suppose we have only one charge in the entire universe. We'll locate that charge at x'. The charge will be a dimensionless point particle. Now let's ask what the potential is at any other location, x. Poisson's equation is now:
Ñ^{2}Φ(x) = δ( x, x' )
We already know the solution to this equation, it's


Φ(x) = 

 x  x'  
There's an interesting thing about this equation: it's symmetric in x
and x'. If you and the charge trade
places, there's no difference in the potential where you are sitting.
We expect this: if you and the charge trade places, then
you're the same distance from the charge that you were before, and
distance is all that matters.
What if instead of one point charge, we had several point charges. These charges would be located at x'_{i}. Now, since the electrostatic field is linear, since it obeys the laws of superposition, all we need to do is add up the potential from each of the charges:
Σ 


Φ(x) = 


 x  x'_{i}  
Since we're working on a classical theory, we'll ignore the idea of point charges and instead we'll presume we have a continuous charge distribution, ρ(x). Now the potential from a charge distribution in a particular volume is,
∫ 


Φ(x) = 

dx'  
 x  x'_{i}  
If we lived in empty space and there were only a few charges in the
universe, this would be it: electrodynamics would be a
completely solved problem. But, things are just a little more
complicated. We're going to be writing this little function, 1 / 
x  x'  a lot, so we're going to invent a little short
hand for it: G( x, x' ). As we noted above,
G( x, x' ) = G( x', x ), that is G is
symmetric in its two arguments. G, by the way, stands for
Green's Function. We'll look a bit more closely at this function now.
The first thing we notice is that Ñ_{x}^{2}G(
x, x' ) =
δ( x, x' ). We put a subscript on Ñ
to help us remember that we're
differentiating with respect to x, not x'. This
equation, Ñ_{x}^{2
}G( x, x' ) = δ( x, x' ), is the
defining equation for G. Now we can ask, is G = 1 / 
x  x'  a unique solution? Immediately we see that it is
not. Imagine we have some function F(x) which is a
solution to Laplace's equation Ñ^{2}F
= 0. Now, Ñ_{x}^{2}(
G( x, x' )+F(x) ) = δ( x, x' ).
So, we see that we can add any
solution to Laplace's equation to G and G is still a solution to
Poisson's equation. We will use this freedom a lot. This freedom
is called a Gauge freedom, for historic reasons. Probably the gauge
freedom most familiar to physics students is the choice of a
voltage for ground.
We start with Gauss' Divergence theorem,
∫Ñ⋅A d^{3}x = ∫ A⋅dS = ∫A⋅n dS
Where S is a surface that bounds our volume of interest and n is an
outward pointing unit vector on S.
Now, choose A = φÑψ.
n⋅A = n⋅φÑψ
= φn⋅
Ñψ = φ ∂ψ/∂n
Ñ⋅A = Ñ⋅(φÑψ)
= φÑ^{2}ψ + Ñφ⋅Ñψ
∫Ñ⋅A d^{3}x = ∫ φÑ^{2}ψ + Ñφ⋅ Ñψ d^{3}x = ∫φ ∂ψ/∂n dS Green's First Identity
Now, take Green's first identity, exchange φ and ψ, and subtract. This gives us:
∫ φÑ^{2}ψ  ψÑ^{2}φ d^{3}x = ∫ φ ∂ψ/∂n  ψ ∂φ/∂n dS Green's Second Identity