Tag Archives: electric potential

Uniqueness of potential in dielectrics

Required math: calculus

Required physics: electrostatics

Reference: Griffiths, David J. (2007) Introduction to Electrodynamics, 3rd Edition; Prentice Hall – Problem 4.35.

When we considered electric fields in a vacuum, we found that if we specify the charge distribution in some region {\mathcal{V}}, and also specify either the potential or its normal derivative on the boundary of that region, then the potential inside {\mathcal{V}} is unique. Here, we’ll show that uniqueness of the potential also applies to the case where {\mathcal{V}} contains some linear dielectric. The assumptions we make are:

  1. The potential {V} is specified on all boundaries of {\mathcal{V}}.
  2. The free charge distribution {\rho_{f}} is specified everywhere within {\mathcal{V}}.
  3. The distribution of dielectric within {\mathcal{V}} is fixed, and all dielectric constants are specified.

The proof follows a similar line of reasoning to that used in the electric field case. As before we’ll suppose that there are two distinct potentials {V_{1}} and {V_{2}} that satisfy the conditions. We’ll also define the displacements due to these potentials as {\mathbf{D}_{1}} and {\mathbf{D}_{2}}. Now we consider the difference between these two solutions, so we have {V_{3}\equiv V_{1}-V_{2}} and {\mathbf{D}_{3}\equiv\mathbf{D}_{1}-\mathbf{D}_{2}}. Now we look at this volume integral and convert it to a surface integral in the usual way:

\displaystyle   \int_{\mathcal{V}}\nabla\cdot\left(V_{3}\mathbf{D}_{3}\right)d^{3}\mathbf{r} \displaystyle  = \displaystyle  \int_{A}V_{3}\mathbf{D}_{3}\cdot d\mathbf{a} \ \ \ \ \ (1)

By assumption, on the surface {A}, {V_{3}=V_{1}-V_{2}=0} since the potential is specified everywhere on the boundary. Therefore:

\displaystyle  \int_{\mathcal{V}}\nabla\cdot\left(V_{3}\mathbf{D}_{3}\right)d^{3}\mathbf{r}=0 \ \ \ \ \ (2)

Now we expand the integrand using a standard theorem from vector calculus:

\displaystyle  \nabla\cdot\left(V_{3}\mathbf{D}_{3}\right)=\mathbf{D}_{3}\cdot\nabla V_{3}+V_{3}\nabla\cdot\mathbf{D}_{3} \ \ \ \ \ (3)

From the formula for the divergence of the displacement:

\displaystyle   \nabla\cdot\mathbf{D}_{3} \displaystyle  = \displaystyle  \nabla\cdot\left(\mathbf{D}_{1}-\mathbf{D}_{2}\right)\ \ \ \ \ (4)
\displaystyle  \displaystyle  = \displaystyle  \rho_{f}-\rho_{f}\ \ \ \ \ (5)
\displaystyle  \displaystyle  = \displaystyle  0 \ \ \ \ \ (6)

This follows, since the free charge distribution was fixed by assumption. Therefore we have

\displaystyle  \nabla\cdot\left(V_{3}\mathbf{D}_{3}\right)=\mathbf{D}_{3}\cdot\nabla V_{3} \ \ \ \ \ (7)

For a linear dielectric, {\mathbf{D}=\epsilon\mathbf{E}} and in general, {\mathbf{E}=-\nabla V}, so

\displaystyle   \nabla\cdot\left(V_{3}\mathbf{D}_{3}\right) \displaystyle  = \displaystyle  \mathbf{D}_{3}\cdot\nabla V_{3}\ \ \ \ \ (8)
\displaystyle  \displaystyle  = \displaystyle  -\epsilon E_{3}^{2}\ \ \ \ \ (9)
\displaystyle  \displaystyle  = \displaystyle  -\epsilon\left|\mathbf{E}_{1}-\mathbf{E}_{2}\right|^{2} \ \ \ \ \ (10)

Thus the volume integral becomes

\displaystyle   \int_{\mathcal{V}}\nabla\cdot\left(V_{3}\mathbf{D}_{3}\right)d^{3}\mathbf{r} \displaystyle  = \displaystyle  -\int_{\mathcal{V}}\epsilon\left|\mathbf{E}_{1}-\mathbf{E}_{2}\right|^{2}d^{3}\mathbf{r}\ \ \ \ \ (11)
\displaystyle  \displaystyle  = \displaystyle  0 \ \ \ \ \ (12)

(Note that we can’t take {\epsilon} outside the integral since in general it varies over the volume, depending on what dielectrics are present.)

Now the integrand is non-negative everywhere, since the permittivity {\epsilon\ge\epsilon_{0}} so the only way the integral can be zero is if {\mathbf{E}_{1}=\mathbf{E}_{2}} everywhere inside {\mathcal{V}}. This means that {V_{1}-V_{2}=k} for some constant {k}, but since {V_{1}=V_{2}} on the boundary, we must have {k=0} and {V_{1}=V_{2}} everywhere.

Green’s reciprocity theorem

Required math: calculus

Required physics: electrostatics

Reference: Griffiths, David J. (2007) Introduction to Electrodynamics, 3rd Edition; Prentice Hall – Problems 3.43 & 3.44.

There is an interesting theorem that relates two separate charge distributions. Suppose we have a charge distribution {\rho_{1}} with its associated potential {V_{1}}, and a completely separate charge distribution {\rho_{2}} with potential {V_{2}}. These two distributions do not co-exist; they are completely separate situations.

Now consider the electric fields {\mathbf{E}_{1}} and {\mathbf{E}_{2}} produced by these two distributions. We can consider the following integral, taken over all space:

\displaystyle   \int\mathbf{E}_{1}\cdot\mathbf{E}_{2}d^{3}\mathbf{r} \displaystyle  = \displaystyle  -\int\nabla V_{1}\cdot\mathbf{E}_{2}d^{3}\mathbf{r} \ \ \ \ \ (1)

Let’s consider the first term in the dot product, and use integration by parts:

\displaystyle  -\int\frac{\partial V_{1}}{\partial x}E_{2_{x}}dxdydz=-\int\left.V_{1}E_{2_{x}}\right|_{all\; x}dydz+\int V_{1}\frac{\partial E_{2_{x}}}{\partial x}dxdydz \ \ \ \ \ (2)

If we make the usual assumption that the potential {V_{1}} vanishes at infinity then the integrated term is zero. Doing similar integrals for the other terms in the dot product (integrating with respect to {y} and then {z} first for the second and third terms respectively) gives us:

\displaystyle   -\int\nabla V_{1}\cdot\mathbf{E}_{2}d^{3}\mathbf{r} \displaystyle  = \displaystyle  \int V_{1}\nabla\cdot\mathbf{E}_{2}d^{3}\mathbf{r}\ \ \ \ \ (3)
\displaystyle  \displaystyle  = \displaystyle  \frac{1}{\epsilon_{0}}\int V_{1}\rho_{2}d^{3}\mathbf{r} \ \ \ \ \ (4)

where in the last line we used Gauss’s law relating the field to the charge distribution.

We could just as well have done the same calculation interchanging the subscripts 1 and 2, so we get

\displaystyle  \int V_{1}\rho_{2}d^{3}\mathbf{r}=\int V_{2}\rho_{1}d^{3}\mathbf{r} \ \ \ \ \ (5)

which is Green’s reciprocity theorem.

Now for a few examples of its use.

Example 1. Suppose we have two conductors, each of which can be of arbitrary shape and location. First, we place a charge {Q} on conductor 1, which induces a potential {V_{12}} on conductor 2 (which has no net charge). Second, we do the opposite: we place the same charge {Q} on conductor 2, which induces a potential {V_{21}} on conductor 1 (which now has no net charge).

Since the potential on a conductor is always constant, we can use the reciprocity theorem to say

\displaystyle  V_{12}\int\rho_{2}d^{3}\mathbf{r}=V_{21}\int\rho_{1}d^{3}\mathbf{r} \ \ \ \ \ (6)

The two integrals are the same, and give the total charge {Q}, so we can conclude that {V_{12}=V_{21}}. Note that this result does not depend on the shape or location of the conductors; it’s a universal result.

Example 2. We have two parallel infinite conducting planes, both of which are grounded. The distance between the plates is {d}. We place a point charge {q} between the plates at a distance {x} from plate 1 (which we take to be the left plate). Find the total charge induced on each plate.

To apply the reciprocity theorem, we need two distinct charge distributions. For the first, we can take the system as described. For the second, we can remove the charge {q} and also remove the condition that the plates are grounded, so each plate can be at a different potential.

First, consider the distribution as given. Let the potential of the left plate be {V_{l}} and of the right plate be {V_{r}}. Since the two plates are grounded, we have {V_{l}=V_{r}=0}. Also, since the plates are grounded, the induced charge must cancel out the point charge so there is zero net charge in the system. That is {Q_{l}+Q_{r}=-q}.

Now consider the distribution without the point charge {q}. In this case we can take the potential of the left plate to be {V_{l}'=0} and of the right plate to be {V_{r}'=V_{0}}. Note that this assumes the right plate is not grounded. This doesn’t matter, since the second distribution can be anything we like. We assume that the plates here have total charges {Q_{l}'} and {Q_{r}'}, although we’ll see we don’t need these values anyway.

Since the second distribution contains no point charge, the potential varies linearly between the two plates, so the potential at position {x} is {V_{x}'=V_{l}'+V_{0}x/d=V_{0}x/d}. Now we’re ready to apply the reciprocity theorem. The charge density {\rho_{2}} consists only of the charge on the two plates, since we’ve removed {q}. We have, on one side:

