Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

Chapter 5

Electricity and Magnetism

5.1 ELECTRIC FIELD LINES AND EQUIPOTENTIALS


5.1.1 The Problem
Plot the electric field lines and equipotentials for two point charges q1 and q2 when (a) q1 =
q2 = +q and (b) q1 = +2q and q2 = −q.

5.1.2 Physics of the Problem


5.1.2.1 Electric Field Lines
At position r, the electric field of a charge distribution consisting of a discrete distribution of N
point charges q1 , q2 , . . ., qN at positions r1 , r2 , . . ., rN , respectively, and a continuous distribution
of volume charge density ρ(r ) in the volume V and surface charge density σ(r ) on the surface
S that bounds V is

1  r − ri
N
E(r) = qi +
4 πε0 |r − ri |3
i=1
(5.1.1)

1 r − r   1 r − r
ρ(r )„v + σ(r )„a
4 πε0 V |r − r |3 4 πε0 S |r − r |3

where ε0 is the permittivity of free space. The electric field is a vector point function or a
vector field.
To represent the electric field graphically, we can draw vectors at points on a grid such
that at each point the direction of the vector is in the direction of the field and the length

583
584 Chapter 5 Electricity and Magnetism

of the vector is proportional to the magnitude of the field. VectorFieldPlots `, a standard


Mathematica package, contains functions for generating such field maps. When the lengths of
vectors vary over wide ranges, these plots do not provide clear representations of the fields. As
an example, let us map on the xy plane the electric field of two equal positive charges:

In[1]:= Needs@''VectorFieldPlots `''D


GradientFieldPlotB

1 1
- - , 8x, - 2, 2<, 8y, - 2, 2<F
(x + 1)2 + y2 (x - 1)2 + y2

Out[2]=

For most vectors in this picture, only the heads are visible.
Electric field lines offer a better means for visualization. These directed curves are drawn
such that at each point the tangent to the curve is in the direction of the electric field and the
number of lines per unit area perpendicular to the lines (the density of the lines) is proportional
to the magnitude of the electric field. Electric field lines have the following properties:

1. The lines must begin on positive charges and end on negative charges or at infinity. It is
possible for lines to come from infinity and terminate on negative charges.
5.1 Electric Field Lines and Equipotentials 585

2. The number of lines leaving or entering a charge is proportional to the magnitude of the
charge. If n lines are at charge q, then n = |q /q|n lines must be at charge q . The value
of the proportionality constant is chosen so that the graph shows the essential features of
the electric field.
3. Electric field lines cannot cross each other except at points of equilibrium where the electric
field vanishes.
4. The field lines near a charge are symmetrical about the charge and radially directed.

(For an introduction to electric field lines, see [FGT05]; for an advanced treatment, refer to
[Jea66].)

5.1.2.2 Equipotentials
The electric field in Equation 5.1.1 can be written as

E(r) = −∇ϕ(r) (5.1.2)

where the scalar function ϕ(r), called the electric potential, is



1  qi
N
1 ρ(r )  1 σ(r )
ϕ(r) = + „v + „a (5.1.3)
4 πε0 |r − ri | 4 πε0 V |r − r | 4 πε0 S |r − r |
i=1

Equipotentials are regions where the electric potential has constant values. For a system of
point charges, the equipotentials are surfaces (lines in two dimensions). Except at points of
equilibrium where the electric field vanishes, the equipotential surfaces do not intersect and
the electric field lines are perpendicular to these surfaces everywhere.

5.1.2.3 Electric Field Lines and Equipotentials for Two Point Charges
Let the midpoint between the two point charges be the origin of the coordinate system and
the x-axis be directed from q1 to q2 , as in Figure 5.1.1. For these charges, it is necessary to plot
only the electric field lines and equipotentials on the upper xy plane because of the rotational
symmetry about the x-axis. However, for clarity, we show the lines on the entire xy plane. To
obtain a three-dimensional picture, rotate the plot about the x-axis.
For these charges, Equation 5.1.3 gives
 
1 q1 q2
ϕ(x, y) = + (5.1.4)
4 πε0 (x + d)2 + y2 (x − d)2 + y2

If q1 and q2 , x and y, and ϕ(x, y) are expressed in units of q, d, and q/4πε0 d, respectively,
Equation 5.1.4 becomes
q1 q2
ϕ(x, y) = + (5.1.5)
(x + 1)2 + y2 (x − 1)2 + y2
586 Chapter 5 Electricity and Magnetism

y
(x, y)

d d x
q1 q2

Figure 5.1.1. A coordinate system for two point charges.

Equation 5.1.2 for the electric field implies

∂ϕ(x, y) ∂ϕ(x, y)
E(x, y) = − i− j (5.1.6)
∂x ∂y

where i and j are unit vectors in the x and y directions, respectively.

