Electrostatic Poisson Cube Solution
Electrostatic Poisson Cube Solution
William Talmadge
Fig. 1: Conducting cubical box indicating the orientation of the coordinate sys-
tem used. The non-zero potential side is highlighted in orange.
Problem
Consider a conducting cubical box (Figure 1) with sides L, centered at the origin
with sides parallel to the axis. All sides except that at x = −L/2 are at a voltage
of 0. The remaining side at x = −L/2 is at voltage V0 . Find the electric field
inside the cube and evaluate it at the center of the cube with V0 = 1000 V and
L = 0.1 m.
Solution
The first important observation to note in defining this problem is the statement
that the voltages are held at the specified values. It follows that we have an
electrostatics problem thus there are no currents or magnetic fields to consider.
The problem also specifies that we must determine the electric field within
the domain of the box which contains no charge distribution. We can use the
differential form of Guass’s Law in free space to solve this problem,
~ =0
∇·E (1)
1
2
However, we cannot solve directly for the electric field as we are not given any
conditions on this equation nor a charge distribution that would allow for a
~ However, we are given Dirichlet boundary conditions for
direct solution for E.
the electric potential Φ. So we can solve this problem by determining the electric
potential and taking the negative gradient to determine the electric field,
~ = −∇Φ
E (2)
We can derive the equation governing this system by substituting eq. 2 into eq.
1,
∇ · (−∇Φ) = 0
∇2 Φ = 0 (3)
Separation of Variables
Eq. 3 is the Poisson equation for electrostatic potential. By solving this equation
over the domain of the cube we will arive at a specific solution for the electric
potential inside the cube which will in turn give us the electric field. We begin
by expanding eq. 3 and solving the resulting partial differential equation by
separation of variables.
∂2 ∂2 ∂2
2
(Φx Φy Φz ) + 2 (Φx Φy Φz ) + 2 (Φx Φy Φz ) = 0
∂x ∂y ∂z
2 2
∂ 2 Φz
1 ∂ Φx ∂ Φy
Φy Φz + Φ x Φz + Φ x Φy =0
Φ x Φy Φz ∂x2 ∂y 2 ∂z 2
1 ∂ 2 Φx 1 ∂ 2 Φy 1 ∂ 2 Φz
+ + =0
Φx ∂x2 Φy ∂y 2 Φz ∂z 2
Φx 00 Φy 00 Φz 00
+ + = 0. (6)
Φx Φy Φz
3
Φx 00 Φy 00 Φz 00
=− − = a. (7)
Φx Φy Φz
Note that in eq. 7 that the left and right terms do not share any variables with
which they can vary over thus each must be constant for them to be equal.
Φx 00 = aΦx (8)
Applying the boundary conditions for eq. 8 and simplifying reduces as follows.
L L L L
0 = A cosh α + φ + sinh α + φ +B cosh α + φ − sinh α + φ
2 2 2 2
L L L L
0 = Acosh α + φ +Asinh α + φ +Bcosh α + φ −Bsinh α + φ
2 2 2 2
L L
0 = (A + B) cosh α + φ + (A − B) sinh α + φ
2 2
L L
(A + B) cosh α + φ = − (A − B) sinh α + φ (10)
2 2
In eq. 10
L
cosh α + φ 6= 0 ,
2
L L
cosh α + φ 6= sinh α + φ
2 2
L
∴ (A + B) cosh α + φ = 0 =⇒ A + B = 0 ,
2
therefore we can substitute
B = −A
into eq. 9.
Φx = Aeαx+φ − Ae−(αx+φ)
By applying the hyperbolic sinh identity for exponentials we can simplify this
expression to
Φx = 2Asinh(αx + φ) .
in
Φx 00 Φy 00 Φz 00
=− − = α2
Φx Φy Φz
Φx 00 Φz 00 Φy 00 Φz 00
+ =− = α2 + = β2
Φx Φz Φy Φz
Φy 00 = −β 2 Φy (12)
Φx 00 Φy 00 Φz 00 Φy 00
+ =− = α2 + = γ2
Φx Φy Φz Φy
Φz 00 = −γ 2 Φz (13)
Φy 00
α2 + = γ2
Φy
γ 2 = α2 − β 2 . (14)
The general form of the solution of eq. 12 and eq. 13 will be,
We apply the boundary conditions and note that both equations can only hold
if D = 0,
L L
Ccos β + Dsin β =0
2 2
L L
Ccos β − Dsin β = 0,
2 2
6
it follows that there is no sin(βy) term in the specific solution, thus we are left
with,
L
Ccos β = 0.
2
π
This is only true when the argument is an odd multiple of 2,
L nπ
β = , n odd
2 2
nπ
β= , n odd , (16)
L
nπ
Φy = Ccos y , n odd . (17)
L
The boundary conditions on Φz are identical to that of Φy thus the specific
solution will be identical in form, albeit with different constants. This yields
the following.
mπ
γ= , m odd (18)
L
mπ
Φz = Ecos z , m odd (19)
L
Both eq. 17 and eq. 19 define a countable set of infinite solutions on account of
the presence of arbitrary, integral constants. By the principle of superposition
all sums of these solutions are also solutions, thus we can generalize all possible
solutions of this form by summing them.
X nπ
Φy = Cn cos y (20)
L
n odd
X mπ
Φz = Em cos z (21)
L
m odd
With β and γ known we can now calculate α using eq. 14 and substitute it into
eq. 11. Likewise the sum of all solutions resulting from combinations of possible
values of m and n is also a solution.
mπ 2 nπ 2
= α2 −
L L
7
πp 2
α= m + n2 , m, n odd (22)
L
p
X x 1
Φx = Am,n sinh π m2 + n2 − (23)
L 2
n,m odd
With all factors of Φ determined we can substitute them back into eq. 5,
p X
X x 1 nπ X mπ
Φ= Am,n sinh π m2 + n2 − · Cn cos y · Em cos z .
L 2 L L
m,n odd n odd m odd
p
X
2 2
x 1 nπ mπ
Φ= Vm,n sinh π m + n − cos y cos z (24)
L 2 L L
m,n odd
Fourier Coefficients
in
X p nπ mπ
Φ (y, z) = V0 = Vm,n sinh −π m2 + n2 cos y cos z
L L
n,m odd | {z }
Fm,n
With our definition of Fm,n our equation takes on a strict form of a Fourier
series X nπ mπ
V0 = Fm,n cos y cos z ,
L L
m,n odd
8
We can now solve for Fm,n and in turn Vm,n through a standard derivation of
the Fourier coefficients of a two-variable cosine series. We begin by multiplying
both sides by our basis function; however, we make the basis function range
over arbitrary, integral constants that are independent from m and n.
iπ jπ
V0 cos y cos z = ...
L L
X nπ mπ
iπ
jπ
Fm,n cos y cos z cos y cos z
L L L L
m,n odd
We integrate both sides, noting that in this case the integral of the summation
is the same as the summation of the integral of each term in the series. The
range of integration will be the domain covered in each variable of integration.
L
¨2
iπ jπ
V0 cos y cos z dydz = . . .
L L
−L
2
L
X ¨
2
nπ mπ
iπ
jπ
Fm,n cos y cos z cos y cos z dydz
L L L L
m,n odd L
−2
We rearrange the double integral on the right hand side and exploit the orthog-
onality of cosines to evaluate them.
L
¨2
iπ jπ
V0 cos y cos z dydz = . . .
L L
−L
2
ˆ L
nπ ˆ L
X 2 iπ 2 mπ jπ
Fm,n cos y cos y dy cos z cos z dz
−L L L −L L L
m,n odd 2
| 8
{z }| 2 8 {z }
<n L L
>
=i 2
<m
>
=j 2
:otherwise 0
> :otherwise 0
>
L
¨2 2
iπ jπ L
V0 cos y cos z dydz = Fi,j
L L 2
−L
2
9
ˆ L ˆ L2
4V0 2 iπ jπ
Fi,j = 2 cos y dy cos z dz
L −L2
L −L 2
L
L2 L2
4V0 L iπ L jπ
Fi,j = 2 sin y sin z
L iπ L −L jπ L −L
2 2
" #" #
1 1
4V0 sin 2 iπ L sin 2 jπ L
Fi,j = 2 2 2
L iπ jπ
1 1
16V0 (−1) 2 (i−1) (−1) 2 (j−1)
Fi,j =
π 2 ij
1
(
16V0 (−1) 2 (i+j−2) i, j odd
Fi,j = 2
π ij otherwise 0
1
(
−16V (−1) 2 (m+n−2) n, m odd
Vn,m = √ (25)
nmπ 2 sinh π m2 + n2 otherwise 0
√ x 1
− 12 (−1) 2 (m+n−2)
X sinh π m2 + n2 nπ mπ
L
Φ = −16V0 √ cos y cos z .
nmπ 2 sinh π m2 + n2 L L
n,m odd
(26)
Electric Field
To find the electric field we simply take the negative gradient of eq. 26.
~ = −∇Φ
E
√ √ 1
P m2 +n2 cosh(π m2 +n2 ( L
x
− 12 ))(−1) 2 (m+n−2) nπ
mπ
n,m, odd
√
nmL sinh(π m +n )
2 2
cos L y cos L z
√
~ = 16V0
1
sinh(π m2 +n2 ( L
x
− 12 ))(−1) 2 (m+n−2)
E nπ mπ
P
− n,m odd √ sin y cos z
π
mL sinh(π m +n )
2 2 L L
√ 1
sinh(π m2 +n2 ( L
x
− 12 ))(−1) 2 (m+n−2)
cos nπ mπ
P
− n,m odd √
nL sinh(π m +n )
2 2 L y sin L z
(27)
10
Evaluating eq. 27 at the center of the cube; h0, 0, 0i with V0 = 1000 V and
L = 0.1 m
√ √ 1
P m2 +n2 cosh(π m2 +n2 (− 12 ))(−1) 2 (m+n−2)
n,m odd
√
nm(0.1) sinh(−π m2 +n2 )
cos (0) cos (0)
√
~ 0, 0) = 16(1000) − P
1
sinh(π m2 +n2 ( L x
− 12 ))(−1) 2 (m+n−2)
E(0, √ sin (0) cos (0)
π
n,m odd m(0.1) sinh(−π m +n2 )2
√ 1
sinh(π m2 +n2 ( L x
− 12 ))(−1) 2 (m+n−2)
P
− n,m odd √
n(0.1) sinh(−π m +n2 )
2
cos (0) sin (0)
Note that Ey and Ez must be zero so only the x component must actually be
calculated. The sum must be approximated by evaluating the sum to a finite
value for n and m. Fortunately this sum converges to an accurate solution rather
quickly, as can be seen in figure 2.
Figure 2 indicates that 10 iterations is more than sufficient to get a very good
approximation for Ex .
7, 216.2
N
~ 0, 0) =
E(0, 0
C
0
11
To visualize the solution to the Poisson equation inside of the specified cube we
will evaluate Φ at z = 0. The result will be a 2-D density plot with the color
indicating the strength of the potential field. We will also show the electric field
lines superimposed.
Fig. 3: Electric potential inside the cube at z = 0 from the orientation of positive
z looking down the negative z direction. Electric field lines are in blue