\displaystyle   \int V_{1}\rho_{2}d^{3}\mathbf{r} \displaystyle  = \displaystyle  V_{l}Q_{l}'+V_{r}Q_{r}'\ \ \ \ \ (7)
\displaystyle  \displaystyle  = \displaystyle  0 \ \ \ \ \ (8)

since {V_{l}=V_{r}=0}.

On the other side, we have

\displaystyle   \int V_{2}\rho_{1}d^{3}\mathbf{r} \displaystyle  = \displaystyle  V_{l}'Q_{l}+V_{x}'q+V_{r}'Q_{r}\ \ \ \ \ (9)
\displaystyle  \displaystyle  = \displaystyle  V_{0}\left(\frac{qx}{d}+Q_{r}\right) \ \ \ \ \ (10)

From the theorem, this must be zero, so we get

\displaystyle   Q_{r} \displaystyle  = \displaystyle  -\frac{qx}{d}\ \ \ \ \ (11)
\displaystyle  Q_{l} \displaystyle  = \displaystyle  -q+\frac{qx}{d}\ \ \ \ \ (12)
\displaystyle  \displaystyle  = \displaystyle  -q\left(1-\frac{x}{d}\right) \ \ \ \ \ (13)

Note that the reciprocity theorem in this case allows us to calculate only the total charge on each plate; finding the actual surface charge density is a considerably harder problem.

Example 3. We have two concentric spherical conductors of radii {a} and {b>a}, and a point charge {q} between them at a location {r} such that {a<r<b}. Again assuming the spheres are grounded, find the total induced charge on each sphere.

Using similar notation to the last example, we again consider the two distributions to be the original configuration (with the charge {q}) and a configuration without {q}. In the first case, since the conductors are grounded, we have

\displaystyle  V_{a}=V_{b}=0 \ \ \ \ \ (14)