5.1.3 Solution with Mathematica


There is a simple method for generating the electric field lines of collinear charges (see
Problem 2 in Section 5.4). Here, we adopt another algorithm in order to illustrate list
manipulation and offer easy generalization for noncollinear charges.

5.1.3.1 q1 = q2 = +q

In[3]:= ClearAll@''Global `*'', SubscriptD

For the electric field lines, let us define a set of starting points symmetrically distributed
around and near q1 :
np
In[4]:= x0 @n_D : = NB - 1 + 0.2 CosB FF
12
np
y0 @n_D : = NB0.2 SinB FF
12

For each point with coordinates (x, y) on an electric field line, the coordinates of the adjacent
point a distance ds away down the line are
5.1 Electric Field Lines and Equipotentials 587

 
Ex Ey
x+ ds, y + ds
E E
A function for such mapping from one point to another is

Ex @x, yD Ey @x, yD
In[6]:= f@8x_, y_<D : = :x + 0.02 , y + 0.02 >
E@x, yD E@x, yD

where ds is set equal to 0.02, and Ex , Ey , and E are the x component, y component, and
magnitude of the electric field, respectively. The Greek letter E used here is different from the
similar-looking keyboard letter E, which represents the exponential constant in Mathematica;
the subscripts of E are the script letters x and y rather than the ordinary letters x and y; E is
a capital script letter.
The components of the electric field are given by Equation 5.1.6 in terms of the electric
potential ϕ in Equation 5.1.5:

1 1
In[7]:= j@x_, y_D: =  +
Hx + 1L2 + y 2 Hx - 1L2 + y 2
Ex @x_, y_D = - ¶x j@x, yD;

Ey @x_, y_D = - ¶y j@x, yD;

The magnitude of the electric field can be determined from its components:


In[10]:= E@x_, y_D = Ex @x, yD2 + Ey @x, yD2 ;

Starting with a point that has coordinates (x, y), a function for generating a list of
coordinates of consecutive points down an electric field line in the plotting region is

In[11]:= g@8x_, y_<D:= FixedPointListBf, 8x, y<,



SameTest ® JJ Hð2P1TL2 + Hð2P2TL2 > 3.0NÈÈHð2P1T > 0L&NF

FixedPointList@ f ,x, SameTest -> testD generates the list {x, f [x], f [f [x]], f [f [f [x]]], . . .}, stop-
ping when the function test yields True. The function test is normally used to compare, in
the form HAbs@ ð 1 - ð 2D < condition &L, two consecutive elements of the list; we use it here to
test whether the second element of this pair reaches outside the plotting region, which is a
quarter-circle located in the second quadrant and centered at the origin.
Now apply g to each element in a list of starting points to obtain a nested list of coordinates
for the electric field lines in the second quadrant:

In[12]:= g/ž Table@8x0 @nD, y0 @nD<, 8n, 1, 11, 2<D;


588 Chapter 5 Electricity and Magnetism

The coordinates in the other quadrants can easily be determined from the symmetries across
the x- and y-axes:

In[13]:= coordinates1 = Join@%, %/.8x_, y_< ® 8x, - y<,


%/.8x_, y_< ® 8 - x, y<,%/.8x_, y_< ® 8 - x, - y<D;

ListLinePlot generates the electric field lines, and ContourPlot maps the equipotentials
on the same graph:

In[14]:= SetOptions@ListLinePlot, PlotStyle ® RedD;


Show@
ListLinePlot/ž coordinates1,
ContourPlot@j@x, yD, 8x, - 2, 2<, 8y, - 2, 2<, ContourShading ® False,
PlotRange ® 81.1, 6.0<, Contours ® 16, PlotPoints ® 50,
Frame ® False, ContourStyle ® 88Blue, Dashing@80.01, 0.01<D<<D,
Graphics@8Text@''+q'', 8 - 1, 0<D, Text@''+q'', 81, 0<D<D,
AspectRatio ® Automatic,
PlotRange ® 88 - 2, 2<, 8 - 2, 2<<, Axes ® FalseD

Out[15]= 1q 1q

The solid lines directed from the charges to infinity are the electric field lines, and the dashed
closed contours are the equipotentials. The electric field lines and equipotentials are perpendic-
ular to each other everywhere. Since the equipotentials are plotted with a sequence of equally
spaced values for the potential, the electric field is strong in regions where the equipotentials
are close together, in accordance with Equation 5.1.6. The origin is a point of equilibrium
5.1 Electric Field Lines and Equipotentials 589

where the electric field vanishes. The uniqueness of this point is not obvious from the graph.
Let us plot the electric field lines and the equipotential through this point:

In[16]:= H * generate coordinates for electric field lines * L


coordinates2 = g/ž 88 - 1 + 0.2, 0<, 80, 0.01<<;

H * enter coordinates of vertices of arrowheads


for labeling the senses of electric field lines * L
arrowheads = 8880.5, 0<, 80.6, 0.1<, 80.6, - 0.1<<,
880, 1<, 80.1, 0.9<, 8 - 0.1, 0.9<<<;

Show@
ListLinePlot/@
Join@coordinates2, coordinates2/.8x_, y_< ® 8x, - y<,
coordinates2 /.8x_, y_< ® 8 - x, y<,
coordinates2 /. 8x_, y_< ® 8 - x, - y<D,
ContourPlot@j@x, yD, 8x, - 2, 2<, 8y, - 2, 2<, ContourShading ® False,
Contours ® 82<, PlotPoints ® 100, Frame ® False,
ContourStyle ® 88Blue, Dashing@80.01, 0.01<D<<D, Graphics@
Polygon /ž arrowheads ~ Join ~Harrowheads/.8x_, y_< ® 8 - x, - y<)D,
Graphics@8Text@''+q'', 8 - 1, 0<D, Text@''+q'', 81, 0<D<D,
AspectRatio ® Automatic,
PlotRange ® 88 - 2, 2<, 8 - 2, 2<<, Axes ® FalseD

Out[18]= +q +q
590 Chapter 5 Electricity and Magnetism

At the origin, an equipotential intersects itself and the two electric field lines, one from each
charge, coalesce before splitting in two lines, one going to +∞ and the other to −∞. Also, the
electric field lines are not perpendicular to the equipotential there.

5.1.3.2 q1 = +2q and q2 = −q

In[19]:= ClearAll@''Global `* '', SubscriptD

