LECTURE NOTES FOR PHYSICS 308: ELECTRICITY AND MAGNETISM, Spring 2007
TEXT: GRIFFITHS' INTRODUCTION TO ELECTRODYNAMICS
Last revised: 1/16/2007
SOME USEFUL REFERENCE STUFF:
Greek alphabet, metric prefixes, conversion factors
ASSIGNMENTS: (Subject to change: check back often.)
HW #4: Due Friday, March 2 at noon: Problem 2:39, 3:3, plus numerical spreadsheet problem, TBA.
"Dailies":
Due Tuesday, Feb. 27: Use the Method of Relaxation on an Excel spreadsheet to solve for a 5x5 grid with V=U0=100 along the bottom edge, V=-U0 along the right-hand side, and En=0 along the left-hand and top sides. Please e-mail me your Excel solution.
GO TO LECTURE
9,
10
LECTURE 9:
EXAM # 1
LECTURE 10:
METHOD OF RELAXATION (not in book: See professor's handout instead, based on a student's project in this class years ago.)
As we saw last class, the electric potential in 2D or 3D, assuming Laplace's equation, is equal to the average of the potential at points equidistant from the point of interest, that is, the points on a circle in 2D, or on a sphere in 3D. This allows us to use a very powerful approximation technique. Let's consider 2D, since it is the dimensionality of your notepad, the blackboard, and a computer screen.
Consider a boundary-value problem defined in two dimensions -- a square, for example. We can replace the continuous values of x and y coordinates inside the square with gridpoints, as long as we make the points close enough. Laplace's equation then tells us that the electric potential at a point on our grid will equal the average of the values of potential at neighboring points. For the grid I've displayed below, that means that V1,1=(V0,1+V2,1+V1,0+V1,2)/4.

To apply this technique, create a spreadsheet in Excel or create a matrix in some programming language. Place your initial guess for the potential (the initial "guess" can be all zeros: not a very creative guess.) in the matrix/spreadsheet, then apply the formula above to re-evaluate the potential in every nook and cranny of the matrix/spreadsheet. Eventually, your values of Vi,j will converge or "relax" to values approximating the function you were trying to solve for. This is called the relaxation technique.
Simple, no? I have to add a couple more details before you can actually get it to fly right. First, you need to apply boundary conditions, or else your Vi,j=0 initial guess will be your final answer as well. What if V1,0 is a boundary point, and what if the boundary condition at that point is that the normal component of the E-field is zero (a Neumann boundary condidition)? Imagine a phantom gridpoint, V1,-1, to the left of our nine gridpoints. The boundary condition I've just imposed is equivalent to saying that V1,-1=V1,1. (Think about why that is.) Consequently, averaging the four neighbors, as we did above becomes:
V1,0=(V0,0+V2,0+V1,-1+V1,1)/4
=(V0,0+V2,0+2V1,1)/4.
In other words, on the boundary cell you still average the neighbors, but you count the neighbor interior to the boundary cell twice.
There are ways of speeding up the convergence of the relaxation technique. One is to recruit "neighbors" from further afield. In other words, instead of just averaging the nearest neighbors, you include second-nearest neighbors, third-nearest neighbors, etc. There are various schemes for figuring out how to weight each set of neighbors in the averaging, but this is clearly beyond the scope of this course, and besides, this is not nearly as elegant as our much simpler approach.
A second, much-easier-to-program approach is called "over-relaxation". It makes use of the fact that relaxation converges monotonically in a single direction. In other words, successive values for V1,1 might equal 1.000V, 1.100V, 1.110V, 1.111V. Why not anticipate the direction of change in V? One way to do this is to define a quantity α, usually between 1 and 2, and changing our original equation from
V1,1=(V0,1+V2,1+V1,0+V1,2)/4
to
V1,1=(1-α)V1,1+α(V0,1+V2,1+V1,0+V1,2)/4
Notice that the (1-α) term in the last expression is necessary, in case the average of the neighbors already does equal the potential V1,1.
SECTION 3.2: METHOD OF IMAGES
There is a class of problems for which we can use a shortcut called the Method of Images. The downside of the shortcut is that it works for only a very small minority of all boundary-value problems. On the other hand, it is a great shortcut for the problems for which it does work. The other techniques we study in this chapter will be general techniques, but not this one: it works for only certain problems.
Consider a point charge near an infinite flat conductor. From the properties of conductors that we studied before, we know that the electric field at the conductor has a zero component parallel to its surface. Now imagine that we remove the conductor and place a charge of opposite sign from the one we are considering at any point directly opposite the conductor from it. (In other words, if this conductor had been a mirror, put this "image charge" where the optical image of the charge of interest would be.) It turns out that for this system of charges, the electric field at the plane where the conductor used to be will also have zero electric field component parallel to the surface.
There is an important Uniqueness Theorem for boundary-value problems that states that, if the electric potential or the "normal derivative" of a possible solution to an electrostatics problem matches the conditions at the boundary of the problem, then that solution will be valid throughout the volume of the problem, and, in fact, will be the unique solution to the problem. This saves as a ton of work, because it allows us to substitute this system with the "image charge" for the original problem.
We have already used the term "image", which reminds us of (optical) mirrors. How much further can we stretch the optical analogy? The charge and its image charge are of opposite polarity. Compare this to yourself and your "image" self, as you look in the mirror. If you're wearing a sweatshirt with writing on it, your "image" self will be wearing a sweatshirt in which the writing is reverse. Now take two mirrors and hinge them so that they come together at a 90o angle. You will now notice three images: one in front of you and one each on either side. The one in front of you will be wearing a sweatshirt with the writing easily readable; the two side images will have the writing reversed. If we compare this with the case in which we have two plane conductors that come together to form a 90o angle, we see that there will be three "image charges" behind this conductor. They will be located at the same places where the optical images are formed, and the two on either side will be of opposite charge from the original charge and the middle charge will be the same sign.
In class, we will look at hinged mirrors, drawing the appropriate analogies for the method of images. One interesting question to ask is what happens when the two mirrors are hinged at an arbitrary angle? Are there certain angles for which this method works better than others? Think about this and bring in answer with you to class.
YSBATS FOR CHAPTER 3:
Memorize:
The relaxation formula (memorize
it in visual form)
Understand:
When to apply the Method of Images
Why Legendre polynomials keep popping up
Origin and significance of the first two multipole terms
You should be able to:
Find the image charge[s], apply them to solving problems
Solve "easy" spherical BVP's
Calculate K0, K1 for collections of point charges
Calculate V, E for simple point-charge problems