\documentstyle[12pt,psfig]{article}
\message{
 	Copyright, 1993, all rights reserved, Charlie Ebner (Dept.of Physics, 
 The Ohio State University, Columbus OH 43210) and Mark Jarrell (Dept.of 
 Physics, The University of Cincinnati, Cincinnati, OH 45221-0011).  This 
 material may not be reproduced for profit, modified or published in any 
 form (this includes electronic redistribution) without the prior written 
 permission of the authors listed above.	
}
\title{Boundary-value Problems in Electrostatics I}
\author{Karl Friedrich Gauss\\(1777 - 1855)}
\input{../defs}
\def\baselinestretch{1.4}
\bdo
\maketitle
\large

\tableofcontents

%\pagebreak

In this chapter we shall solve a variety of boundary value problems using
techniques which can be described as commonplace.

\section{Method of Images}

This method is useful given sufficiently simple geometries. It is closely
related to the Green's function method and can be used to find Green's
functions for these same simple geometries. We shall consider here only
conducting (equipotential) bounding surfaces which means the boundary 
conditions take the form of $\Phx=$ constant on each electrically isolated 
conducting surface.  The idea behind this method
is that the solution for the potential in a finite domain V with specified
charge density and potentials on its surface S can be the {\em same}
within V as the solution for the potential given the same charge density
inside of V but a quite different charge density elsewhere. Thus we consider
two distinct electrostatics problems. The first is the ``real'' problem in
which we are given a charge density $\rhx$ in V and some boundary conditions
on the surface S. The second is a ``fictitious problem'' in which
the charge density inside of V is the same as for the real problem and in
which there is some undetermined charge distribution elsewhere; this is to be
chosen such that the solution to the second problem satisfies the boundary
conditions specified in the first problem. Then the solution to the second
problem is also the solution to the first problem inside of V (but not
outside of V). If one has found the initially undetermined exterior charge
in the second problem, called {\em image charge}, then the potential is
found simply from Coulomb's Law,
\beq
\Phx=\inivp\frac{\rh_2(\xp)}{\xxpa};
\eeq
$\rh_2$ is the total charge density of the second problem.

\subsection{Point Charge Above a Conducting Plane}

This may sound confusing, but it is made quite clear by a simple example.
Suppose that we have a point charge $q$ located at a point $\x_0=(0,0,a)$
in Cartesian coordinates. Further, a grounded conductor occupies the half-space
$z<0$, which means that we have the Dirichlet boundary condition at $z=0$
that $\Ph(x,y,0)=0$; also, $\Phx\rightarrow 0$ as $r\rightarrow\infty$.
The first thing that we must do is determine some image charge located in
the half-space $z<0$ such that the potential of the image charge plus the real
charge (at $\x_0$) produces zero potential on the $z=0$ plane. With just a
little thought one realizes that a single image charge $-q$ located at the
point $\x_0'=(0,0,-a)$ is what is required. 

\centerline{\psfig{figure=fig1.ps,height=3.0in,width=5.0in}}

