# Laplace’s equation – Fourier series examples 2

References: Griffiths, David J. (2007), Introduction to Electrodynamics, 3rd Edition; Pearson Education – Chapter 3, Post 14.

Another example of the solution of Laplace’s equation in a two-dimensional problem.

We have an infinite rectangular pipe extending to infinity in both directions, lying parallel to the ${z}$ axis. The four sides of the pipe are as follows.

At ${y=0}$ and ${y=a}$ the potential is held at ${V=0}$. At ${x=0}$ the potential is also ${V=0}$, but at ${x=b}$ it is some arbitrary function of ${y}$: ${V=V_{0}(y)}$. We can use separation of variables and Fourier series to find the potential everywhere inside the pipe.

The general solution from separation of variables gives us

$\displaystyle V(x,y)=\left(Ae^{kx}+Be^{-kx}\right)\left(C\sin ky+D\cos ky\right) \ \ \ \ \ (1)$

for constants ${A,B,C,D}$. In this case we could choose to swap ${x}$ and ${y}$ in the solution, since neither ${x}$ nor ${y}$ goes to infinity so there’s no requirement for either term to vanish at infinity. However, with the given boundary conditions, the current choice makes things easier (though feel free to try it the other way round if you like; that is, try a solution of form ${V(x,y)=\left(Ae^{ky}+Be^{-ky}\right)\left(C\sin kx+D\cos kx\right)}$and see how far you get).

The boundary conditions are

$\displaystyle V=\begin{cases} 0 & y=0\\ 0 & y=a\\ 0 & x=0\\ V_{0}(y) & x=b \end{cases} \ \ \ \ \ (2)$

The first condition gives

$\displaystyle D=0 \ \ \ \ \ (3)$

The second gives

$\displaystyle k=\frac{n\pi}{a} \ \ \ \ \ (4)$

for ${n=1,2,3,\ldots}$

The third gives

 $\displaystyle A+B$ $\displaystyle =$ $\displaystyle 0\ \ \ \ \ (5)$ $\displaystyle A$ $\displaystyle =$ $\displaystyle -B \ \ \ \ \ (6)$

We therefore get, for a particular choice of ${n}$:

 $\displaystyle V_{n}(x,y)$ $\displaystyle =$ $\displaystyle AC\left(e^{n\pi x/a}-e^{-n\pi x/a}\right)\sin\frac{n\pi}{a}y\ \ \ \ \ (7)$ $\displaystyle$ $\displaystyle =$ $\displaystyle 2AC\sinh\frac{n\pi x}{a}\sin\frac{n\pi y}{a}\ \ \ \ \ (8)$ $\displaystyle$ $\displaystyle \equiv$ $\displaystyle c_{n}\sinh\frac{n\pi x}{a}\sin\frac{n\pi y}{a} \ \ \ \ \ (9)$

where in the last line we’ve merged the constant ${2AC}$ into the single constant ${c_{n}}$.

As usual, we can now form the general solution as a series of ${V_{n}}$ terms:

$\displaystyle V(x,y)=\sum_{n=1}^{\infty}c_{n}\sinh\frac{n\pi x}{a}\sin\frac{n\pi y}{a} \ \ \ \ \ (10)$

The coefficients ${c_{n}}$ can be found from the fourth boundary condition above, by multiplying both sides by ${\sin\frac{m\pi y}{a}}$ and integrating.

 $\displaystyle \int_{0}^{a}V_{0}(y)\sin\frac{m\pi y}{a}dy$ $\displaystyle =$ $\displaystyle \sum_{n=1}^{\infty}c_{n}\sinh\frac{n\pi b}{a}\int_{0}^{a}\sin\frac{m\pi y}{a}\sin\frac{n\pi y}{a}dy\ \ \ \ \ (11)$ $\displaystyle$ $\displaystyle =$ $\displaystyle \frac{a}{2}c_{m}\sinh\frac{m\pi b}{a} \ \ \ \ \ (12)$

Reverting to using ${n}$ as the subscript on the coefficients, we get

$\displaystyle c_{n}=\frac{2}{a\sinh\frac{n\pi b}{a}}\int_{0}^{a}V_{0}(y)\sin\frac{n\pi y}{a}dy \ \ \ \ \ (13)$

We can’t go any further without specifying ${V_{0}(y)}$.

In the special case where ${V_{0}(y)=V_{0}=}$constant, we can work out the integral on the right and get

$\displaystyle c_{n}=\begin{cases} 0 & n=2,4,6,\ldots\\ \frac{4V_{0}}{n\pi\sinh\frac{n\pi b}{a}} & n=1,3,5,\ldots \end{cases} \ \ \ \ \ (14)$

In this case, the general solution is

$\displaystyle V(x,y)=\frac{4V_{0}}{\pi}\sum_{n=1,3,5\ldots}^{\infty}\frac{\sinh\frac{n\pi x}{a}\sin\frac{n\pi y}{a}}{n\sinh\frac{n\pi b}{a}} \ \ \ \ \ (15)$