# Fourier Series, Electrostatic Potential in a Rectangular Cavity.

Cuthbert Nyack
Fourier Series can also be used to help find solutions of Laplace equation shown below. Using separation of variables the general solution of this equation involves sin, cos,sinh and cosh. The solution for this case can be derived by using the boundary conditions. Assuming a cavity of length b along the y direction and a along the x direction. and boundary conditions given by
V(0,y) = V1 for 0 <= y <= b
V(a,y) = 0 for 0 <= y <= b.
V(x,0) = 0 for 0 <= x <= a.
V(x,b) = 0 for 0 <= x <= a.
Then the solution is shown below. Fn = 1 in the applet below shows the electrostatic potential in the cavity with boundary conditions on the left.
Scrollbars 20 and 21 can be used to find numerical values of the potential in the cavity.
Ns(set by scrollbar 1) determines how many terms are summed in the Fourier Series.
Fn = 2 shows a special case of Fn = 1.
Fn = 3 shows the case with boundary conditions on the right.
Fn = 4 shows a special case of Fn = 3.
Fn = 5 shows the case with boundary conditions on only part of the left side.
Fn = 6, 7 shows special cases of Fn = 5.
Fn = 8 shows the case with boundary conditions on only part of the right side.
Fn = 9, 10 shows special cases of Fn = 8.
Fn = 11 shows the case with boundary conditions on only part of the left and right sides.
Fn = 12 to 14 shows special cases of Fn = 11.
The boundary conditions are shown in yellow and green on the left.
Unfortunately as nsum increases the applet's response time increases.

Image below shows a case with boundary conditions on both sides. On the left V = 6.5 for y between 0.25 and 0.85 while on the right V = 6.5 for y between 0.15 and 0.75. 