In the second case, we can take {V_{a}'=V_{0}}. In this case, since we don’t have the charge {q}, the system has spherical symmetry, so any charge distributed over the spheres must be uniform, so the potential and the field are the same as if the charge were concentrated at the centre of the spheres. This means that the potential between the spheres has a {1/r} dependence, so we can write

\displaystyle   V_{a}' \displaystyle  = \displaystyle  V_{0}\ \ \ \ \ (15)
\displaystyle  V_{r}' \displaystyle  = \displaystyle  \frac{a}{r}V_{0}\ \ \ \ \ (16)
\displaystyle  V_{b}' \displaystyle  = \displaystyle  \frac{a}{b}V_{0} \ \ \ \ \ (17)

Applying the reciprocity theorem, we get

\displaystyle   \int V_{1}\rho_{2}d^{3}\mathbf{r} \displaystyle  = \displaystyle  V_{a}Q_{a}'+V_{b}Q_{b}'\ \ \ \ \ (18)
\displaystyle  \displaystyle  = \displaystyle  0 \ \ \ \ \ (19)

On the other side, we have

\displaystyle   \int V_{2}\rho_{1}d^{3}\mathbf{r} \displaystyle  = \displaystyle  V_{a}'Q_{a}+V_{r}'q+V_{b}'Q_{b}\ \ \ \ \ (20)
\displaystyle  \displaystyle  = \displaystyle  V_{0}\left(Q_{a}+\frac{a}{r}q+\frac{a}{b}Q_{b}\right) \ \ \ \ \ (21)

Again, since the two spheres are grounded in the first configuration, we must have {Q_{a}+Q_{b}=-q}, so we get

\displaystyle   \int V_{2}\rho_{1}d^{3}\mathbf{r} \displaystyle  = \displaystyle  V_{0}\left(-q-Q_{b}+\frac{a}{r}q+\frac{a}{b}Q_{b}\right)\ \ \ \ \ (22)
\displaystyle  \displaystyle  = \displaystyle  0 \ \ \ \ \ (23)

Solving this for {Q_{b}} we get

\displaystyle   Q_{b} \displaystyle  = \displaystyle  -q\frac{(r-a)b}{(b-a)r}\ \ \ \ \ (24)
\displaystyle  Q_{a} \displaystyle  = \displaystyle  -q-Q_{b}\ \ \ \ \ (25)
\displaystyle  \displaystyle  = \displaystyle  -q\frac{(b-r)a}{(b-a)r} \ \ \ \ \ (26)

Laplace’s equation – Fourier series examples 2

References: Griffiths, David J. (2007), Introduction to Electrodynamics, 3rd Edition; Pearson Education – Chapter 3, Post 14.

Another example of the solution of Laplace’s equation in a two-dimensional problem.

We have an infinite rectangular pipe extending to infinity in both directions, lying parallel to the {z} axis. The four sides of the pipe are as follows.

At {y=0} and {y=a} the potential is held at {V=0}. At {x=0} the potential is also {V=0}, but at {x=b} it is some arbitrary function of {y}: {V=V_{0}(y)}. We can use separation of variables and Fourier series to find the potential everywhere inside the pipe.

The general solution from separation of variables gives us

\displaystyle  V(x,y)=\left(Ae^{kx}+Be^{-kx}\right)\left(C\sin ky+D\cos ky\right) \ \ \ \ \ (1)

for constants {A,B,C,D}. In this case we could choose to swap {x} and {y} in the solution, since neither {x} nor {y} goes to infinity so there’s no requirement for either term to vanish at infinity. However, with the given boundary conditions, the current choice makes things easier (though feel free to try it the other way round if you like; that is, try a solution of form {V(x,y)=\left(Ae^{ky}+Be^{-ky}\right)\left(C\sin kx+D\cos kx\right)}and see how far you get).

The boundary conditions are

\displaystyle  V=\begin{cases} 0 & y=0\\ 0 & y=a\\ 0 & x=0\\ V_{0}(y) & x=b \end{cases} \ \ \ \ \ (2)

The first condition gives

\displaystyle  D=0 \ \ \ \ \ (3)

The second gives

\displaystyle  k=\frac{n\pi}{a} \ \ \ \ \ (4)

for {n=1,2,3,\ldots}

The third gives

\displaystyle   A+B \displaystyle  = \displaystyle  0\ \ \ \ \ (5)
\displaystyle  A \displaystyle  = \displaystyle  -B \ \ \ \ \ (6)

We therefore get, for a particular choice of {n}:

\displaystyle   V_{n}(x,y) \displaystyle  = \displaystyle  AC\left(e^{n\pi x/a}-e^{-n\pi x/a}\right)\sin\frac{n\pi}{a}y\ \ \ \ \ (7)
\displaystyle  \displaystyle  = \displaystyle  2AC\sinh\frac{n\pi x}{a}\sin\frac{n\pi y}{a}\ \ \ \ \ (8)
\displaystyle  \displaystyle  \equiv \displaystyle  c_{n}\sinh\frac{n\pi x}{a}\sin\frac{n\pi y}{a} \ \ \ \ \ (9)

where in the last line we’ve merged the constant {2AC} into the single constant {c_{n}}.

As usual, we can now form the general solution as a series of {V_{n}} terms:

\displaystyle  V(x,y)=\sum_{n=1}^{\infty}c_{n}\sinh\frac{n\pi x}{a}\sin\frac{n\pi y}{a} \ \ \ \ \ (10)

The coefficients {c_{n}} can be found from the fourth boundary condition above, by multiplying both sides by {\sin\frac{m\pi y}{a}} and integrating.

\displaystyle   \int_{0}^{a}V_{0}(y)\sin\frac{m\pi y}{a}dy \displaystyle  = \displaystyle  \sum_{n=1}^{\infty}c_{n}\sinh\frac{n\pi b}{a}\int_{0}^{a}\sin\frac{m\pi y}{a}\sin\frac{n\pi y}{a}dy\ \ \ \ \ (11)
\displaystyle  \displaystyle  = \displaystyle  \frac{a}{2}c_{m}\sinh\frac{m\pi b}{a} \ \ \ \ \ (12)

Reverting to using {n} as the subscript on the coefficients, we get

\displaystyle  c_{n}=\frac{2}{a\sinh\frac{n\pi b}{a}}\int_{0}^{a}V_{0}(y)\sin\frac{n\pi y}{a}dy \ \ \ \ \ (13)

We can’t go any further without specifying {V_{0}(y)}.

In the special case where {V_{0}(y)=V_{0}=}constant, we can work out the integral on the right and get

\displaystyle  c_{n}=\begin{cases} 0 & n=2,4,6,\ldots\\ \frac{4V_{0}}{n\pi\sinh\frac{n\pi b}{a}} & n=1,3,5,\ldots \end{cases} \ \ \ \ \ (14)

In this case, the general solution is

\displaystyle  V(x,y)=\frac{4V_{0}}{\pi}\sum_{n=1,3,5\ldots}^{\infty}\frac{\sinh\frac{n\pi x}{a}\sin\frac{n\pi y}{a}}{n\sinh\frac{n\pi b}{a}} \ \ \ \ \ (15)

Laplace’s equation – separation of variables

Required math: calculus

Required physics: electrostatics

Reference: Griffiths, David J. (2007) Introduction to Electrodynamics, 3rd Edition; Prentice Hall – Sec 3.3.

Laplace’s equation governs the electric potential in regions where there is no charge. Its form is

\displaystyle  \nabla^{2}V=0 \ \ \ \ \ (1)

We’ve seen that, for a particular set of boundary conditions, solutions to Laplace’s equation are unique. That fact can be used to invent the method of images, in which a complex problem can be solved by inventing a simpler problem that has the same boundary conditions.

However, the method of images works only in a few special (and fairly contrived) situations. In the more general case, we need a way of solving Laplace’s equation directly.

A method which we have already met in quantum mechanics when solving Schrödinger’s equation is that of separation of variables. In general, the potential is a function of all three spatial coordinates: {V=V(x,y,z)}. We try to find a solution by assuming that {V} is a product of three functions, each of which is a function of only one spatial coordinate:

\displaystyle  V(x,y,z)=X(x)Y(y)Z(z) \ \ \ \ \ (2)

Substituting this into Laplace’s equation, we get

\displaystyle  YZ\frac{d^{2}X}{dx^{2}}+XZ\frac{d^{2}Y}{dy^{2}}+XY\frac{d^{2}Z}{dz^{2}}=0 \ \ \ \ \ (3)

We can divide through by {XYZ} to get

\displaystyle  \frac{1}{X}\frac{d^{2}X}{dx^{2}}+\frac{1}{Y}\frac{d^{2}Y}{dy^{2}}+\frac{1}{Z}\frac{d^{2}Z}{dz^{2}}=0 \ \ \ \ \ (4)

The key point in this equation is that each term in the sum is a function of only one of the three independent variables {x}, {y} and {z}. The fact that these variables are independent is important, for it means that the only way this equation can be satisfied is if each term in the sum is a constant. Suppose this wasn’t true; for example, suppose the first term in the sum was some function {f(x)} that actually does vary with {x}. Then we could hold {y} and {z} constant and vary {x}, causing this first term to vary. In this case we cannot satisfy the overall equation, since if we found some value of {x} for which the sum of the three terms was zero, changing {x} would change the first term but not the other two, so the overall sum would no longer be zero.

Thus we can say that

\displaystyle   \frac{1}{X}\frac{d^{2}X}{dx^{2}} \displaystyle  = \displaystyle  C_{1}\ \ \ \ \ (5)
\displaystyle  \frac{1}{Y}\frac{d^{2}Y}{dy^{2}} \displaystyle  = \displaystyle  C_{2}\ \ \ \ \ (6)
\displaystyle  \frac{1}{Z}\frac{d^{2}Z}{dz^{2}} \displaystyle  = \displaystyle  C_{3} \ \ \ \ \ (7)

where the three constants satisfy

\displaystyle  C_{1}+C_{2}+C_{3}=0 \ \ \ \ \ (8)

Equations of this form have one of two types of solution (well, three, if we consider the constant to be zero, but that’s not usually very interesting), depending on whether the constant is positive or negative. For example, if {C_{1}>0}, we can write it as {C_{1}=k^{2}} and the solution has the form

\displaystyle  X(x)=Ae^{kx}+Be^{-kx} \ \ \ \ \ (9)

for some constants {A} and {B}.

If {C_{1}<0}, we can write it as {C_{1}=-k^{2}} and the solution has the form

\displaystyle  X(x)=D\sin kx+E\cos kx \ \ \ \ \ (10)

for some constants {D} and {E}. The constants in each case must be determined from the boundary conditions. Similar solutions exist for {Y(y)} and {Z(z)}.

Now you might be wondering whether the assumption that the potential is the product of three separate functions is valid. After all, it does seem to be a rather severe restriction on the solution. It’s easiest to see whether this assumption is valid by considering a particular example.

The key consideration in any Laplace problem is the specification of the boundary conditions. As a first example, suppose we have the following setup. We have two semi-infinite conducting plates that lie parallel to the {xz} plane, with their edges lying on the {z} axis (that is, at {x=0}). One plate is at {y=0} and the other is at {y=a}. Both plates are grounded, so their potential is constant at {V=0}.

The strip between the plates at {x=0} is filled with another substance (not a conductor, so the potential can vary across it) that is insulated from the two plates, and its potential is some function {V_{0}(y)}. Solve Laplace’s equation to find the potential between the plates.

It’s important to note what the boundary conditions are here. The two plates are held at {V=0} so provide boundary conditions at {y=0} and {y=a}:

\displaystyle  V(x,0,z)=V(x,a,z)=0 \ \ \ \ \ (11)

The strip at {x=0} provides another boundary condition

\displaystyle  V(0,y,z)=V_{0}(y) \ \ \ \ \ (12)

Finally, we can impose the condition that the potential drops to zero as we get infinitely far from the strip at {x=0} so we have

\displaystyle  V(\infty,y,z)=0 \ \ \ \ \ (13)

The first thing to notice is that none of these boundary conditions depends on {z}, so we can take {Z(z)=\mathrm{constant}} so that {C_{3}=0} above. This means that the problem effectively reduces to a two-dimensional problem with the condition

\displaystyle  C_{1}+C_{2}=0 \ \ \ \ \ (14)

Now we must make a choice as to which of the constants is positive and which is negative. Suppose we chose {C_{1}=-k^{2}<0}. Then we would get

\displaystyle  X(x)=D\sin kx+E\cos kx \ \ \ \ \ (15)

Looking at the boundary conditions above, we see as {x\rightarrow\infty} we need {X(x)\rightarrow0}. But since {X(x)} is the sum of two oscillating functions, this can’t happen unless {D=E=0} or {X=0}, which isn’t a valid solution since that would mean that {V(x,y,z)=0} everywhere, and that violates the condition at {x=0}.

So we can try the other choice: {C_{1}=k^{2}>0}. This gives

\displaystyle  X(x)=Ae^{kx}+Be^{-kx} \ \ \ \ \ (16)

Now as {x\rightarrow\infty} the negative exponential term drops to zero, so we need only require that {A=0} and we get

\displaystyle  X(x)=Be^{-kx} \ \ \ \ \ (17)

From this choice, we know that {C_{2}=-C_{1}=-k^{2}} and

\displaystyle  Y(y)=D\sin ky+E\cos ky \ \ \ \ \ (18)

From the condition {V=0} when {y=0} we get

\displaystyle  E=0 \ \ \ \ \ (19)

Finally, from {V=0} when {y=a} we get

\displaystyle   D\sin ka \displaystyle  = \displaystyle  0\ \ \ \ \ (20)
\displaystyle  k \displaystyle  = \displaystyle  \frac{n\pi}{a} \ \ \ \ \ (21)

where {n} is a positive integer. It must be non-zero, since {n=0} again gives us {V=0} everywhere. It must not be negative, since that would give us a negative {k} which would give the wrong behaviour for {X(x)}.

So our solution so far is

\displaystyle  V(x,y,z)=BDe^{-n\pi x/a}\sin\left(\frac{n\pi}{a}y\right) \ \ \ \ \ (22)

At this stage, you might think we’ve solved ourself into a corner, since we haven’t used the final boundary condition which is that {V(0,y,z)=V_{0}(y)}. From our solution so far, we have

\displaystyle  V(0,y,z)=BD\sin\left(\frac{n\pi}{a}y\right) \ \ \ \ \ (23)

so unless we choose {V_{0}(y)} to be one of those sine functions, we’re stuffed. Does this mean that the separation of variables method doesn’t work here?

Not quite. The crucial point is that Laplace’s equation is linear (the derivatives occur to the first power only), so any number of separate solutions can be added together to give another solution. That is, if {V_{1}} and {V_{2}} are solutions, then so is {V_{1}+V_{2}}. The separation of variables method has actually given us an infinite number of solutions (one for each value of {n=1,2,3,\ldots}) so we can create yet more solutions by adding together any combination of these individual solutions. In particular, we can say

\displaystyle  V(x,y,z)=\sum_{n=1}^{\infty}c_{n}e^{-n\pi x/a}\sin\left(\frac{n\pi}{a}y\right) \ \ \ \ \ (24)

for some choice of coefficients {c_{n}}. (Here, we’ve simply combined the two constants {B} and {D} for each value of {n} to give the constant {c_{n}}.)

How can we find these coefficients? In general, this can be fairly tricky, but for certain boundary conditions, it turns out to be fairly straightforward. For the boundary condition we have here, {V(0,y,z)=V_{0}(y)}, things aren’t too bad. We have

\displaystyle  V(0,y,z)=V_{0}(y)=\sum_{n=1}^{\infty}c_{n}\sin\left(\frac{n\pi}{a}y\right) \ \ \ \ \ (25)

Some readers might recognize this as a Fourier series, and there is a clever technique that can be used to find the {c_{n}} in such a case. We multiply through by {\sin\left(\frac{m\pi y}{a}\right)} and integrate from 0 to {a}:

\displaystyle  \int_{0}^{a}\sin\left(\frac{m\pi y}{a}\right)V_{0}(y)dy=\sum_{n=1}^{\infty}c_{n}\int_{0}^{a}\sin\left(\frac{m\pi y}{a}\right)\sin\left(\frac{n\pi}{a}y\right)dy \ \ \ \ \ (26)

The integrals in the sum on the right are fairly straightforward, and we get

\displaystyle  \int_{0}^{a}\sin\left(\frac{m\pi y}{a}\right)\sin\left(\frac{n\pi}{a}y\right)dy=\begin{cases} \begin{array}{c} 0\;\mathrm{if}\; m\ne n\\ \frac{a}{2}\;\mathrm{if}\; m=n \end{array}\end{cases} \ \ \ \ \ (27)

That is

\displaystyle  c_{n}=\frac{2}{a}\int_{0}^{a}\sin\left(\frac{n\pi y}{a}\right)V_{0}(y)dy \ \ \ \ \ (28)

As usual for physicists, the problem of proving that a Fourier series exists and converges for any given function is left to the mathematicians, but for pretty well any function {V_{0}(y)} of physical relevance, this technique works. Although the example here has a clean solution, many other problems do not. If the boundaries are of some exotic shape, then it becomes impossible to specify things in such a way that we have a clean Fourier series to work with. As usual in such cases, we need to resort to numerical solution of Laplace’s equation, and for that we need a computer.

Method of images

Required math: calculus

Required physics: electrostatics

Reference: Griffiths, David J. (2007) Introduction to Electrodynamics, 3rd Edition; Prentice Hall – Sec 3.2, Problem 3.6.

We’ve seen that, in electrostatics, Laplace’s equation {\nabla^{2}V=0} governs the potential in those regions where there is no charge. Laplace’s equation is a special case of Poisson’s equation:

\displaystyle  \nabla^{2}V=-\frac{\rho}{\epsilon_{0}} \ \ \ \ \ (1)

where {V} is the potential and {\rho} is the volume charge density. We’ve also seen that, given a particular geometry of bounding surfaces and boundary conditions specified on those surfaces, the solution of Laplace’s equation is unique. This allows a clever trick to be used in some situations. The trick is known as the method of images. There are two standard problems that are usually given in textbooks to illustrate the method of images; we’ll have a look at the first one here.

The defining problem for the method of images is the point charge {+q} and the infinite, grounded conducting plane. To make things definite, we’ll suppose the conducting plane occupies the {xy} plane, and the point charge is at location {z=d} on the {z} axis. In this case, the boundary condition is that {V=0} on the {xy} plane (a grounded conductor is always assumed to be at zero potential). The problem here is that, since the plane is a conductor, charge is free to move around on its surface in response to the electric field from the point charge. It seems clear that this charge will have radial symmetry about the {z} axis, but beyond that, it’s hard to tell precisely what the distribution will be.

The trick is to notice that if we replace the conducting plane by another point charge {-q} at location {z=-d}. With just two point charges, we can write down the potential right away. In rectangular coordinates, we get

\displaystyle  V=\frac{q}{4\pi\epsilon_{0}}\left[\frac{1}{\sqrt{x^{2}+y^{2}+(z-d)^{2}}}-\frac{1}{\sqrt{x^{2}+y^{2}+(z+d)^{2}}}\right] \ \ \ \ \ (2)

The clever bit is to notice that in the {xy} plane (at {z=0}), {V=0}. Thus we have a potential that satisfies Laplace’s equation (at least at every point except where the two point charges are), and also satisfies the boundary condition that {V=0} on the {xy} plane. Since we know that solutions to Laplace’s equation are unique, this must also be a solution of the point charge-conducting plane problem, at least in the half space {z>0}.

From the potential, we can also find the electric field from {\mathbf{E}=-\nabla V}. We can also find the surface charge density on the plane. At the surface of a conductor, we know that the charge density is given by the normal derivative of the potential at the surface:

\displaystyle  \sigma=-\epsilon_{0}\frac{\partial V}{\partial n} \ \ \ \ \ (3)

In this case, the normal direction is in the {z} direction, so we get

\displaystyle   \sigma \displaystyle  = \displaystyle  -\epsilon_{0}\left.\frac{\partial V}{\partial z}\right|_{z=0}\ \ \ \ \ (4)
\displaystyle  \displaystyle  = \displaystyle  \frac{-qd}{2\pi\left(x^{2}+y^{2}+d^{2}\right)^{3/2}} \ \ \ \ \ (5)

We can also calculate the total induced charge {q_{i}} by integrating this over the entire plane. This is easier to do in polar coordinates, where {r^{2}=x^{2}+y^{2}} and the increment of area is {r\; dr\; d\theta}. We integrate {\sigma} to get

\displaystyle   q_{i} \displaystyle  = \displaystyle  \frac{-2\pi qd}{2\pi}\int_{0}^{\infty}\frac{rdr}{\left(r^{2}+d^{2}\right)^{3/2}}\ \ \ \ \ (6)
\displaystyle  \displaystyle  = \displaystyle  -q \ \ \ \ \ (7)

That is, the total induced charge is equal to the image charge.

Since the force is calculated from the electric field, and the field is calculated from the potential, the force between the point charge and the plane must be equal to the force between the point charge and image charge. That is

\displaystyle  F=-\frac{q^{2}}{4\pi\epsilon_{0}(4d^{2})} \ \ \ \ \ (8)

The work done to set up the configuration isn’t quite as straightforward, since we can’t calculate it directly from the two point charges. We can, however, work it out from the integral

\displaystyle  W=\int\mathbf{F}\cdot d\mathbf{l} \ \ \ \ \ (9)

We can choose a path from infinity on the {z} axis up to the location of the point charge at {z=d}. The force used in calculating the work done is the negative of the force between the charge and plane, since we’re opposing the force, so we get

\displaystyle   W \displaystyle  = \displaystyle  \int_{\infty}^{d}\frac{q^{2}dz}{4\pi\epsilon_{0}(4z^{2})}\ \ \ \ \ (10)
\displaystyle  \displaystyle  = \displaystyle  -\frac{1}{4\pi\epsilon_{0}}\frac{q^{2}}{4d} \ \ \ \ \ (11)

Notice this is half what we would get for the two point charges on their own, where {W=-\frac{1}{4\pi\epsilon_{0}}\frac{q^{2}}{2d}}. This isn’t the same problem as that of finding the work done in assembling two point charges, since as we bring in one point charge, the location of the image charge changes to preserve the zero potential in the conducting plane. Another way of looking at it is that although we do work on the point charge in bringing it in from infinity, the induced charge in the plane is distributed by moving charge around a location where the potential is constant. Since the potential is constant, the field within the plane is zero, so no work is actually done to rearrange the induced charge. This does seem to be a bit of a fudge to me, though, since if there were really no transverse fields operating within the conducting plane, the charges within the plane wouldn’t move at all, so I suspect there is some work done in the process that the theory at this level simply ignores. Comments welcome.

By using the superposition principle, we can apply the method of images to any number of point charges above the conducting plane. For example, suppose we have a grounded conducting plane in the {xy} plane, and a charge of {-2q} is placed on the {z} axis at {z=d}, and a second charge of {+q} is placed at {z=3d}. We can use the method of images combined with the superposition principle to find the force on the charge of {+q}.

The {+q} charge has an image of {-q} at {z=-3d} and the {-2q} charge has an image of {+2q} at {z=-d}.

Since the method of images allows us to find the potential from the image charges, the electric field (which is the negative gradient of the potential) must be the same in the image and original problems. Since the force is calculated from the field, it too is the same in the two problems.

Therefore, the force on {+q} is

\displaystyle   \mathbf{F} \displaystyle  = \displaystyle  \frac{q^{2}}{4\pi\epsilon_{0}}\left[-\frac{2}{4d^{2}}+\frac{2}{16d^{2}}-\frac{1}{36d^{2}}\right]\hat{\mathbf{z}}\ \ \ \ \ (12)
\displaystyle  \displaystyle  = \displaystyle  \frac{q^{2}}{4\pi\epsilon_{0}d^{2}}\left[-\frac{1}{2}+\frac{1}{8}-\frac{1}{36}\right]\hat{\mathbf{z}}\ \ \ \ \ (13)
\displaystyle  \displaystyle  = \displaystyle  -\frac{1}{4\pi\epsilon_{0}}\frac{29q^{2}}{72d^{2}}\hat{\mathbf{z}} \ \ \ \ \ (14)

Deviation from Coulomb’s law

Required math: calculus

Required physics: electrostatics

Reference: Griffiths, David J. (2007) Introduction to Electrodynamics, 3rd Edition; Prentice Hall – Problem 2.49.

An interesting alternative (and fictional) world scenario for electrostatics arises if we alter the spatial dependence of Coulomb’s law so that the force between two charges is

\displaystyle  \mathbf{F}=\frac{1}{4\pi\epsilon_{0}}\frac{q_{1}q_{2}}{|\mathbf{r-r'}|^{3}}\left(1+\frac{|\mathbf{r-r'}|}{\lambda}\right)e^{-|\mathbf{r}-\mathbf{r}'|/\lambda}\left(\mathbf{r}-\mathbf{r}'\right) \ \ \ \ \ (1)