\noindent All points on the $z=0$ plane
are equidistant from the real charge and its image, and so the two charges
produce cancelling potentials at each of these points. The solution to the
problem is therefore
\beq
\Phx=q\leb\frac{1}{|\x-\x_0|}-\frac{1}{|\x-\x_0'|}\rib.
\eeq
This function satisfies the correct Poisson equation in the domain
$z>0$ and also satisfies the correct boundary conditions at $z=0$;
therefore it is the (unique) solution. It is important to realize, however,
that it is {\em not} the correct solution in the space $z<0$; here, the
real potential is zero because this domain in inside of the grounded
conductor. 

In the real system, there is some surface charge density
$\si(x,y)$ on the conductor; to determine what this is, we have only to
evaluate the normal component of the electric field at the surface of the
conductor,
\beq
\E_n(x,y,0)=-\left.\pde{\Phx}{z}\ril_{z=0}=
-\frac{2qa}{(\rh^2+a^2)^{3/2}},
\eeq
where $\rh=\sqrt{x^2+y^2}$.
The surface charge density is just this field, divided by $4\pi$, 
$E_n=\sigma/4\pi$.

From this example we can also see why this technique has the name
`method of images.' The image charge is precisely the mirror image in the
$z=0$ plane of the real charge.

As a by-product of our solution, we have also got the Dirichlet Green's
function for the semi-infinite half-space $z>0$; it is
\beq
\gxxp=\lep\xxpi-\frac{1}{|\x-\xp_i|}\rip
\eeq
where $\xp_i$ is the mirror image of $\xp$ in the $z=0$ plane. Hence we can
solve, by doing appropriate integrals, any problem in which we are given
some $\rhx$ in the domain $z>0$ and an arbitrary potential $\Ph(x,y,0)$.

\subsection{Point Charge Between Multiple Conducting Planes}

A simple extension of the problem above is one with a point charge between 
two intersecting conducting planes.  For example, consider
two grounded conducting planes that intersect at an  angle of $60^o$
forming a wedge, with point charge $Q$ placed at ($\rho,\phi,z$) within
the wedge.   

% origin is /home/wanderer/jarrell/text/courses/jackson/exams/q1/
\centerline{\psfig{figure=mt2q1f1s.ps,height=2.0in,width=4.25in}}

To solve this problem, we again use image charges to satisfy the
boundary conditions.  There are five image charges, as indicated in the
figure above.  They all share the same value of $\rho$ and $z$ as
the real charge, and their azimuthal angles are given in the table below.


\begin{center}
\begin{tabular}{||l|l||}\hline
charge	&  angle \\ \hline\hline
$-Q$	& $\frac{2\pi}{3}-\phi$ \\ \hline
$+Q$	& $\frac{2\pi}{3}+\phi$ \\ \hline
$-Q$	& $-\frac{2\pi}{3}-\phi $\\ \hline
$+Q$	& $-\frac{2\pi}{3}+\phi$ \\ \hline
$-Q$	& $-\phi$ \\ \hline\hline
\end{tabular}
\end{center}



\subsection{Point Charge in a Spherical Cavity}

It is also sometimes possible to use the image method when the boundary S
involves curved surfaces. However, just as curved mirrors produced
distorted images, so do curved surfaces make the image of a point charge
more complicated\footnote{Consider the example of the right-hand
side-view mirror of a car.  Here the mirror is concave, and images
appear to be much farther away than they actually are}. Let's do the 
simplest problem of this kind. Suppose that
we have a spherical cavity of radius $a$ inside of a conductor; within
this cavity is a point charge $q$ located a distance $r_0$ from the center
of the sphere which is also chosen as the origin of coordinates. Thus the
charge is at point $\x_0=r_0\nn_0$ where $\nn_0$ is a unit vector pointing
in the direction from the origin to the charge.

We need to find the image(s) of the charge in the spherical surface which
encloses it. The simplest possible set of images would be a single charge
$q'$; if there is such a solution, symmetry considerations tell us that the
image must be located on the line passing through the origin and going in
the direction of $\nn_0$. Let us therefore put an image charge $q'$ at point
$\x_0'=r_0'\nn_0$. 

\centerline{\psfig{figure=fig2.ps,height=2.5in,width=5.0in}}

\noindent The potential produced by this charge and the real one at
$\x_0$ is
\beq
\Phx=\frac{q}{|\x-\x_0|}+\frac{q'}{|\x-\x_0'|}.
\eeq
Now we must choose, if possible, $q'$ and $r_0'$ such that $\Phx=0$ for
$\x$ on the cavity's spherical surface, $\x=a\nn$ where the direction of
$\nn$ is arbitrary. The potential at such a point may be written as
\beq
\Ph(a\nn)=\frac{q/a}{|\nn-(r_0/a)\nn_0|}
+\frac{q'/r_0'}{|\nn_0-(a/r_0')\nn|}.
\eeq
The from the figure below, it is clear that denominators are equal 
if $r_0/a=a/r_0'$, and the numerators are equal
and opposite if $q/a=-q'/r_0'$. (The ``other'' solution, $r_0'=r_0$
and $q'=-q$ is no solution at all since then the image charge would
be within the volume $V$ and cancel the real charge.  We must have
$r_0'>1$) 

\centerline{\psfig{figure=fig3.ps,height=2.5in,width=5.0in}}

\noindent Hence, we make $\Ph$ zero on S by choosing
\beq
r_0'=a^2/r_o \hbox{~and~} q'=-q(a/r_0).
\eeq
Thus we have the solution for a point charge in a spherical cavity with an
equipotential surface:
\beq
\Phx=q\leb\frac{1}{|\x-\x_0|}-\frac{a/r_0}{|\x-(a^2/r_0^2)\x_0|}\rib;
\eeq
we have also found the Dirichlet Green's function for the interior of a
sphere of radius $a$:
\beq
\gxxp=\xxpi-\frac{a/r}{|\xp-(a^2/r^2)\x|}.
\eeq

The solution of the ``inverse'' problem which is a point charge outside of
a conducting sphere is the same, with the roles of the real charge and the
image charge reversed. The preceding equations for $\Phx$ and $\gxxp$ are
valid except that $r$, $r_0$, and $r'$ are all larger than $a$.

Let's look at a few more features of the solution for the charge inside of
the spherical cavity. First, what is $\si$, the charge density on the
surface of the cavity. From Gauss's Law, we know that the charge density is
the normal component of the electric field out of the conductor at its
surface divided by $4\pi$. This is the negative of the radial component in
spherical polar coordinates, so
\beq
\si=-\frac{E_r}{4\pi}=\frac{1}{4\pi}\pde{\Ph}{r}.
\eeq
If we define the $z$-direction to be the direction of $\nn_0$,
then the potential at an arbitrary point within the sphere is
\beq
\Phx=q\leb\frac{1}{(r^2+r_0^2-2rr_0\cos\th)^{1/2}}
-\frac{(a/r_0)}{(r^2+(a^4/r_0^2)-2r(a^2/r_0)\cos\th)^{1/2}}\rib
\eeq
where $\th$ is the usual polar angle between the $z$-axis, or direction of
$\x_0$, and the direction of $\x$, the field point.
The radial component of the electric field at $r=a$ is
\beqa
E_r=-\left.\pde{\Phx}{r}\ril_{r=a} \nonumber \\
=-q\leb-\frac12\frac{2a-2r\cos\th}{(a^2+r_0^2-2ar_0\cos\th)^{3/2}}
+\frac{ a}{r_0}\frac12\frac{2a-2(a^2/r_0)\cos\th}{(a^2+(a^4/r_0^2)-2(a^3/r_0)
\cos\th)^{3/2}}\rib \nonumber \\
=q\leb\frac{a-r_0\cos\th}{(a^2+r_0^2-2ar_0\cos\th)^{3/2}}-
\frac{r_0^2}{a^2}\frac{a-(a^2/r_0)\cos\th}{(a^2+r_0^2-2ar_0\cos\th)^{3/2}}
\rib \nonumber \\
=\frac{q}{a^2}\leb\frac{1-r_0^2/a^2}{(1+(r_0^2/a^2)-2(r_0/a)\cos\th)^{3/2}}
\rib
\eeqa
If we introduce $\ep=r_0/a$, then the surface charge density may be written
concisely as
\beq
\si=-\frac{q}{4\pi a^2}\frac{1-\ep^2}{(1+\ep^2-2\ep\cos\th)^{3/2}}.
\eeq

The {\bf{total charge on the surface}} may be found by 
integrating over $\si$. But
it may be obtained more easily by invoking Gauss's Law; if we integrate
the normal component of $\Ex$ over a closed surface which lies entirely in
conducting material and which also encloses the cavity, we know that we
will get zero, because the field in the conductor is zero. 

\centerline{\psfig{figure=fig2a.ps,height=2.5in,width=5.0in}}

\[
0=\ina\E\cdot\nn=4\pi Q= 4\pi\lep q+\ina\sigma\rip
\]
charge within this surface. What is inside is the charge $q$ in
the cavity and the surface charge on the conductor. The implication is that
the total surface charge is equal to $-q$. It is perhaps useful to actually
do the integral over the surface as a check that we have gotten the charge
density there right:
\beqa
Q_i=\ina\six \nonumber \\
=-\frac q2(1-\ep^2)\int_{-1}^1\frac{du}{(1+\ep^2-2\ep u)^{3/2}} \nonumber \\
=-\frac q2\frac{1-\ep^2}{2\ep}\leb\frac{2}{(1+\ep^2-2\ep)^{1/2}}
-\frac{2}{(1+\ep^2+2\ep)^{1/2}}\rib \nonumber \\
=-\frac q2\frac{1-\ep^2}{\ep}\lep\frac1{1-\ep}-\frac1{1+\ep}\rip=-q.
\eeqa
Notice that $|\si|$ is largest in the direction of $\nn_0$ and is
\beq
|\si_{max}|=-\frac{q}{4\pi a^2}\frac{1+\ep}{(1-\ep)^2}.
\eeq
In the opposite direction, the magnitude of the charge density is at its
minimum which is
\beq
|\si_{min}|=-\frac{q}{4\pi a^2}\frac{1-\ep}{(1+\ep)^2}.
\eeq

The {\bf{total force on the charge}} may also be computed. 
This is the negative of
the total force on the conductor. Now, we know that the force per unit area
on the surface of the conductor is $2\pi\si^2$ and is directed normal to
the conductor's surface into the cavity. Because of the rotational
invariance of the system around the direction of $\nn_0$, only the
component of the force along this direction need be computed; the other
components will average to zero when integrated over the surface. 

\centerline{\psfig{figure=fig4.ps,height=2.5in,width=7.0in}}

Hence we find
\beqa
|\F_n|=2\pi a^2\int_0^{2\pi}d\ph\int_0^{\pi}\sin\th d\th\si^2(\th)\cos\th
\nonumber \\
=\frac{4\pi^2a^2q^2}{16\pi^2a^4}(1-\ep^2)^2\int_{-1}^1\frac{udu}{(1+\ep^2-2
\ep u)^3}=\frac14\frac{q^2}{a^2}(1-\ep^2)^2\int_{-1}^1\frac{udu}{(1+\ep^2
-2\ep u)^3} \nonumber \\
=\frac14\frac{q^2}{a^2}(1-\ep^2)^2\frac{1}{4\ep^2}\leb-\frac{1}{1+\ep^2
-2\ep u}+\frac{1+\ep^2}{2(1+\ep^2-2\ep u)^2}\rib^1_{-1} \nonumber \\
=\frac14\frac{q^2}{a^2}\frac{(1-\ep^2)^2}{4\ep^2}\leb\frac{-1}{(1-\ep)^2}
+\frac{1}{(1+\ep)^2}+\frac{1+\ep^2}{2(1-\ep)^4}-\frac{1+\ep^2}{2(1+\ep)^4}
\rib \nonumber \\
=\frac{q^2}{4a^2}\frac{(1-\ep^2)^2}{4\ep^2}\leb\frac{-4\ep}{(1-\ep^2)^2}+
\frac{(1+\ep^2)(8\ep+8\ep^3)}{2(1-\ep^2)^4}\rib \nonumber \\
=\frac{q^2}{4a^2}\frac{-4\ep(1-\ep^2)^2+4\ep(1+\ep^2)^2}{4\ep^2(1-\ep^2)^2}
=\frac{q^2}{a^2}\frac{\ep}{(1-\ep^2)^2}.
\eeqa
The direction of this force is such that the charge is attracted toward the
point on the cavity wall that is closest to it.

We may also ask what is the ``force'' between the charge and its image. The
distance between them is $r_0'-r_0=a\ep(1/\ep^2-1)=a(1-\ep^2)/\ep$, and the
product of the charges is $qq'=-q^2/\ep$, so
\beq
|\F|=\frac{q^2}{a^2}\frac{\ep}{(1-\ep^2)^2}
\eeq
which is the same as the real force between the charge and the surface. One
is led to ask whether the real force on the charge is always the same as
that between the charge and its images. The answer is yes. The electric
field produced by the real surface charge at the position of the real charge is
the same as that produced by the image charge at the real charge, and so
the same force will arise in both systems. It is generally much easier to
calculate the force between the real charge and its images than the force
between the real charge and the surface charges.

\subsection{Conducting Sphere in a Uniform Applied Field}

Consider next the example of a grounded conducting sphere, which means that
$\Phx=0$ on the sphere, placed in a region of space where there was
initially a uniform electric field $\E_0=E_0\zh$ produced by some far away
fixed charges. Here, $\zh$ is a unit vector pointing in the $z$-direction. We
approach this problem by replacing it with another one which will become
equivalent to the first one in some limit. Let the sphere be centered at
the origin and let there be not a uniform applied field but rather a charge
$Q$ placed at the point $(0,0,-d)$ and another charge $-Q$ placed at the
point $(0,0,d)$ in Cartesian coordinates. 

\centerline{\psfig{figure=fig5.ps,height=3.0in,width=6.5in}}

\noindent The resulting potential
configuration is easily solved by the image method; there are images of the
charges $\pm Q$ in the sphere at $(0,0,-a^2/d)$ and at $(0,0,a^2/d)$;
they have size $-Qa/d$ and $Qa/d$, respectively. The potential produced by
these four charges is zero on the surface of the sphere. Thus we have
solved the problem of a grounded sphere in the presence of two
symmetrically located equal and opposite charges. We could equally well
think of the sphere as isolated (not electrically connected to anything)
and neutral, because the total image charge is zero.

Now we want to think about what happens if we let $Q$ become increasingly
large and at the same time move the real charges farther and farther away
from the sphere in such a way that the field they produce at the origin is
constant. This field is $\Ex=(2Q/d^2)\zh$, so if $Q$ is increased at a rate
proportional to $d^2$, the field at the origin is unaffected. As $d$
becomes very large in comparison with the radius $a$ of the sphere, not
only will the applied field at the origin have this value, but it will have
very nearly this value everywhere in the vicinity of the sphere. The
difference becomes negligible in the limit $d/a\rightarrow\infty$. Hence we
recover the configuration presented in the original problem of a sphere
placed in a uniform applied field. If we pick $E_0=2Q/d^2$, or, more
appropriately, $Q=E_0d^2/2$, we have the solution in the limit of
$d\rightarrow\infty$:
\beqa
\Phx=\lim_{d\rightarrow\infty}\leb\frac{E_0d^2/2}{(d^2+r^2+2rd\cos\th)^{1/
2}}-\frac{E_0d^2a/2d}{(a^4/d^2+r^2+2r(a^2/d)\cos\th)^{1/2}}\rib  \nonumber \\
+\lim_{d\rightarrow\infty}\leb-\frac{E_0d^2/2}{(d^2+r^2-2rd\cos\th)^{1/2}}
+\frac{E_0d^2a/2d}{(a^4/d^2+r^2-2r(a^2/d)\cos\th)^{1/2}}\rib \nonumber \\
=\lim_{d\rightarrow\infty}\leb\pm
\frac{E_{0}d/2}{(1\pm 2(r/d)\cos\th+r^2/d^2)^{1/2}}\mp
{\frac
{E_{0}da/2r}
{(1\pm(a^2/rd)\cos\th+a^4/d^2r^2)^{1/2}}}
\rib
\nonumber \\
=-E_0r\cos\th+\frac{E_0a^3}{r^2}\cos\th.
\eeqa
The first term, $-E_0r\cos\th$, is the potential of the applied constant
field, $\E_0$. The second is the potential produced by the induced surface
charge density on the sphere. This has the characteristic form of an {\em
electric dipole} field, of which we shall hear more presently. The {\em
dipole moment} $\p$ associated with any charge distribution is defined by the
equation
\beq
\p=\iniv\x\rhx;
\eeq
in the present case the dipole moment of the sphere may be found either
from the surface charge distribution or from the image charge distribution.
Taking the latter tack, we find

\beqa
\p=\iniv\x\frac{E_0da}{2}\leb-\de(z+a^2/d)\de(y)\de(x)+\de(z-a^2/d)
\de(y)\de(x)\rib \nonumber \\
=\frac{E_0da}{2}\leb(a^2/d)\zh+(a^2/d)\zh\rib=E_0a^3\zh.
\eeqa
Comparison with the expression for the potential shows that the dipolar
part of the potential may be written as
\beq
\Phx=\p\cdot\x/r^3
\eeq
The charge density on the surface of the sphere may be found in the usual
way:
\beq
4\pi\si=E_r=-\left.\pde{\Ph}{r}\ril_{r=a}=E_0\cos\th+\frac{2E_0}{a^3}a^3
\cos\th=3E_0\cos\th.
\eeq
Hence,
\beq
\si(\th)=\frac{3}{4\pi}E_0\cos\th.
\eeq

\section{Green's Function Method for the Sphere}

Next, let us do an example of the use of the Green's function method by
considering a Dirichlet potential problem inside of a sphere. The task is
to calculate the potential distribution inside of an empty 
($\rhx=0$, $x\in V$) spherical cavity
of radius $a$, given some specified potential distribution $V(\th,\ph)$ on the
surface of the sphere. We can immediately invoke the Green's function
expression
\beq
\Phx=-\frac{1}{4\pi}\inap\Phxp\pde{\gxxp}{n'},
\eeq
and we already know that,  
\beq
\gxxp=\xxpi-\frac{a/r'}{|\x-(a^2/r'^2)\xp|}
\eeq
since $\gxxp$ is the potential at $\x$ due to a unit point charge
at $\xp$ ($\x\,,\xp\in V$), and we have just solved this problem.
If we let $\ga$ be the angle between $\x$ and $\xp$,
\beq
\gxxp=\frac{1}{(r^2+r'^2-2rr'\cos\ga)^{1/2}}-\frac{a/r'}{(r^2+(a^4/r'^2)
-2r(a^2/r')\cos\ga)^{1/2}}.
\eeq
Then
\beqa
\left.\pde{\gxxp}{n'}\ril_S=\left.\pde{\gxxp}{r'}\ril_{r'=a} \nonumber \\
=-\frac12\leb\frac{2a-2r\cos\ga}{(r^2+a^2-2ra\cos\ga)^{3/2}}-
a\frac{2ar^2-2ra^2\cos\ga}{(r^2a^2+a^4-2ra^3\cos\ga)^{3/2}}\rib \nonumber
\\ =-\frac{a(1-r^2/a^2)}{(r^2+a^2-2ra\cos\ga)^{3/2}}=-\frac1{a^2}
\frac{(1-\ep^2)}{(1+\ep^2-2\ep\cos\ga)^{3/2}}
\eeqa
where $\ep=r/a$.
For simplicity, let us suppose that $\rhx=0$ inside of the sphere. Then
\beq
\Phx=\frac1{4\pi}\int_0^{2\pi}d\ph'\int_0^{\pi}\frac{\sin\th'd\th'V(\th',
\ph')(1-\ep^2)}{(1+\ep^2-2\ep\cos\ga)^{3/2}}.
\eeq
In terms of $\th,\ph$ and $\th'$ and $\ph'$,
\beq
\cos\ga=\cos\th\cos\th'+\sin\th\sin\th'\cos(\ph-\ph').
\eeq
This integral can rarely be done in closed form in terms of simple
functions; however, it is generally a simple matter to carry out the
integrals numerically. As an example, consider

\centerline{\psfig{figure=fig6.ps,height=1.5in,width=6.0in}}
\beq
V(\th,\ph)=\lec\barr{cc}
V, & 0\le\th\le\pi/2 \\
-V, & \pi/2\le\th\le\pi. \ear\right.
\eeq
Then the answer will not depend on $\ph$, so we may arbitrarily set $\ph$
equal to zero and proceed. Using $\ep\equiv r/a$, we have
\beq
\Ph(\ep,\th)=\frac{V}{4\pi}(1-\ep^2)\int_0^{2\pi}d\ph'\leb\int_0^{\pi/2}
\frac{\sin\th'd\th'}{(1+\ep^2-2\ep\cos\ga)^{3/2}}-\int_{\pi/2}^{\pi}
\frac{\sin\th'd\th'}{(1+\ep^2-2\ep\cos\ga)^{3/2}}\rib
\eeq
The integral is still difficult in the general case. For $\th=0$, it is
easier:
\beq
\Ph(\ep,0)=\frac{V}{4\pi}(1-\ep^2)2\pi\leb\int_0^1\frac{du}{
(1+\ep^2-2\ep u)^{3/2}}-\int_{-1}^0\frac{du}{(1+\ep^2-2\ep u)^{3/2}}
\rib
\eeq
These integrals are easily completed with the result that
\beq
\Ph(\ep,0)=\frac{V}{\ep}\lep1-\frac{1-\ep^2}{\sqrt{1+\ep^2}}\rip.
\eeq
An alternative approach, valid for $r/a<<1$, is to expand the integrand in
powers of $\ep$ and then to complete the integration term by term. This is
straightforward with a symbolic manipulator but tedious by hand.  Either
way, a solution in powers of $\ep$ is generated.
\beq
\Ph(\ep,\th)=\frac{3V}{2}\leb\ep\cos\th-\frac{7}{12}\ep^3\lep\frac52\cos^3\th
-\frac32\cos\th\rip+O(\ep^5)\rib.
\eeq
The alert student will recognize that the functions of $\cos\th$ that are
being generated are {\em Legendre polynomials};
\beqa
P_1(\cos\th)=\cos\th, \nonumber \\
P_3(\cos\th)=\frac52\cos^3\th-\frac32\cos\th,
\eeqa
etc.  Note that only terms which are odd in $\cth$ enter into the sum,
due to the symmetry of the boundary conditions.


\section{Orthogonal Functions and Expansions; Separation of Variables}

We turn now to a quite different, much more systematic approach to the
solution Laplace's equation
\beq
\lap\Phx=0
\eeq
as a boundary value problem. It is implemented by expanding the
solution in some domain V using complete sets of orthogonal functions 
\beq
\Ph(\eta,\xi,\nu)=\sum_{nlm} A_n(\eta)B_l(\xi)C_m(\nu)
\eeq
and
determining the coefficients in the expansion by requiring that the
solution take on the proper values on the boundaries. For simple geometries
for which Laplace's equation separates (spheres, cylinders, 
rectangular parallelepipeds) this method can always be
utilized\footnote{It can also be very tedious.}. Before launching into a
description of how one proceeds in specific cases (or geometries), let us
take a few minutes to review the terminology of orthogonal function
expansions and some basic facts.

Suppose that we have a set of functions $\unet, n=1,2,$... which are
orthogonal on the interval $a\le\et\le b$, by which we mean that
\beq
\inabet\unets\umet=0, \hbox{~if~} m\ne n;
\eeq
the superscript * denotes complex conjugation. Further, the functions 
$\unet$ are normalized on the interval,
\beq
\inabet\unets\unet=\inabet|\unet|^2=1.
\eeq
Combining these equations we have
\beq
\inabet\unets\umet=\left\{\barr{cc}
0, & n\ne m \\
1, & n=m \ear \right\}=\de_{nm}.
\eeq
The functions $\unet$ are said to be {\em orthonormal}; $\de_{nm}$ is called
a {\em Kronecker delta function}.

Next, we attempt to expand, on the interval $a\le\et\le b$,  an arbitrary
function $f(\et)$ as a linear combination of the functions $\unet$, which
are referred to as {\em basis} functions. Keeping just $N$ terms in the
expansion, one has
\beq
f(\et)\approx\sum_{n=1}^Na_n\unet.
\eeq
We need a criterion for choosing the coefficients in the expansion; a
standard criterion is to minimize the mean square error E which may be
defined as follows:
\beqa
E=\inabet|f(\et)-\sum_{n=1}^Na_n\unet|^2 \nonumber \\
=\inabet\lep f^*(\et)-\sum_{n=1}^Na_n^*\unets\rip\lep
f(\et)-\sum_{m=1}^Na_m\umet\rip.
\eeqa
The conditions for an extremum are
%\beq
%\pde{E}{Re(a_k)}=0=\pde{E}{Im(a_k)}
%\eeq
%for each coefficient $a_k$. These conditions may also be written as
%\beq
%\pde{E}{a_k}\pde{a_k}{Re(a_k)}+\pde{E}{a_k^*}\pde{a_k^*}{Re(a_k)}=0
%\eeq
%and
%\beq
%\pde{E}{a_k^*}\pde{a_k^*}{Im(a_k)}+\pde{E}{a_k}\pde{a_k}{Im(a_k)}=0,
%\eeq and these are
%\beq
%\lep\pde{E}{a_k}\rip_{a_k^*}=\lep\pde{E}{a_k^*}\rip_{a_k}=0
%\eeq
%and
%\beq
%i\lep\pde{E}{a_k}\rip_{a_k^*}-i\lep\pde{E}{a_k^*}\rip_{a_k}=0,
%\eeq
%or, by combining these relations,
\beq
\lep\pde{E}{a_k}\rip_{a_k^*}=0=\lep\pde{E}{a_k^*}\rip_{a_k}.
\eeq
where $a_k$ and $a_k^*$ have been treated as independent variables
\footnote{This is always possible, since  $a_k$ and $a_k^*$
are linearly related to ${\rm Re}(a_k)$ and ${\rm Im}(a_k)$.}  
Application of these conditions leads to
\beqa
0=\inabet\lep f^*(\et)-\sum_{n=1}^Na_n^*\unets\rip U_k(\et) \nonumber\\
=\inabet\lep f(\et)-\sum_{n=1}^N a_n \unet\rip U_k^*(\et)
\eeqa
or, making use of the orthonormality of the basis functions,
\beq
a_k=\inabet f(\et)U_k^*(\et).
\eeq
with $a_n^*$ given by the complex conjugate of this relation.
If the basis functions are orthogonal but not normalized, then one finds
\beq
a_k=\frac{\inabet f(\et)U_k^*(\et)}{\inabet|U_k(\et)|^2}.
\eeq
The set of basis functions $\unet$ is said to be complete if the mean
square error can be made arbitrarily small by keeping a sufficiently large
number of terms in the sum. Then one says that the sum converges in the
mean to the given function. If we are a bit careless, we can then write
\beqa
f(\et)=\sum_na_n\unet=\sum_n\inabet' f(\et')U_n^*(\et')\unet \nonumber \\
=\inabet'\lep\sum_n\unet U_n^*(\et')\rip f(\et'),
\eeqa
from which it is evident that
\beq
\sum_n\unet U_n^*(\et')=\de(\et-\et')
\eeq
for a complete set of functions. This equation is called the {\em
completeness} or {\em closure relation}.

We may easily generalize to a space of arbitrary dimension. For example, in
two dimensions we may have the space of $\et$ and $\ze$ with $a\le\et\le
b$, and $c\le\ze\le d$ and complete sets of orthonormal functions $\unet$
and $V_m(\ze)$
on the respective intervals. Then the arbitrary function $f(\et,\ze)$ has
the expansion
\beq
f(\et,\ze)=\sum_{n,m}A_{nm}\unet V_m(\ze),
\eeq
where
\beq
A_{nm}=\inabet\int_a^bd\ze f(\et,\ze)\unets V_m^*(\ze).
\eeq

\subsection{Fourier Series}

Returning to the one-dimensional case, suppose that the interval is infinite,
$-\infty<\et<\infty$. Then the index $n$ of
the functions $\unet$ may become a continuous index, $\unet\rightarrow
U(\et;\rh)$. A familiar example of this is the Fourier integral which is
the limit of a Fourier series when the interval on which functions are
expanded becomes infinite. Consider that we have the interval $-a/2<\et<a/
2$. Then the Fourier series may be built from the basis functions
\beq
\umet=\frac1{\sqrt{a}}e^{i2\pi m\et/a},\hbox{~~with~}m=0,\pm 1,\pm 2,...;
\eeq
these functions form a complete orthonormal set. The expansion of $f(\et)$
is
\beq
f(\et)=\frac1{\sqrt{a}}\sum_{m=-\infty}^{\infty}A_me^{i2\pi m\et/a}
\eeq
with
\beq
A_m=\frac1{\sqrt{a}}\int_{-a/2}^{a/2}d\et f(\et)e^{-i2\pi m\et/a}.
\eeq
The closure relation is
\beq
\frac1a\sum_me^{i2\pi m(\et-\et')/a}=\de(\et-\et').
\eeq
Now define $k\equiv2\pi m/a$ or $m=ka/2\pi$. Also, define $A_m=\sqrt{2\pi/a}
\,A(k)$. Note that for $a\rightarrow\infty$, $k$ takes on a set of values
that approach a continuum. Thus
\beq
f(\et)=\frac1{\sqrt{a}}\int_{-\infty}^{\infty}\frac{a}{2\pi}dke^{ik\et}
\sqrt{\frac{2\pi}{a}}A(k)=\frac1{\sqrt{2\pi}}\int dk e^{ik\et}A(k),
\eeq
while
\beq
\sqrt{\frac{2\pi}{a}}A(k)=\frac1{\sqrt{a}}\int d\et f(\et)e^{-ik\et}
\eeq
or
\beq
A(k)=\frac1{\sqrt{2\pi}}\int d\et f(\et)e^{-ik\et}
\eeq
while the closure relation now reads
\beq
\frac1{2\pi}\int dke^{ik(\et-\et')}=\de(\et-\et')\,,
\eeq
thus $e^{ik\eta}$ form a complete set (this
is also a useful representation of the Dirac delta function).

Note that we can also write this equation as
\beq
\frac1{2\pi}\int d\et e^{i\et(k-k')}=\de(k-k')
\eeq
which is the orthonormalization expression of the complete set of functions
$U(\et;k)$ on the infinite $\et$ interval. These functions are
\beq
U(\et;k)=\frac1{\sqrt{2\pi}}e^{i\et k}.
\eeq

\subsection{Separation of Variables}

We are going to attempt to find solutions to boundary value problems in
three dimensions by writing the solution as a sum of products of three
one-dimensional functions,
\beq
\Ph(\et,\ze,\nu)=\sum_{n,l,m}A_{nlm}E_n(\et)Z_l(\ze)N_m(\nu).
\eeq
We will do this for the particular cases of rectangular, cylindrical, and
spherical polar coordinates. Now, if the functions $E$, $Z$, and $N$ are
members of complete sets on appropriate intervals, we can certainly write
any three-dimensional function as a linear combination of such products.
Because we are looking for special three-dimensional functions, however,
that is, solutions to the Laplace equation, we do not actually have to
employ complete sets of functions of all three variables. To determine just
what we do have to use, we will try to demand that each term in the sum is
itself a solution to the Laplace equation, which is more restrictive than
just requiring the sum to be a solution. It turns out that this is possible
in the Cartesian, cylindrical, and spherical coordinate systems and also in
eight more (see Landau and Lifshitz for more information)! The simplification 
that takes place when one makes this {\em
separation of variables} is that each of the functions of a single
variables has to be a solution of a relatively simple second order ordinary
differential equation rather than a partial differential equation.

\subsection{Rectangular Coordinates}

Let us look for a solution of Laplace's equation in the form of a product
of functions of $x$, $y$, and $z$,
\beq
\Ph(\x)=X(x)Y(y)Z(z).
\eeq
Substitution into Laplace's equation $\lap\phx=0$ yields
\beq
Y(y)Z(z)\sde{X(x)}{x}+X(x)Z(z)\sde{Y(y)}{y}+X(x)Y(y)\sde{Z(z)}{z}=0.
\eeq
Dividing by $\Ph$ we find
\beq
\frac1X\sde{X}{x}+\frac1Y\sde{Y}{y}+\frac1Z\sde{Z}{z}=0.
\eeq
Each term on the LHS of this equation depends on a single variable;
consequently, since the equation must remain true when any one variable is
varied with the others held fixed, it must be the case that each term is a
constant, independent of the variable. Since the three terms add to zero,
at least one must be a positive constant, and at least one must be a
negative constant. Let us suppose that two are negative, and one, positive.
Thus we have
\beq
\frac1X\sde{X}{x}=-\al^2;\;\frac1Y\sde{Y}{y}=-\be^2;\;\frac1Z\sde{Z}{z}=
\ga^2=\al^2+\be^2.
\eeq
For negative constants, the solutions are oscillatory; when they are
positive, solutions are exponential:
\beq
Z(z)\sim e^{\pm\ga z};\;X(x)\sim e^{\pm i\al x};\;Y(y)\sim e^{\pm i\be y},
\eeq
or, equivalently,
\beqa
X(x)\sim \sin(\al x) \hbox{ or }\cos(\al x) \nonumber \\
Y(y)\sim \sin(\be y) \hbox{ or }\cos(\be y) \nonumber \\
Z(z)\sim \sinh(\ga z) \hbox{ or }\cosh(\ga z) .
\eeqa
Now, $\al$ and $\be$ can be any real constants whatsoever, which means that
by taking linear combinations of solutions of the kind outlined above, we
can construct {\bf any} function of $x$ and $y$ at some particular value
of $z$. 

This is just what we need to solve boundary value problems with
planar surfaces. For example, suppose that we need to solve the Laplace
equation inside of a rectangular parallelepiped of edge lengths $a$, $b$,
and $c$ with the potential given on the surface. We can find a solution by
considering six distinct problems and superposing the six solutions to
them. Each of these six problems has on one face (a different one in each
problem) of the box the same potential as that given in the original problem
while on the other five faces the potential is zero. Summing the six
solutions gives a potential which has the same values on each face of the
box as given in the original problem. Let's see how to solve one of these
six problems; the others follow trivially. For this problem we may suppose
that the faces of the box are given by the planes $z=0,c$, $x=0,a$, and
$y=0,b$. Let the potential on the face $z=c$ be $\Ph(x,y,c)=V(x,y)$ while
$\Ph(\x)\equiv0$ on the other five faces.

\centerline{\psfig{figure=fig7.ps,height=2.75in,width=6.0in}}
\beq
\Ph(x,y,c)=V(x,y)\;\;\;\Ph(\x)\equiv0\;{\rm{on\; the\; other\; faces}}
\eeq
\noindent In order to satisfy the B.C., we must choose the constants
$\al$, $\be$ and $\ga$ so that we have a complete set of functions
\footnote{As we have seen, the sinusoidal function form a complete set,
the hyperbolic functions do not}
on the face with the non-trivial boundary condition.
Our expansion for the
potential now takes the form
\beq
\Ph(x,y,z)=\sum_{\al,\be}A_{\al\be}\sinh(\ga_{\al\be}z)(\sin\al x\sin\be y)
\eeq
where $\al$ and $\be$ are such that $\al a=n\pi$ and$\be b=m\pi$ which
makes the basis functions of $x$ and $y$ orthogonal and complete on the domain
of the constant-$z$ face of the box. Thus,
\beq
\Ph(x,y,z)=\sum_{n,m=1}^{\infty}A_{nm}\sinh(\ga_{nm}z)\sin\lep\frac{n\pi}
{a}x\rip\sin\lep\frac{m\pi}{b}y\rip
\eeq
where
\beq
\ga_{nm}=\pi\leb\lep\frac{n}{a}\rip^2+\lep\frac{m}{b}\rip^2\rib^{1/2}.
\eeq
Notice that only the sine functions are used and also only the hyperbolic
sine. The reason for the latter is that the potential must vanish at $z=0$;
this condition rules out the use of the hyperbolic cosine which is not zero
at zero argument. The cosine could be used but is not needed as the sine
functions with arguments introduced above are complete on the appropriate
intervals.

The coefficients in the sum for the solution are determined by looking at
the potential on the top face of the box:
\beq
V(x,y)=\sum_{nm}A_{nm}\sinh(\ga_{nm}c)\sin(n\pi x/a)\sin(m\pi y/b).
\eeq
Multiply by $\sin(l\pi x/a)\sin(p\pi y/b)$ and integrate\footnote{Here
we use the relation $\int_0^a\sin^2(n\pi x/a)=a/2$} over the face of
the box:
\beq
\int_0^adx\int_0^bdyV(x,y)\sin(l\pi x/a)\sin(p\pi y/b)=A_{lp}\sinh(
\ga_{lp}c)\frac14ab,
\eeq
or
\beq
A_{lp}=\frac4{ab\sinh(\ga_{lp}c)}\int_0^adx\int_0^bdyV(x,y)\sin(l\pi x/a)
\sin(p\pi y/b)
\eeq
In this manner one can do any Dirichlet problem on a rectangular
parallelepiped in the form of an infinite series.

\subsection{Fields and Potentials on Edges}

What we will never find very accurately from the expansion devised in the
preceding section is the behavior of the potential and field close to an
edge of the box where many terms must be kept to have decent convergence
of the series. However, in these regions we may devise a quite different
approximation which converges well very close to the edge. Suppose then
that one is very close to such an edge where the boundary may be considered
to consist of two infinite intersecting planes. Let the edge be coincident
with the z-axis with the planes lying at constant values of th azimuthal
angle $\ph$. 

\centerline{\psfig{figure=fig8.ps,height=2.75in,width=6.0in}}

\noindent The solution will then depend only on $\ph$ and $\rh$ where
$\rh=\sqrt{x^2+y^2}$. In these variables, the Laplace equation is
\beq
\frac1{\rh}\pde{}{\rh}\lep\rh\pde{\Ph}{\rh}\rip+\frac1{\rh^2}\spd{\Ph}{\ph}=0.
\eeq
Once again we use separation of variables, writing
\beq
\Ph(\rh,\ph)=R(\rh)\Ps(\ph).
\eeq
Substitution into the Laplace equation and division by $\Ph$ itself yields
the equation
\beq
\frac1{\rh R(\rh)}\der{}{\rh}\lep\rh\der{R(\rh)}{\rh}\rip+\frac1{\rh^2\Ps(\ph)}
\sde{\Ps(\ph)}{\ph}=0.
\eeq
If we multiply by $\rh^2$, we find that the first term on the LHS depends
only on $\rh$ and the second one depends only on $\ph$; consequently they
must be equal and opposite constants,
\beq
\frac{\rh}{R}\der{}{\rh}\lep\rh\der{R}{\rh}\rip=C,\hbox{ $C=$ constant},
\eeq
and
\beq
\frac1\Ps\sde{\Ps}{\ph}=-C.
\eeq
What must be the sign of C? If $C>0$, the $\Ps(\ph)$ is an oscillatory
function while $R(\rh)$ is not. But if $C<0$, then the converse is true. If
our boundary value problem has $\Ph$ equal to some constant on the edges of a
wedge with the surfaces of the wedge at $\ph=0$ and $\ph=\be$, then we will
need to have an oscillatory $\Ps(\ph)$. Hence choose $C\ge 0$. Write $C\equiv
\nu^2$, where $\nu$ is real. There is the special case when
$\nu=0$, for which $\Ps(\ph)=a+b\ph$ and $R(\nu)=c+d\ln\rh$.  When $C> 0$,
then
\beq
\Ps(\ph)=A\sin(\nu\ph)+B\cos(\nu\ph)=A'\sin(\nu\ph+\ph_0),
\eeq
and $R(\rh)$ is the general solution of \eq{105}. Try $R=a\rh^p$;
substitution into the differential equation gives
\beq
ap^2\rh^{p-1}-a\nu^2\rh^{p-1}=0
\eeq
from which we find $p=\pm\nu$. The most general solution is
\beq
R(\rh)=a\rh^\nu+b\rh^{-\nu},
\eeq
and so a single term in the expansion for $\Ph$ is
\beq
\Ph(\rh,\ph)=(A\rh^\nu+B\rh^{-\nu})\sin(\nu\ph+\ph_0)
\eeq
where $A,\;B$, and $\ph_0$ are constants to be determined by some boundary
conditions.

There is also still the question of allowed values of $\nu$. Let us specify
that on the sides of the wedge, $\Ph(\rh,0)=\Ph(\rh,\be)=V_0$. To match
this, we use $\nu=0$ with $b=d=0$ and $ac=V_0$. Then the boundary condition
is matched on the edges of the wedge. Further, we must pick $\nu\ne0$ (and
$\ph_0$) so that
\beq
\sin(0+\ph_0)=0 \nonumber
\eeq
and
\beq
\sin(\nu\be+\ph_0)=0;
\eeq
we can easily see that $\ph_0=0$ and $\nu\be=n\pi,\;n=1,2,...$ will work.
Now add up solutions of the kind generated, that is, solutions with
different values of $n$ and undetermined coefficients, to find the most
general solution (of this kind),
\beq
\Ph(\rh,\ph)=V_0+\sum_{n=1}^\infty\lep A_n\rh^{n\pi/\be}+B_n\rh^{-n\pi/\be}
\rip\sin\lep\frac{n\pi\ph}{\be}\rip.
\eeq
where the constant term $V_0$ corresponds to $\nu=0$.

If the physical region includes the origin ($\rh\rightarrow0$), then we
cannot have any negative powers of $\rh$ because they will lead to
singularities in $\Ph$ at the origin; physically, we know that that won't
happen. Hence all $B_n$ are zero (And that is also why we didn't keep the $
\ln\rh$ part of the $\nu=0$ solution). Thus we have
\beq
\Ph(\rh,\ph)=V_0+\sum_{n=1}^\infty A_n\rh^{n\pi/\be}\sin(n\pi\ph/\be).
\eeq
The remaining coefficients are determined by boundary conditions on a
surface that closes the system; for example a surface specified by
$\rh=\rh_0$ for $0\le\ph\le\be$. 

Without concerning ourselves with the
details of fitting the expansion to such a function, we can still see what
are the interesting qualitative features of the potential and fields for
$\rh$ very small, which means $\rh<<\rh_0$. There the potential will be
dominated by the term proportional to the smallest power of $\rh$, which is
the $n=1$ term,
\beq
\Ph(\rh,\ph)\approx V_0+A_1\rh^{\pi/\be}\sin(\pi\ph/\be),
\hbox{ at small $\rh$,}
\eeq
assuming that $A_1\ne0$.
Taking appropriate derivatives of the potential, we may find the components
of the electric field,
\beq
E_\rh=-\pde\Ph\rh=-\frac{\pi A_1}{\be}\rh^{\pi/\be-1}\sin(\pi\ph/\be)
\eeq
and
\beq
E_\ph=-\frac1\rh\pde\Ph\ph=-\frac{\pi A_1}\be\rh^{\pi/\be-1}\cos(\pi\ph/\be).
\eeq
Also, the charge density on the conductor close to the origin is found from
\beq
\si(\rh,0)=\frac{E_\ph(\rh,0)}{4\pi}=-\frac{A_1}{4\be}\rh^{\pi/\be-1}
\eeq
and
\beq
\si(\rh,\be)=-\frac{E_\ph(\rh,\be}{4\pi}=-\frac{A_1}{4\be}\rh^{\pi/\be-1}.
\eeq
Depending on whether $\be<\pi$ or $\be>\pi$, one gets dramatically
different fields and charge densities as $\rh\rightarrow0$. For $\be<\pi$,
$\pi/\be-1>0$ and fields and $\si$ vanish as $\rh$ goes to 0. But for $\be
>\pi$, $\pi/\be-1<0$, and consequently they become very large. 

Of course, no
real conductor has a perfectly sharp point; there is some rounding
on a scale of length $\de$, leading to a maximum field of order
\beq
E_{max}\approx\frac{A_1}{4\be}\de^{\pi/\be-1}\sim\frac{V_0}{R}
\lep\frac{R}{\de}\rip^{1-\pi/\be}\sim E_0\lep\frac{R}{\de}\rip^{1-\pi/\be},
\eeq
where $R$ is the overall size of the system, that is, the distance from the
point or wedge to ground. For a potential difference of, say $10^4\;statv$,
$R=1\;km$, $\de=1\;mm$, and $\be=2\pi$, we have $E_{max}\sim 30\;statv/cm$ or
$9000\;v/cm$.

\section{Examples}
\subsection{Two-dimensional box with Neumann boundaries}

Consider the following 2--dimensional boundary value problem.

\centerline{\psfig{figure=js2_1fig.ps,height=2.5in,width=7.0in}}

\noindent Find $\Ph(\x)$ inside the rectangle (Note that due to the
Neumann B.C. $\Ph(\x)$ can only be determined up to an arbitrary additive
constant).  Show that we must have $\int_0^a dx f(x) =0$.

	This problem is very similar to that discussed in Sec.~III.C.
The difference is that this is in 2--d instead of 3--d, and has
Neumann rather than Dirichlet B.C.  Thus, we search for solutions of
\[
\lap\Ph(x,y)=0
\]
in the form
\[
\Ph(\x)=X(x)Y(y)
\]
subject to the boundary conditions indicated above.  
Combining these equations yields
\[
\frac1X\sde{X}{x}+\frac1Y\sde{Y}{y}=0.
\]

	As in class, for arbitrary $x$ and $y$, the only way to satisfy
this equation is for both parts to be constant.  Thus
\[
\frac1X\sde{X}{x}=-\alpha^2;\;\frac1Y\sde{Y}{y}=\al^2.
\]
We choose this sign convention for the constant $\al$ so that
we can easily satisfy the B.C..  Thus the solutions take the form
\[
X(x)=A\sin(\al x) + B\cos(\al x);\; 
Y(y)=C\sinh\{\al(b-y)\}+ D\cosh\{\al(b-y)\}
\]
Here we choose the form $\sinh\{\al(b-y)\}$
rather than $\sinh\{\al y\}$ with an eye toward satisfying the B.C. easily.

	We can eliminate some of these coefficients by imposing the simple
B.C. 
\[
\left.\der{X}{x}\right|_{x=0} = \left.\der{X}{x}\right|_{x=a} =0
\]
Clearly, to satisfy the first of these $A=0$, and to satisfy
the second $\al =n\pi/a$.  Thus
\[
X_n(x)=\cos(n\pi x/a)
\]
Similarly, $\left.\der{Y}{y}\right|_{y=b} =0 $ indicates that $C=0$.  Thus
\[
\Ph(x,y)=\sum_{n=0}^{\infty} a_n  
\cos(n\pi x/a) \cosh\left(\frac{n\pi}{a} (b-y)\right)
\]

The set $\{a_n\}$ are determined by the remaining B.C.
\[
\pde{\Ph}{n}=-\left.\pde{\Ph}{y}\right|_{y=0}=f(x)
\]
\[
f(x)= \sum_n \{ \frac{n\pi}{a} \sinh)n\pi b/a) a_n \} cos(n\pi x/a)
\]
or if we identify $b_n= \frac{n\pi}{a} \sinh(n\pi b/a) a_n $
\[
f(x)= \sum_n b_n cos(n\pi x/a)
\]

	Now if $f(x)$ is a regular function defined on the interval
$0<x<a$, then it may be represented as a cosine sum over all
terms.  However, the sum above is incomplete since it does not
include the $b_0$ term.  Thus we can only solve the problem if
$b_0=0$, or equivalently, $\int dx f(x) \propto b_0=0$.  Physically,
what does this mean?  (Hint, consider Gauss' law in 2--d, and the 
fact that the rectangle encloses no charge since $\lap \Ph=0$).

	The remaining  $b_n$ may be determined in the usual way.
\[
\int_0^a dx f(x) cos(l\pi x/a) = \sum_{n=1}^{\infty} b_n
\int_0^a dx \cos(n\pi x/a) \cos(l\pi x/a)
\]
then as
\[
\int_0^a cos(n\pi x/a) cos(l\pi x/a) =\delta_{l,n}
\]
and using the relation between $a_l$ and $b_l$ above
we get 
\[ 
a_l =\frac{2}{l\pi \sinh(l\pi b/a)} 
\int_0^a dx f(x) \cos(l\pi x/a)
\]
which define $\Ph$ through
\[
\Ph(x,y)=\Ph_o+\sum_{n=1}^{\infty} a_n  
\cos(n\pi x/a) \cosh\left(\frac{n\pi}{a} (b-y)\right).
\]

	Now suppose that $f(x)$ is defined as $f(x)= E_o(1-2 x/a)$.  
\[ 
a_l =\frac{2}{l\pi \sinh(l\pi b/a)} 
\int_0^a dx E_o(1-2 x/a) \cos(l\pi x/a)
\]
or, after integrating,
\[ 
a_l =\frac{2}{l\pi \sinh(l\pi b/a)} 
\frac{2a}{l^2\pi^2} \left( 1-(-1)^l\right)
\]


\subsection{Numerical Solution of Laplace's Equation}

	As we discussed earlier, it is possible to solve Laplace's equation
through separation of variables and special functions only for a
restricted set of problems with separable geometries.  When this is not
the case, i.e.\ when the bounding surfaces, or charge distribution (when solving
Poisson's equation) involve complex geometries, we generally solve
for the potential numerically.  

	To illustrate how this is done, consider the following (exactly
solvable) problem of a two-dimensional box with Dirichlet boundary
conditions.

\centerline{\psfig{figure=fig9.ps,height=2.0in,width=4.0in}}

\noindent In order to solve Laplace's equation numerically with these 
boundary conditions, we will introduce a regular grid of width $\delta$
and dimensions $N\times M$ in the xy plane.

\centerline{\psfig{figure=fig10.ps,height=2.0in,width=4.0in}}

\noindent It is then a simple matter to approximately solve
\beqa
\lap\Phx &    =    & \spd{\Phx}{x}+ \spd{\Phx}{y}=0\\
	 & \approx &
\frac{\Ph(x+\de,y)-2\Ph(x,y)+\Ph(x-\de,y)}{\de^2} +
\frac{\Ph(x,y+\de)-2\Ph(x,y)+\Ph(x,y-\de)}{\de^2} \nonumber
\eeqa
or, equivalently,
\beq
\Ph(x+\de,y)+\Ph(x-\de,y)+\Ph(x,y+\de)+\Ph(x,y-\de)-4\Ph(x,y)=0
\eeq
Since Laplace's equation is now written as a finite difference equation
of the potentials, it is a simple manner to enforce the boundary conditions
by replacing each occurrence of $\Phx$ above, when $\x$ is the location
of a boundary, by the appropriate boundary value.  For example, consider
a point in the upper left-hand quarter of the rectangle.  This is illustrated
below, where the potential at each internal grid point is denoted
by $\Ph_n$ where integers $n$ index each grid point.  

\centerline{\psfig{figure=fig11.ps,height=2.0in,width=3.0in}}

\noindent At the point $n=1$, the finite-difference form of Laplace's 
equation is
\[
\Ph_2+V_4+V_1+\Ph_{26}-4\Ph_1=0
\]
or
\[
\Ph_2+\Ph_{26}-4\Ph_1=-V_4-V_1\,.
\]
In fact, we obtain one such linear equation for each grid point.
The equations are coupled of course in that each $\Ph_n$ occurs
in at least two other equations.  Thus, we have a set of $N\times M$ 
linear equations to solve for the potential.  This is done 
numerically by a variety of methods (see the homework).  This method is
easily extended to handle irregular boundaries, a mixture of 
Dirichlet and Neumann boundary conditions, as well as finite
(non-singular) charge densities in the solution of Poisson's
equation.


\subsection{Derivation of Eq.~35: A Mathematica Session}

	In section II, we explore the problem of the potential between
two hemispheres maintained at opposite potentials.  Using the Dirichlet
Greens function method, we had reduced the problem to quadruture.
\beq
\Ph(\ep,\th)=\frac{V}{4\pi}(1-\ep^2)\int_0^{2\pi}d\ph'\leb\int_0^{\pi/2}
\frac{\sin\th'd\th'}{(1+\ep^2-2\ep\cos\ga)^{3/2}}-\int_{\pi/2}^{\pi}
\frac{\sin\th'd\th'}{(1+\ep^2-2\ep\cos\ga)^{3/2}}\rib
\eeq
The integral is still difficult in the general case; however, alternative 
approach, valid for $\ep=r/a<<1$, is to expand the integrand in
powers of $\ep$ and then to complete the integration term by term. This is
straightforward but tedious and generates a solution in powers of $\ep$.
This is quite tedious to perform by hand, but is straightforward
with a symbolic manipulator like Mathematica.  
\begin{verbatim}

In[1]:= integrand= Sin[thetap]/(1+ep^2-2 ep Cos[gamma])^(3/2)

                 Sin[thetap]
Out[1]= ------------------------------
               2                   3/2
        (1 + ep  - 2 ep Cos[gamma])

In[2]:= integrand=integrand/.Cos[gamma]->Cos[theta] Cos[thetap] + 
	Sin[theta] Sin[thetap] Cos[phip]


Out[2]= Sin[thetap] / 
 
                 2
>    Power[1 + ep  - 2 ep (Cos[theta] Cos[thetap] + 
 
>         Cos[phip] Sin[theta] Sin[thetap]), 3/2]

In[3]:= In[3]:= integrand1=Series[integrand,{ep,0,6}];

In[4]:= integrand1=Simplify[integrand1];

In[5]:= integrand1=Expand[integrand1];

In[6]:= answer1=Integrate[integrand1,{thetap,0,Pi/2}]-
	Integrate[integrand1,{thetap,Pi/2,Pi}];

In[7]:= answer1=Simplify[answer1];

In[8]:= answer2=Simplify[Integrate[answer1,{phip,0,2 Pi}]]

                                                                     3
                             5 Pi (15 Cos[theta] - 7 Cos[3 theta]) ep
Out[8]= 6 Pi Cos[theta] ep + ----------------------------------------- + 
                                                16
 
                                                                  5
     21 Pi (130 Cos[theta] - 35 Cos[3 theta] + 33 Cos[5 theta]) ep         7
>    -------------------------------------------------------------- + O[ep]
                                  512

In[9]:= Legrules={Cos[5x_]-> 16 (Cos[x])^5 - 20 (Cos[x])^3 + 5 Cos[x],
        Cos[3x_]-> 4 (Cos[x])^3 - Cos[x]  }
        
                                            3            5
Out[9]= {Cos[5 (x_)] -> 5 Cos[x] - 20 Cos[x]  + 16 Cos[x] , 
 
                                      3
>    Cos[3 (x_)] -> -Cos[x] + 4 Cos[x] }

In[10]:= answer2= Simplify[answer2/.Legrules]

                                                                   3
                              5 Pi (Cos[theta] - 7 Cos[3 theta]) ep
Out[10]= 6 Pi Cos[theta] ep + -------------------------------------- + 
                                                16
 
                                                                 5
     21 Pi (60 Cos[theta] - 35 Cos[3 theta] + 33 Cos[5 theta]) ep         7
>    ------------------------------------------------------------- + O[ep]
                                  512

In[11]:= answer2= Simplify[answer2 V (1-ep^2)/(4 Pi)]

                                                                    3
         3 V Cos[theta] ep   7 V (13 Cos[theta] + 5 Cos[3 theta]) ep
Out[11]= ----------------- - ---------------------------------------- + 
                 2                              64
 
                                                                 5
     11 V (100 Cos[theta] + 35 Cos[3 theta] + 63 Cos[5 theta]) ep         7
>    ------------------------------------------------------------- + O[ep]
                                 2048


\end{verbatim}
which is the answer we found, \eq{35}.

\end{document}


\section{Solution of Laplace's Equation by Conformal Maps}
We consider next a method which can be extremely powerful for potential
problems in two dimensions. It makes use of some basic properties of
analytic functions of complex variables. Start by considering the complex
$t$-plane and the complex $z$-plane, $t=u+iv$ and $z=x+iy$. Introduce also
a map
\beq
z=f(t)
\eeq
which produces one or more values of $z$ for a given $t$.
\vspace{2.5in}
For example,
\beq
z=\sin t=(e^{it}-e^{-it})/2i
\eeq
is a simple and useful map. From \eq{38} we see that
\beqa
x=\sin u \cosh v \nonumber \\
y=\cos u \sinh v.
\eeqa
A line in the $t$-plane becomes a line in the $z$-plane. In the case of the
preceding map, a line at constant $v$ maps into an ellipse in the $z$-plane
as one can see by manipulating \eq{39} to find
\beq
\lep\frac{x}{\cosh v}\rip^2+\lep\frac{y}{\sinh v}\rip^2=\sin^2u+\cos^2u\equiv1
\eeq
The semi-major and semi-minor axes of the ellipse are $\cosh v$ and $|\sinh
v|$. Similarly, a line at constant $u$ maps into a pair of hyperbolas as
one sees by using \eq{39} to find
\beq
\lep\frac{x}{\sin u}\rip^2-\lep\frac{y}{\cos u}\rip^2=\cosh^2v-\sinh^2v
\equiv 1.
\eeq
Regions in the complex $t$-plane map into corresponding regions in the
$z$-plane. For example, a rectangular region in the $t$-plane which is
enclosed by a pair of constant-$v$ lines and a pair of constant-$u$ lines
maps as indicated in the sketch below. \vspace{3.0in} An important feature
of a conformal map is that it preserves the angles between lines. In our
example, lines of constant $u$ and constant $v$ meet at 90 degrees as do
the lines on the corresponding hyperbola and ellipse.

What has this to do with the Laplace equation? Consider the inverse map to
\eq{37},
\beq
t=F(z),
\eeq
and take some derivatives:
\beqa
\pde{t}{x}=\der{F}{z}\pde{z}{x}=\der{F}{z} \nonumber \\
\pde{^2t}{x^2}=\der{^2F}{z^2}\pde{z}{x}=\der{^2F}{z^2} \nonumber \\
\pde{t}{y}=\der{F}{z}\pde{z}{y}=i\der{F}{z} \nonumber \\
\pde{^2t}{y^2}=i\der{^2F}{z^2}=-\der{^2F}{z^2}
\eeqa
Add the second and fourth of these equations to find
\beq
\spd{t}{x}+\spd{t}{y}=\sde{F}{z}-\sde{F}{z}=0.
\eeq
This equation holds for both the real and imaginary parts of $t$, so we
have
\beq
\lap u(x,y)=0 \hbox{~and~} \lap v(x,y)=0,
\eeq
where the Laplacian is in two dimensions,
\beq
\lap\equiv\spd{}{x}+\spd{}{y}.
\eeq
The conformal map thus generates not one but two functions $u(x,y)$ and $v(x
,y)$ which satisfy the Laplace equation.

We want to exploit the fact that we can so easily generate solutions by
choosing the transformation $f(z)$ in such a way that one of $u(x,y)$ and
$v(x,y)$ becomes the solution $\Ph(x,y)$ to an electrostatics problem posed
in the $x$-$y$ plane. A natural sort of problem for this technique is one
involving a volume V surrounded by constant-potential surfaces. If one can
map lines of constant $u$ (constant $v$) onto the constant potential
surface in the $x$-$y$ plane, then $u(x,y)$ ($v(x,y)$) is the potential we
want, aside from some overall scaling factor and a shift in the zero of the
potential.

Given that {\em one} of $u(x,y)$ and $v(x,y)$ is the potential, what then
in the significance of the other one? Since lines of constant $v$ and $u$
meet at $\pi/2$ radians in the $t$-plane, the corresponding lines in the
$z$ plane also meet at this angle. One set of lines is a set of
equipotential surfaces, so the other one must be the field lines or lines
which are everywhere parallel to $\E$.

As an example, consider the map
\beq
z=t^{1/2} \hbox{~or~} t=z^2.
\eeq
It gives \beq
u(x,y)=x^2-y^2 \hbox{~and~} v(x,y)=2xy.
\eeq
Lines of constant $u$ are hyperbolas in the $z$-plane, as are lines of
constant $v$. Consider the constant-$u$ lines; the region lying between two
such lines ($u=-u_1$ and $u=u_0$) in the $t$-plane maps into the $z$-plane
as a region bounded by four hyperbolas, as shown in the sketch below.
\vspace{2.0in} If we interpret the hyperbolas corresponding to $u=u_0$ as
electrodes at potential $V_0$ and those corresponding to $u=-u_1$ as
electrodes at potential $V_1$, then we can say that the potential in the
bounded region of the $z$-plane is
\beq
\Ph(x,y)=C(x^2-y^2)+D
\eeq
where $C$ and $D$ are constants such that $Cu_0^2+D=V_0$ and $-Cu_1^2+D=-
V_1$. Solving for the constants is easy; after doing so, substitute into
the expression for the potential to find
\beq
\Ph(x,y_=(V_0+V_1)\lep\frac{x^2-y^2}{u_0^2+u_1^2}\rip+
\frac{u_1^2V_0-u_0V_1}{u_0^2+u_1^2}.
\eeq
Thus have we solved for the potential in a region bounded by
constant-potential electrodes in the shape of hyperbolas.

Let's summarize what we have learned. We can solve the problem
\beq
\lap\Ph(x,y)=0
\eeq
in a domain V with closed surface S given by a set of (individually open)
surfaces S$_i$ with $\Ph(x,y)=V_i$ on S$_i$, by mapping lines of constant
$u$ (or $v$) onto the surfaces S$_i$ in such a way that for $x,y$ on S$_i$,
\beq
u(x,y)=CV_i+D \hbox{~or~} v(x,y)=CV_i+D \hbox{~for all $i$.}
\eeq
The solution is, aside from a constant factor and a shift of the zero of
potential, just the function $u(x,y)$ (or $v(x,y)$).

Let's look at another example. The map
\beq
z=A+B(t-a)^{\al},
\eeq
where $\al$, $a$, $A$, and $B$ are constants, can convert a line of
constant $v$ into a wedge in the $z$-plane. Look at the most simple such
map,
\beq
z=t^{\al} \hbox{~or~} t=z^{1/\al}.
\eeq
The real line $t=u$, or $v=0$, becomes
\beq
z=u^{\al}.
\eeq
For $u>0$, $z=|u|^{\al}=x$, and for $u<0$, $z=|u|^{\al}e^{1\pi\al}$. Thus
the $v=0$ line maps into a wedge as shown. \vspace{2.0in} The useful range
of $\al$ is $0<\al<2$. the edge of the wedge is an equipotential surface.
To find the potential we use $t=z^{1/\al}$ or
\beqa
u(x,y)=\rh^{1/\al}\cos(\ph/\al) \nonumber \\
v(x,y)=\rh^{1/\al}\sin(\ph/\al),
\eeqa
where $\rh=\sqrt{x^2+y^2}$. The second of these functions in the potential,
\beq
\Ph(x,y)=C\rh^{1/\al}\sin(\ph/\al);
\eeq
$C$ is a constant. Further discussion of this result will be given a second
way.

And now for a final example. A very simple map is given by $t=z^{-1}$, or
\beq
u(x,y)=x/(x^2+y^2)\hbox{~and~}v(x,y)=-y/(x^2+y^2).
\eeq
The inverses are
\beq
x=u/(u^2+v^2) \hbox{~and~} y=-v/(u^2+v^2).
\eeq
>From these transformations it follows that
\beq
\lep x-\frac1{2u}\rip^2+y^2=\lep\frac1{2u}\rip^2
\eeq
and
\beq
x^2+\lep y+\frac1{2v}\rip^2=\lep\frac1{2v}\rip^2.
\eeq
Hence we can see that lines of constant $u$ and of constant $v$ map into
circles. Lines at $v=\pm v_0$ map into touching circles of radius $1/2v_0$.
These two surfaces are at ``potentials'' $\pm v_0$, and the potential in the
region exterior to the circles is
\beq
\Ph(x,y)=-y/(x^2+y^2).
\eeq
Hence we have the solution to the case of two long, parallel,  right circular
cylinders at different potentials and in contact (but not electrical
contact) with each other.

In conclusion, we can say that the conformal mapping method of solution of
potential problems in two dimensions is a very powerful one, but that it is
difficult to go about it in a systematic way. There are certain classes of
transformations which are routinely used for problems of certain types, but
if one is faced with a problem which does not fall into one of these
categories, it is a real art to come up with a transformation which
produces a solution.