For these charges, it is not sufficient to calculate the coordinates for the electric field lines in
only one quadrant because the reflection symmetry across the y-axis no longer exists. Here, we
determine the coordinates within a semicircle centered at the origin, less two small semicircles
centered at the charges. The procedure outlined in the preceding section for mapping the
electric field can easily be modified:
np
In[20]:= x0 @n_D: = NC - 1 + 0.2 CosC GG
16
np
y0 @n_D: = NC0.2 SinC GG
16
Ex @x, yD Ey @x, yD
f@8x_, y_<D: = :x + 0.02 , y + 0.02 >
E@x, yD E@x, yD
2 1
j@x_, y_D: =  -
Hx + 1L2 + y 2 Hx - 1L2 + y 2
Ex @x_, y_D = - ¶x j@x, yD;
Ey @x_, y_D = - ¶y j@x, yD;

E@x_, y_D = Ex @x, yD2 + Ey @x, yD2 ;
g@8x_, y_<D: = FixedPointListCf, 8x, y<, SameTest ®
 
J Hð2P1TL2 + Hð2P2TL2 > 3.5ÈÈ HHð2P1TL - 1L2 + Hð2P2TL2 < 0.2 &NG

coordinates3 = g/ž Table@8x0 @nD, y0 @nD<, 8n, 1, 15, 2<D;


SetOptions@ListLinePlot, PlotStyle ® RedD;
Show@
ListLinePlot/ž
Join@coordinates3,coordinates3 /.8x_, y_< ® 8x, - y<D,
ContourPlot@j@x, yD, 8x, -3, 3<, 8y, -3, 3<, ContourShading ® False,
PlotRange ® 8 -5.0, 10<, Contours ® 24, PlotPoints ® 50,
Frame ® False, ContourStyle ® 88Blue, Dashing@80.01, 0.01<D<<D,
Graphics@8Text@''+2q'', 8 -1, 0<D, Text@''–q'', 81, 0<D<D,
AspectRatio ® Automatic,
PlotRange ® 88 -3, 3<, 8 -3, 3<<, Axes ® FalseD
5.2 Laplace’s Equation 591

Out[30]= 12q 2q

The solid lines are the electric field lines and the dashed lines are the equipotentials. Of the
16 lines emanating from q1 = +2q, half of them terminate on q2 = −q, as they should because
|q1 /q2 | = 2, and the other half go to infinity. The point of equilibrium at {5.83, 0} is not shown
because it lies outside the plotting region.

5.2 LAPLACE’S EQUATION


5.2.1 The Problem
Figure 5.2.1 shows two grounded, semi-infinite, parallel electrodes separated by a distance b.
A third electrode located at x = 0 is maintained at potential V0 . For the points between the
plates, solve Laplace’s equation analytically and numerically and plot the electric potential.

5.2.2 Physics of the Problem


The electric potential V between the plates satisfies Laplace’s equation

∇2 V = 0 (5.2.1)

with the boundary conditions

V=0 y=0 (5.2.2)


V=0 y=b (5.2.3)
V = V0 x=0 (5.2.4)
V→0 x→∞ (5.2.5)

You might also like