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 axis. The four sides of the pipe are as follows.
At and the potential is held at . At the potential is also , but at it is some arbitrary function of : . 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
for constants . In this case we could choose to swap and in the solution, since neither nor 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 and see how far you get).
The boundary conditions are
The first condition gives
The second gives
The third gives
We therefore get, for a particular choice of :
where in the last line we’ve merged the constant into the single constant .
As usual, we can now form the general solution as a series of terms:
The coefficients can be found from the fourth boundary condition above, by multiplying both sides by and integrating.
Reverting to using as the subscript on the coefficients, we get
We can’t go any further without specifying .
In the special case where constant, we can work out the integral on the right and get
In this case, the general solution is