where {\lambda} is some (very large) length. We can see that if {\lambda\rightarrow\infty} this formula reduces to the normal Coulomb force law. If we assume that the principle of superposition still holds, we can derive a few analogs to the electrostatic equations we all know and love.

First, the electric field due to a point charge {q} at position {\mathbf{r}'} is

\displaystyle  \mathbf{E}(\mathbf{r})=\frac{1}{4\pi\epsilon_{0}}\frac{q}{|\mathbf{r-r'}|^{3}}\left(1+\frac{|\mathbf{r-r'}|}{\lambda}\right)e^{-|\mathbf{r}-\mathbf{r}'|/\lambda}\left(\mathbf{r}-\mathbf{r}'\right) \ \ \ \ \ (2)

from which we can get the field due to a charge distribution

\displaystyle  \mathbf{E}(\mathbf{r})=\frac{1}{4\pi\epsilon_{0}}\int_{V}\frac{\rho(\mathbf{r}')}{|\mathbf{r-r'}|^{3}}\left(1+\frac{|\mathbf{r-r'}|}{\lambda}\right)e^{-|\mathbf{r}-\mathbf{r}'|/\lambda}\left(\mathbf{r}-\mathbf{r}'\right)d^{3}\mathbf{r}' \ \ \ \ \ (3)

Although this looks ugly, we notice that a potential function exists for this field by using the following argument. First we consider a point charge at the origin, for which

\displaystyle  \mathbf{E}(\mathbf{r})=\frac{1}{4\pi\epsilon_{0}}\frac{q}{r^{2}}\left(1+\frac{r}{\lambda}\right)e^{-r/\lambda}\hat{\mathbf{r}} \ \ \ \ \ (4)

Since the field depends only on {r} and is radial in direction, we can write, in spherical coordinates

\displaystyle  \mathbf{E}\cdot d\mathbf{l}=\frac{1}{4\pi\epsilon_{0}}\frac{q}{r^{2}}\left(1+\frac{r}{\lambda}\right)e^{-r/\lambda}dr \ \ \ \ \ (5)

Therefore, the line integral of the field between two points {\mathbf{a}} and {\mathbf{b}} is

\displaystyle   \int_{\mathbf{a}}^{\mathbf{b}}\mathbf{E}\cdot d\mathbf{l} \displaystyle  = \displaystyle  \frac{q}{4\pi\epsilon_{0}}\int_{\mathbf{a}}^{\mathbf{b}}\left(\frac{e^{-r/\lambda}}{r^{2}}+\frac{e^{-r/\lambda}}{\lambda r}\right)dr\ \ \ \ \ (6)
\displaystyle  \displaystyle  = \displaystyle  \frac{q}{4\pi\epsilon_{0}}\left(\frac{e^{-r_{a}/\lambda}}{r_{a}}-\frac{e^{-r_{b}/\lambda}}{r_{b}}\right) \ \ \ \ \ (7)

where {r_{a}} is the distance from the origin to point {\mathbf{a}} (similarly for {r_{b}}). Clearly if the path is closed, then {r_{a}=r_{b}} and the integral is zero, so by Stokes’s theorem, {\nabla\times\mathbf{E}=0}, which is the same result as in normal electrostatics. Also, the integral above must be path independent, since otherwise we could choose a closed loop where the integrals along two branches of the loop were different, and thus the integral over the whole loop was non-zero, contradicting what we’ve just said. This means that, just as with normal electrostatics, we can define a potential relative to some reference point {\mathbf{x}} as

\displaystyle  V(\mathbf{r})\equiv-\int_{\mathbf{x}}^{\mathbf{r}}\mathbf{E}\cdot d\mathbf{l} \ \ \ \ \ (8)

If we pick infinity as the reference point, then we get, for a point charge at the origin:

\displaystyle  V(\mathbf{r})=\frac{q}{4\pi\epsilon_{0}}\frac{e^{-r/\lambda}}{r} \ \ \ \ \ (9)

Also for a point charge at the origin, we can integrate the field over a sphere of radius {R} centred at the origin:

\displaystyle   \oint_{R}\mathbf{E}\cdot d\mathbf{a} \displaystyle  = \displaystyle  \frac{4\pi R^{2}}{4\pi\epsilon_{0}}\frac{q}{R^{2}}\left(1+\frac{R}{\lambda}\right)e^{-R/\lambda}\ \ \ \ \ (10)
\displaystyle  \displaystyle  = \displaystyle  \frac{q}{\epsilon_{0}}\left(1+\frac{R}{\lambda}\right)e^{-R/\lambda} \ \ \ \ \ (11)

This isn’t quite as nice as Gauss’s law because of the extra {R}-dependent factors, but if we work out the volume integral of the potential over the same sphere:

\displaystyle   \int Vd^{3}\mathbf{r} \displaystyle  = \displaystyle  \frac{q}{4\pi\epsilon_{0}}\int_{0}^{R}\frac{e^{-r/\lambda}}{r}r^{2}dr\ \ \ \ \ (12)
\displaystyle  \displaystyle  = \displaystyle  \frac{q\lambda^{2}}{\epsilon_{0}}\left(1-e^{-R/\lambda}\left(1+\frac{R}{\lambda}\right)\right) \ \ \ \ \ (13)

From these two results, we see that

\displaystyle  \oint_{R}\mathbf{E}\cdot d\mathbf{a}+\frac{1}{\lambda^{2}}\int Vd^{3}\mathbf{r}=\frac{q}{\epsilon_{0}} \ \ \ \ \ (14)

Remember that the first integral is a surface integral and the second integral is a volume integral. This is a ‘sort-of’ Gauss’s law for the fictional electrostatics.

In fact, this argument applies to any shape of enclosing volume. Suppose we take an infinitesimal patch on the sphere, defined by angle increments {d\theta} and {d\phi}. Then for that patch we have the increment in the surface integral:

\displaystyle   \Delta\left(\oint\mathbf{E}\cdot d\mathbf{a}\right) \displaystyle  = \displaystyle  \frac{1}{4\pi\epsilon_{0}}\frac{q}{R^{2}}\left(1+\frac{R}{\lambda}\right)e^{-R/\lambda}R^{2}\sin\theta d\theta d\phi\ \ \ \ \ (15)
\displaystyle  \displaystyle  = \displaystyle  \frac{q}{4\pi\epsilon_{0}}\left(1+\frac{R}{\lambda}\right)e^{-R/\lambda}\sin\theta d\theta d\phi \ \ \ \ \ (16)

For the volume integral extending from the centre of the sphere up to the patch we need integrate over {r} only to get the increment in this integral

\displaystyle   \Delta\left(\frac{1}{\lambda^{2}}\int Vd^{3}\mathbf{r}\right) \displaystyle  = \displaystyle  \frac{1}{\lambda^{2}}\frac{q}{4\pi\epsilon_{0}}\left[\int_{0}^{R}\frac{e^{-r/\lambda}}{r}r^{2}dr\right]\sin\theta d\theta d\phi\ \ \ \ \ (17)
\displaystyle  \displaystyle  = \displaystyle  \frac{q}{4\pi\epsilon_{0}}\left(1-e^{-R/\lambda}\left(1+\frac{R}{\lambda}\right)\right)\sin\theta d\theta d\phi \ \ \ \ \ (18)

The sum of these two terms comes out to

\displaystyle  \Delta\left(\oint\mathbf{E}\cdot d\mathbf{a}\right)+\Delta\left(\frac{1}{\lambda^{2}}\int Vd^{3}\mathbf{r}\right)=\frac{q}{4\pi\epsilon_{0}}\sin\theta d\theta d\phi \ \ \ \ \ (19)

That is, the dependence on the radius of the sphere cancels out for each incremental patch. This means we can consider any shape composed of incremental patches, where the radius of each patch can be different, which amounts to saying that we can consider an enclosing surface of any shape we like, and the same result holds. Further, by the principle of superposition, we can combine the results from any collection of charges so that we can write

\displaystyle  \oint_{R}\mathbf{E}\cdot d\mathbf{a}+\frac{1}{\lambda^{2}}\int Vd^{3}\mathbf{r}=\frac{Q}{\epsilon_{0}} \ \ \ \ \ (20)

where the first integral is over any enclosing surface and the second integral is over the enclosed volume, and {Q} is the total charge enclosed by the surface.

Although this result appears reasonably pretty, it does depend on the specific nature of the field equation (that is, the pair of extra factors that have been inserted). If we considered a different deviation from the classic Coulomb’s law, these results wouldn’t follow. But then, there’s no evidence that there is any deviation from Coulomb’s law anyway, so the whole exercise is just for fun.

Vacuum diode

Required math: calculus

Required physics: electrostatics

Reference: Griffiths, David J. (2007) Introduction to Electrodynamics, 3rd Edition; Prentice Hall – Problem 2.48.

A vacuum diode is an electronic component consisting of two parallel plates called the cathode, maintained at potential zero, and the anode, at potential {V_{0}}. If the cathode is heated, the excited atoms within the plate emit electrons which are accelerated across the gap between the plates. After a short while, a steady state is reached in which a constant current {I} is maintained across the gap. If we assume that the area {A} of the plates is much greater than the square of the distance {d} between them, we can neglect edge effects and assume that all quantities are functions only of {x}, the location between the plates (with {x=0} at the cathode and {x=d} at the anode). The relevant functions are the potential {V(x)}, the charge density between the plates {\rho(x)}, the speed of the electrons {v(x)} and the current {I}, which is a constant independent of {x} once a steady state has been reached. In addition, we can assume that once this steady state has been reached, the electron density at the cathode is such that the electric field is zero there (although its gradient is not).

From Gauss’s law, we get Poisson’s equation between the plates

\displaystyle   \nabla\cdot\mathbf{E} \displaystyle  = \displaystyle  \frac{\rho}{\epsilon_{0}}\ \ \ \ \ (1)
\displaystyle  \mathbf{E} \displaystyle  = \displaystyle  -\nabla V\ \ \ \ \ (2)
\displaystyle  \nabla^{2}V \displaystyle  = \displaystyle  -\frac{\rho}{\epsilon_{0}} \ \ \ \ \ (3)

Since these functions depend only on {x}, we get

\displaystyle  \frac{d^{2}V}{dx^{2}}=-\frac{\rho}{\epsilon_{0}} \ \ \ \ \ (4)

Since the force on an electron is {q\mathbf{E}} (remember {q} is negative for an electron), we can find the speed of an electron from the work done on it, which is translated into kinetic energy.

\displaystyle   \frac{1}{2}mv^{2} \displaystyle  = \displaystyle  -q\int_{0}^{x}\frac{dV}{dx'}dx'\ \ \ \ \ (5)
\displaystyle  \displaystyle  = \displaystyle  -qV(x)\ \ \ \ \ (6)
\displaystyle  v(x) \displaystyle  = \displaystyle  \sqrt{\frac{-2qV(x)}{m}} \ \ \ \ \ (7)

Next, we can find the current {I} in terms of {\rho} and {v}. The current is the rate of flow of charge. Consider a thin slice (thickness {dx}) of the space between the plates. The volume of this slice is {Adx} so the amount of charge contained in this slice is {A\rho dx}. If the charge in this slice takes time {dt} to pass a given point, then the current is

\displaystyle   I \displaystyle  = \displaystyle  A\rho\frac{dx}{dt}\ \ \ \ \ (8)
\displaystyle  \displaystyle  = \displaystyle  A\rho(x)v(x) \ \ \ \ \ (9)

so the charge density can be written as

\displaystyle   \rho(x) \displaystyle  = \displaystyle  \frac{I}{Av(x)}\ \ \ \ \ (10)
\displaystyle  \displaystyle  = \displaystyle  \frac{I}{A}\sqrt{-\frac{m}{2qV(x)}} \ \ \ \ \ (11)

Note that since the charge density arises from electrons, it is negative, so the current is also negative (current is usually defined as the flow of positive charge, so when we have a flow of electrons, the current is actually in the opposite direction to the flow of electrons).

Returning to Poisson’s equation, we can now write a differential equation for the potential.

\displaystyle   \frac{d^{2}V}{dx^{2}} \displaystyle  = \displaystyle  -\frac{\rho}{\epsilon_{0}}\ \ \ \ \ (12)
\displaystyle  \displaystyle  = \displaystyle  -\frac{I}{A\epsilon_{0}}\sqrt{-\frac{m}{2q}}V^{-1/2}\ \ \ \ \ (13)
\displaystyle  V^{1/2}V" \displaystyle  = \displaystyle  C\ \ \ \ \ (14)
\displaystyle  C \displaystyle  \equiv \displaystyle  -\frac{I}{A\epsilon_{0}}\sqrt{-\frac{m}{2q}} \ \ \ \ \ (15)

Again, note that {C} is positive and real, since both {I} and {q} are negative.

We can solve this by guessing a solution of form

\displaystyle  V=Bx^{k} \ \ \ \ \ (16)

where {B} and {k} are to be determined. Note that this form satisfies the boundary conditions {V(0)=V'(0)=0}, which we require from above (the potential at the cathode is zero, and at steady state, the electric field ({=-V'(0)}) is also zero). We just have to hope that it also provides a solution to the differential equation.

From this we get

\displaystyle   V' \displaystyle  = \displaystyle  kBx^{k-1}\ \ \ \ \ (17)
\displaystyle  V" \displaystyle  = \displaystyle  k(k-1)Bx^{k-2}\ \ \ \ \ (18)
\displaystyle  B^{1/2}x^{k/2}k(k-1)Bx^{k-2} \displaystyle  = \displaystyle  C\ \ \ \ \ (19)
\displaystyle  B^{3/2}k(k-1)x^{3k/2-2} \displaystyle  = \displaystyle  C \ \ \ \ \ (20)

Since the RHS is a constant, the LHS must have the same value for all values of {x}, so the exponent of {x} must be zero. That is,

\displaystyle   \frac{3k}{2}-2 \displaystyle  = \displaystyle  0\ \ \ \ \ (21)
\displaystyle  k \displaystyle  = \displaystyle  \frac{4}{3} \ \ \ \ \ (22)

This allows us to find {B}:

\displaystyle   \frac{4}{9}B^{3/2} \displaystyle  = \displaystyle  C\ \ \ \ \ (23)
\displaystyle  B \displaystyle  = \displaystyle  \left(\frac{9}{4}C\right)^{2/3} \ \ \ \ \ (24)

So we get

\displaystyle   V(x) \displaystyle  = \displaystyle  \left(\frac{9}{4}C\right)^{2/3}x^{4/3}\ \ \ \ \ (25)
\displaystyle  \displaystyle  = \displaystyle  \left[-\frac{9I}{4A\epsilon_{0}}\sqrt{-\frac{m}{2q}}\right]^{2/3}x^{4/3}\ \ \ \ \ (26)
\displaystyle  \displaystyle  = \displaystyle  \left(\frac{81I^{2}m}{-32A^{2}\epsilon_{0}^{2}q}\right)^{1/3}x^{4/3} \ \ \ \ \ (27)

In particular, the potential at the anode is

\displaystyle   V_{0} \displaystyle  = \displaystyle  V(d)=\left(\frac{81I^{2}m}{-32A^{2}\epsilon_{0}^{2}q}\right)^{1/3}d^{4/3}\ \ \ \ \ (28)
\displaystyle  V(x) \displaystyle  = \displaystyle  V_{0}\left(\frac{x}{d}\right)^{4/3} \ \ \ \ \ (29)

Note that this isn’t linear, as it would be if there were no charge between the plates.

From this, we can write the current in terms of the anode’s potential

\displaystyle  I=-\frac{4A\epsilon_{0}}{9d^{2}}\left(\frac{-2q}{m}\right)^{1/2}V_{0}^{3/2} \ \ \ \ \ (30)

(we’ve taken the negative root, since {I} is negative). This relation between current and potential difference in a diode is known as the Child-Langmuir law.

The charge density

\displaystyle   \rho(x) \displaystyle  = \displaystyle  \frac{I}{A}\sqrt{-\frac{m}{2qV(x)}}\ \ \ \ \ (31)
\displaystyle  \displaystyle  = \displaystyle  -\frac{4\epsilon_{0}V_{0}}{9d^{4/3}x^{2/3}} \ \ \ \ \ (32)

Finally, the speed of the electrons is

\displaystyle   v(x) \displaystyle  = \displaystyle  \sqrt{\frac{-2qV(x)}{m}}\ \ \ \ \ (33)
\displaystyle  \displaystyle  = \displaystyle  \sqrt{\frac{-2qV_{0}}{m}}\left(\frac{x}{d}\right)^{2/3} \ \ \ \ \ (34)

Potential of two charged wires

Required math: calculus, algebra

Required physics: electrostatics

Reference: Griffiths, David J. (2007) Introduction to Electrodynamics, 3rd Edition; Prentice Hall – Problem 2.47.

Two infinite wires lie in the x-y plane, parallel to the {x} axis. One carries a charge density of {+\lambda} and lies at location {y=+a} while the other carries a charge density of {-\lambda} and lies at location {y=-a}. Find the potential at a location {(x,y,z)} in rectangular coordinates.

The field due to an infinite wire can be found using Gauss’s law in cylindrical coordinates. For the wire carrying charge density {-\lambda} we have, using a Gaussian cylinder of unit length centred on the wire (see Example 3 in this post)

\displaystyle  2\pi r_{-}E_{-}=-\frac{\lambda}{\epsilon_{0}} \ \ \ \ \ (1)

where {r_{-}} is the cylindrical distance from the wire, and for the wire with charge density {+\lambda}

\displaystyle  2\pi r_{+}E_{+}=\frac{\lambda}{\epsilon_{0}} \ \ \ \ \ (2)

The potentials from the two wires add (according to the superposition principle), so we get

\displaystyle   V_{-} \displaystyle  = \displaystyle  -\int\mathbf{E}\cdot d\mathbf{l}\ \ \ \ \ (3)
\displaystyle  \displaystyle  = \displaystyle  \frac{\lambda}{2\pi\epsilon_{0}}\int_{a}^{s_{-}}\frac{dr_{-}}{r_{-}}\ \ \ \ \ (4)
\displaystyle  \displaystyle  = \displaystyle  \frac{\lambda}{2\pi\epsilon_{0}}\ln\frac{s_{-}}{a} \ \ \ \ \ (5)

where the limits on the integral arise from taking the origin as the zero point for potential. The distance {s_{-}} is the cylindrical distance from the wire at which we want the potential.

Similarly, the potential for the positive wire is

\displaystyle  V_{+}=-\frac{\lambda}{2\pi\epsilon_{0}}\ln\frac{s_{+}}{a} \ \ \ \ \ (6)

so the total potential is

\displaystyle   V \displaystyle  = \displaystyle  \frac{\lambda}{2\pi\epsilon_{0}}\left[\ln\frac{s_{-}}{a}-\ln\frac{s_{+}}{a}\right]\ \ \ \ \ (7)
\displaystyle  \displaystyle  = \displaystyle  \frac{\lambda}{2\pi\epsilon_{0}}\ln\frac{s_{-}}{s_{+}} \ \ \ \ \ (8)

In terms of {(x,y,z)} we have

\displaystyle   s_{-} \displaystyle  = \displaystyle  \sqrt{(y+a)^{2}+z^{2}}\ \ \ \ \ (9)
\displaystyle  s_{+} \displaystyle  = \displaystyle  \sqrt{(y-a)^{2}+z^{2}} \ \ \ \ \ (10)

so we get

\displaystyle   V \displaystyle  = \displaystyle  \frac{\lambda}{2\pi\epsilon_{0}}\ln\frac{\sqrt{(y+a)^{2}+z^{2}}}{\sqrt{(y-a)^{2}+z^{2}}}\ \ \ \ \ (11)
\displaystyle  \displaystyle  = \displaystyle  \frac{\lambda}{4\pi\epsilon_{0}}\ln\frac{(y+a)^{2}+z^{2}}{(y-a)^{2}+z^{2}} \ \ \ \ \ (12)

We can find the equipotential surfaces, that is, the surfaces where {V=K} for some constant {K}. First, note that if {y=0} then {V=0}, so the {xz} plane is the equipotential surface for {V=0}. To find the other surfaces, we can consider {V=K\ne0} so we have

\displaystyle   \frac{4\pi\epsilon_{0}K}{\lambda} \displaystyle  = \displaystyle  \ln\frac{(y+a)^{2}+z^{2}}{(y-a)^{2}+z^{2}}\ \ \ \ \ (13)
\displaystyle  e^{4\pi\epsilon_{0}K/\lambda} \displaystyle  = \displaystyle  \frac{(y+a)^{2}+z^{2}}{(y-a)^{2}+z^{2}} \ \ \ \ \ (14)

We can now define

\displaystyle  A\equiv e^{4\pi\epsilon_{0}K/\lambda} \ \ \ \ \ (15)

so we get

\displaystyle   A\left((y-a)^{2}+z^{2}\right) \displaystyle  = \displaystyle  (y+a)^{2}+z^{2}\ \ \ \ \ (16)
\displaystyle  A\left(y^{2}-2ay+a^{2}+z^{2}\right) \displaystyle  = \displaystyle  y^{2}+2ay+a^{2}+z^{2}\ \ \ \ \ (17)
\displaystyle  (A-1)y^{2}-(A+1)2ay+(A-1)a^{2}+(A-1)z^{2} \displaystyle  = \displaystyle  0\ \ \ \ \ (18)
\displaystyle  y^{2}-\frac{A+1}{A-1}2ay+a^{2}+z^{2} \displaystyle  = \displaystyle  0\ \ \ \ \ (19)
\displaystyle  \left(y-\frac{A+1}{A-1}a\right)^{2}+z^{2} \displaystyle  = \displaystyle  \left(\frac{A+1}{A-1}a\right)^{2}-a^{2}\ \ \ \ \ (20)
\displaystyle  \displaystyle  = \displaystyle  a^{2}\left(\frac{A^{2}+2A+1-A^{2}+2A-1}{(A-1)^{2}}\right)\ \ \ \ \ (21)
\displaystyle  \displaystyle  = \displaystyle  \frac{4a^{2}A}{(A-1)^{2}} \ \ \ \ \ (22)

The fourth line is obtained by dividing through by {(A-1)}, which requires {A\ne1}, or {K\ne0}. We saw above that {K=0} is a special case, giving the {xz} plane as a surface.

This equation has the form of a circle in the {yz} plane, with centre at {y=\frac{A+1}{A-1}a} and {z=0}, and with a radius of {R=\sqrt{\frac{4a^{2}A}{(A-1)^{2}}}}. Thus the equipotential surfaces are circular cylinders, with axes given by the lines running through the centres of the circles. Note that since {A} was defined as an exponential, it is always positive, so the argument of the square root in the equation for the radius is always positive.

We can revert back to expressions containing {K} to see the relation between the surfaces and the potentials.

The radius becomes

\displaystyle   R \displaystyle  = \displaystyle  \frac{2ae^{2\pi\epsilon_{0}K/\lambda}}{e^{4\pi\epsilon_{0}K/\lambda}-1}\ \ \ \ \ (23)
\displaystyle  \displaystyle  = \displaystyle  \frac{2a}{e^{2\pi\epsilon_{0}K/\lambda}-e^{-2\pi\epsilon_{0}K/\lambda}}\ \ \ \ \ (24)
\displaystyle  \displaystyle  = \displaystyle  \frac{a}{\sinh\left(2\pi\epsilon_{0}K/\lambda\right)} \ \ \ \ \ (25)

The axis is (with {z=0}):

\displaystyle   y \displaystyle  = \displaystyle  \frac{e^{4\pi\epsilon_{0}K/\lambda}+1}{e^{4\pi\epsilon_{0}K/\lambda}-1}a\ \ \ \ \ (26)
\displaystyle  \displaystyle  = \displaystyle  \frac{e^{2\pi\epsilon_{0}K/\lambda}+e^{-2\pi\epsilon_{0}K/\lambda}}{e^{2\pi\epsilon_{0}K/\lambda}-e^{-2\pi\epsilon_{0}K/\lambda}}a\ \ \ \ \ (27)
\displaystyle  \displaystyle  = \displaystyle  \frac{\cosh\left(2\pi\epsilon_{0}K/\lambda\right)}{\sinh\left(2\pi\epsilon_{0}K/\lambda\right)}a\ \ \ \ \ (28)
\displaystyle  \displaystyle  = \displaystyle  \frac{a}{\tanh\left(2\pi\epsilon_{0}K/\lambda\right)} \ \ \ \ \ (29)

Electric field & potential – more examples

Required math: calculus, algebra

Required physics: electrostatics

Reference: Griffiths, David J. (2007) Introduction to Electrodynamics, 3rd Edition; Prentice Hall – Problems 2.41, 2.42, 2.43, 2.44.

Here are a few more examples of the calculation of electric field and potential.

Example 1. Given a square sheet of charge with side length {a} and surface charge density {\sigma}, find the electric field at height {z} above the centre of the sheet.

From Example 3 in this post, the field at distance {z} above the centre of a square loop of charge of side length {s} and linear charge density {\lambda} is

\displaystyle  E=\frac{1}{4\pi\epsilon_{0}}\frac{32s\lambda z}{\sqrt{2s^{2}+4z^{2}}(s^{2}+4z^{2})} \ \ \ \ \ (1)

If we think of this square loop as an element of the square sheet, where the thickness of the loop is {ds/2} (so that the overall square has side length {s+ds}) then {\lambda=\sigma ds/2} and the field of the sheet is

\displaystyle  E=\frac{16\sigma z}{4\pi\epsilon_{0}}\int_{0}^{a}\frac{s}{\sqrt{2s^{2}+4z^{2}}(s^{2}+4z^{2})}ds \ \ \ \ \ (2)

The mathematical software (Maple, in this case) needs a bit of help with this integral, so we can use the substitution {u=s^{2}}; {du=2sds} to get

\displaystyle   E \displaystyle  = \displaystyle  \frac{8\sigma z}{4\pi\epsilon_{0}}\int_{0}^{a^{2}}\frac{du}{\sqrt{2u+4z^{2}}(u+4z^{2})}\ \ \ \ \ (3)
\displaystyle  \displaystyle  = \displaystyle  \frac{1}{4\pi\epsilon_{0}}\left[8\sigma\arctan\left(\frac{\sqrt{2a^{2}+4z^{2}}}{2z}\right)-2\pi\sigma\right]\ \ \ \ \ (4)
\displaystyle  \displaystyle  = \displaystyle  \frac{2\sigma}{\pi\epsilon_{0}}\arctan\sqrt{1+a^{2}/2z^{2}}-\frac{\sigma}{2\epsilon_{0}} \ \ \ \ \ (5)

The field points vertically upwards, by symmetry.

Example 2. If the electric field is given by

\displaystyle  \frac{1}{r}\left(A\hat{\mathbf{r}}+B\sin\theta\cos\phi\hat{\phi}\right) \ \ \ \ \ (6)

({A} and {B} are constants), find the charge density.

In this case, we can use the differential form of Gauss’s law: {\nabla\cdot\mathbf{E}=\rho/\epsilon_{0}}. In spherical coordinates, the divergence for a vector field with its {\theta} component equal to zero is

\displaystyle   \frac{\rho}{\epsilon_{0}} \displaystyle  = \displaystyle  \nabla\cdot\mathbf{E}\ \ \ \ \ (7)
\displaystyle  \displaystyle  = \displaystyle  \frac{1}{r^{2}}\frac{\partial}{\partial r}\left(r^{2}E_{r}\right)+\frac{1}{r\sin\theta}\frac{\partial E_{\phi}}{\partial\phi}\ \ \ \ \ (8)
\displaystyle  \displaystyle  = \displaystyle  \frac{A}{r^{2}}-\frac{B\sin\phi}{r^{2}}\ \ \ \ \ (9)
\displaystyle  \rho \displaystyle  = \displaystyle  \frac{\epsilon_{0}}{r^{2}}\left(A-B\sin\phi\right) \ \ \ \ \ (10)

Example 3. In a uniformly charged solid sphere, find the force of repulsion between two hemispheres.

To make the problem definite, we’ll consider the ‘north’ and ‘south’ hemispheres, so the problem becomes one of finding the vertical force between these two hemispheres.

From Example 2 in a previous post, the electric field inside a uniformly charged sphere with density {\rho} is

\displaystyle  E=\frac{r\rho}{3\epsilon_{0}} \ \ \ \ \ (11)

The vertical force on a volume element is therefore

\displaystyle  dF_{z}=\left(\rho d^{3}\mathbf{r}\right)\left(\frac{r\rho}{3\epsilon_{0}}\right)\cos\theta \ \ \ \ \ (12)

So the total repulsive force on a hemisphere is

\displaystyle   F_{z} \displaystyle  = \displaystyle  \frac{2\pi\rho^{2}}{3\epsilon_{0}}\int_{0}^{R}\int_{0}^{\pi/2}r^{3}\cos\theta\sin\theta d\theta dr\ \ \ \ \ (13)
\displaystyle  \displaystyle  = \displaystyle  \frac{\pi\rho^{2}}{3\epsilon_{0}}\frac{R^{4}}{4} \ \ \ \ \ (14)

Using

\displaystyle  \rho=\frac{3Q}{4\pi R^{3}} \ \ \ \ \ (15)

we get

\displaystyle  F_{z}=\frac{1}{4\pi\epsilon_{0}}\frac{3Q^{2}}{16R^{2}} \ \ \ \ \ (16)

Note that we can’t just find the repulsive force between two hemispheres of a spherical shell and then integrate over shells of sizes from zero up to the radius of the sphere because this doesn’t take into account the force between hemispheres of different sizes.

Problem 4. A northern hemispherical shell of radius {R} has a uniform surface charge density of {\sigma}. Find the potential difference between the north pole and the centre of the base of the hemisphere.

For an inverted hemispherical bowl, we can use the method of Example 5 in this previous post, except the limits on the integral are now 0 to {\pi/2}. We therefore get

\displaystyle  4\pi\epsilon_{0}V(z)=\frac{2\pi R\sigma}{z}\left[\sqrt{R^{2}+z^{2}}-\sqrt{(R-z)^{2}}\right] \ \ \ \ \ (17)

At the north pole, {z=R} so

\displaystyle  4\pi\epsilon_{0}V(R)=2\sqrt{2}\pi\sigma R \ \ \ \ \ (18)

At the centre, {z=0} so we need to take a limit. We can rewrite the formula as

\displaystyle  4\pi\epsilon_{0}V(z)=\frac{2\pi R^{2}\sigma}{z}\left[\sqrt{1+z^{2}/R^{2}}-1+z/R\right] \ \ \ \ \ (19)

The lowest order term in the expansion of the square root is

\displaystyle  \sqrt{1+z^{2}/R^{2}}=1+\frac{1}{2}\frac{z^{2}}{R^{2}} \ \ \ \ \ (20)

so the limit as {z\rightarrow0} is

\displaystyle   4\pi\epsilon_{0}V(0) \displaystyle  = \displaystyle  \lim_{z\rightarrow0}\frac{2\pi R^{2}\sigma}{z}\frac{z}{R}\ \ \ \ \ (21)
\displaystyle  \displaystyle  = \displaystyle  2\pi\sigma R \ \ \ \ \ (22)

and the potential difference is

\displaystyle   V(R)-V(0) \displaystyle  = \displaystyle  \frac{2\pi\sigma}{4\pi\epsilon_{0}}R\left(\sqrt{2}-1\right)\ \ \ \ \ (23)
\displaystyle  \displaystyle  = \displaystyle  \frac{R\sigma}{2\epsilon_{0}}\left(\sqrt{2}-1\right) \ \ \ \ \ (24)

Work and energy – point charges

Required math: vectors, calculus

Required physics: basics

Reference: Griffiths, David J. (2007) Introduction to Electrodynamics, 3rd Edition; Prentice Hall – Sec 2.4, Problem 2.31.

Since charges exert forces on each other through their electric fields, it will require the expenditure of energy, or work, to assemble any configuration of charges. Here we’ll have a look at how much energy is required to assemble, and thus how much energy is stored, in a collection of discrete charges.

The force on a charge {q} due to an electric field {\mathbf{E}} is {q\mathbf{E}}. From elementary physics, we know that the work done when an object is moved against a force is the negative (since we’re opposing the force) of (force) times (distance). In general, if the force varies as a function of position, we get

\displaystyle  W=-\oint\mathbf{F}\cdot d\mathbf{l} \ \ \ \ \ (1)

where the integral is taken over the path through which the object is moved. The minus sign is an indication that we are opposing the force {\mathbf{F}}; if we work instead with the force that we must exert to move the object, then the minus sign is omitted.

For the electric field, then, we get

\displaystyle   W \displaystyle  = \displaystyle  -\int_{\mathbf{a}}^{\mathbf{b}}\mathbf{F}\cdot d\mathbf{l}\ \ \ \ \ (2)
\displaystyle  \displaystyle  = \displaystyle  -q\int_{\mathbf{a}}^{\mathbf{b}}\mathbf{E}\cdot d\mathbf{l}\ \ \ \ \ (3)
\displaystyle  \displaystyle  = \displaystyle  q(V(\mathbf{b})-V(\mathbf{a})) \ \ \ \ \ (4)

To get the last line, we’ve used the fact that, in electrostatics, the line integral of the electric field is independent of the path; it depends only on the endpoints {\mathbf{a}} and {\mathbf{b}}. We’ve seen earlier that the line integral of the field is the negative of the potential difference between the two endpoints.

So, in other words, the potential difference between two points is the work per unit charge required to move a charge between those two points. If we’ve set the reference point for the potential at infinity (that is, {V=0} at infinity), then the work required to bring in a charge from infinity to a point {\mathbf{r}} is

\displaystyle  W=qV(\mathbf{r}) \ \ \ \ \ (5)

We can apply this formula to find out how much energy is required to assemble a collection of point charges. To place a single charge {q_{1}} at a location {\mathbf{r}_{1}} takes no work, since there are no fields to work against. Bringing in a second charge {q_{2}} requires working against the field due to {q_{1}}. The potential due to {q_{1}} is {V(\mathbf{r})=\frac{1}{4\pi\epsilon_{0}}q_{1}/|\mathbf{r}-\mathbf{r}_{1}|}, so if we want to place {q_{2}} at position {\mathbf{r}_{2}} the work required is

\displaystyle  W_{2}=\frac{1}{4\pi\epsilon_{0}}q_{2}\frac{q_{1}}{|\mathbf{r}_{2}-\mathbf{r}_{1}|} \ \ \ \ \ (6)

Before we go any further, it’s worth noting that this formula gives rise to a bit of a problem. What if we want to assemble a point charge itself? That is, suppose we want to build up a point charge of a certain size by bringing together other point charges and, in effect, gluing them together. This seems to be a valid procedure, since after all, if a charge is truly a mathematical point, we should be able to pile as many of these point charges on top of each other as we like without increasing the volume (that is, zero) occupied by the sum of all the charges.

However, if we try that, the above formula says this will require an infinite amount of work (since {\mathbf{r}_{2}=\mathbf{r}_{1}}). This is, in fact, a recognized problem in electrodynamics, and the problems don’t go away even in the quantum mechanical theory. In fact, we can’t even get out of the problem by saying that there is no such thing as a point charge, since a lot of physicists think that the electron might actually be a point charge (at least its diameter, if it’s non-zero, is so small that nobody has actually measured it yet).

With that caution in mind, let’s ignore the problem and carry on. If we assume that the existence of point charges is possible (without taxing our minds as to how they are built), we can continue to add more point charges to our distribution. Adding a third charge {q_{3}} at location {\mathbf{r}_{3}} requires work

\displaystyle   W_{3} \displaystyle  = \displaystyle  q_{3}V_{1,2}(\mathbf{r}_{3})\ \ \ \ \ (7)
\displaystyle  \displaystyle  = \displaystyle  \frac{1}{4\pi\epsilon_{0}}q_{3}\left[\frac{q_{1}}{|\mathbf{r}_{3}-\mathbf{r}_{1}|}+\frac{q_{2}}{|\mathbf{r}_{3}-\mathbf{r}_{2}|}\right] \ \ \ \ \ (8)

The total work required to assemble all three charges is then

\displaystyle   W_{1,2,3} \displaystyle  = \displaystyle  W_{1}+W_{2}+W_{3}\ \ \ \ \ (9)
\displaystyle  \displaystyle  = \displaystyle  0+\frac{1}{4\pi\epsilon_{0}}q_{2}\frac{q_{1}}{|\mathbf{r}_{2}-\mathbf{r}_{1}|}+\frac{1}{4\pi\epsilon_{0}}q_{3}\left[\frac{q_{1}}{|\mathbf{r}_{3}-\mathbf{r}_{1}|}+\frac{q_{2}}{|\mathbf{r}_{3}-\mathbf{r}_{2}|}\right] \ \ \ \ \ (10)

The general pattern should be fairly obvious by now. To assemble {n} charges, the total work is

\displaystyle  W=\frac{1}{4\pi\epsilon_{0}}\sum_{i=1}^{n}q_{i}\sum_{j=i+1}^{n}\frac{q_{j}}{|\mathbf{r}_{i}-\mathbf{r}_{j}|} \ \ \ \ \ (11)

If we extend the second sum to cover 1 through {n} (excluding {j=i}), we get

\displaystyle   W \displaystyle  = \displaystyle  \frac{1}{2}\frac{1}{4\pi\epsilon_{0}}\sum_{i=1}^{n}q_{i}\sum_{j=1,j\ne i}^{n}\frac{q_{j}}{|\mathbf{r}_{i}-\mathbf{r}_{j}|}\ \ \ \ \ (12)
\displaystyle  \displaystyle  = \displaystyle  \frac{1}{2}\sum_{i=1}^{n}q_{i}V(\mathbf{r}_{i}) \ \ \ \ \ (13)

where {V(\mathbf{r}_{i})} is the potential due to all the charges in the collection except {q_{i}}.

As an example, suppose we have arranged two charges of {-q} at the ends of a diagonal in a square, and a charge of {+q} on one of the other two corners of the square. How much work is required to bring in another charge of {+q} from infinity and place it at the remaining corner of the square?

To work this out, we need to find the potential at this corner due to the existing three charges. If the length of each side of the square is {a}, then we get

\displaystyle   W_{4} \displaystyle  = \displaystyle  qV_{1,2,3}(\mathbf{r}_{4})\ \ \ \ \ (14)
\displaystyle  \displaystyle  = \displaystyle  \frac{1}{4\pi\epsilon_{0}}q\left[\frac{-2q}{a}+\frac{q}{\sqrt{2}a}\right]\ \ \ \ \ (15)
\displaystyle  \displaystyle  = \displaystyle  \frac{1}{4\pi\epsilon_{0}}\frac{q^{2}}{a}\left[\frac{1}{\sqrt{2}}-2\right] \ \ \ \ \ (16)

Once all four charges have been assembled, the total energy stored in the collection is

\displaystyle   W \displaystyle  = \displaystyle  \frac{1}{2}\sum_{i=1}^{n}q_{i}V(\mathbf{r}_{i})\ \ \ \ \ (17)
\displaystyle  \displaystyle  = \displaystyle  \frac{1}{2}\frac{2q^{2}}{4\pi\epsilon_{0}a}\left[\frac{1}{\sqrt{2}}-2+\frac{1}{\sqrt{2}}-2\right]\ \ \ \ \ (18)
\displaystyle  \displaystyle  = \displaystyle  \frac{q^{2}}{2\pi\epsilon_{0}a}\left[\frac{1}{\sqrt{2}}-2\right] \ \ \ \ \ (19)

In the second line, the potential at the location of one of the {-q} charges is {\frac{1}{4\pi\epsilon_{0}}\left[\frac{q}{a}+\frac{q}{a}-\frac{q}{\sqrt{2}a}\right]}. Multiplying this by {-q} gives the first two terms in the square brackets. Similar logic for one of the {+q} charges gives the last two terms in the brackets. The factor of 2 in the numerator arises from the fact that there are two each of {-q} and {+q} charges.