Title: Default for 25.4 Solution Using Fourier Series
Course: HELM Workbooks 2023-2024

Solutions involving infinite Fourier series

We shall illustrate this situation using Laplace’s equation but infinite Fourier series can also be necessary for the heat conduction and wave equations.

We recall from the previous Section that using a product solution

\(\qquad u(x,t)=X(x)Y(y)\)

in Laplace’s equation gives rise to the ODEs:

\(\qquad \dfrac{X''}{X}=K\qquad\qquad \dfrac{Y''}{Y}=-K\)

To determine the sign of \(K\) and hence the appropriate solutions for \(X(x)\) and \(Y(y)\) we must impose appropriate boundary conditions. We will investigate solving Laplace’s equation in the square

\(\qquad 0\le x\le \ell\qquad 0\le y\le \ell\)

for the boundary conditions \(u(x,0)=0\ \ \ u(0,y)=0\ \ \ u(\ell,y)=0\ \ \ u(x,\ell)=U_0,\) a constant. See Figure 7.

[Image: Workbook 25.4 Figure 2]
Figure 7

(a) We must first deduce the sign of the separation constant \(K\):
if \(K\) is chosen to be positive say \(K=\lambda^2,\) then the \(X\) equation is

\(\qquad X''=\lambda^2X\)

with general solution

\(\qquad X=Ae^{\lambda x}+Be^{-\lambda x}\)

while the \(Y\) equation becomes

\(\qquad Y''=-\lambda^2Y\)

with general solution

\(\qquad Y=C\cos\lambda y+D\sin \lambda y\)

If the sign of \(K\) is negative \(K=-\lambda^2\) the solutions will change to trigonometric in \(x\) and exponential in \(y\).

These are the only two possibilities when we solve Laplace’s equation using separation of variables and we must look at the boundary conditions of the problem to decide which is appropriate.

Here the boundary conditions are periodic in \(x\) (since \(u(0,y)=u(\ell,y))\) and non-periodic in \(y\) which suggests we need a solution that is periodic in \(x\) and non-periodic in \(y\).

Thus we choose \(K=-\lambda^2\) to give

\(\qquad X(x)=(A\cos \lambda x +B\sin \lambda x)\)

\(\qquad Y(y)=(Ce^{\lambda y}+D e^{-\lambda y})\)

(Note that had we chosen the incorrect sign for \(K\) at this stage we would later have found it impossible to satisfy all the given boundary conditions. You might like to verify this statement.)

The appropriate general solution of Laplace’s equation for the given problem is

\(\qquad u(x,y)=(A\cos\lambda x+B\sin\lambda x)(Ce^{\lambda y}+De^{-\lambda y}).\)

(b) Inserting the boundary conditions produces the following consequences:

\(\qquad u(0,y)=0\qquad \text{gives}\qquad A=0\)

\(\qquad u(\ell,y)=0\qquad \text{gives}\qquad \sin\lambda \ell=0\qquad \text{i.e.}\ \lambda=\dfrac{n\pi}{\ell}\)

where \(n\) is a positive integer \(1,2,3,\dots\). While \(n=0\) also satisfies the equation it leads to the trivial solution \(u=0\) only.)

\(\qquad u(x,0)=0\ \ \text{gives}\ \ C+D=0\ \ \text{i.e.}\ \ D=-C\)

At this point the solution can be written

\(\qquad u(x,y)=BC\sin \left(\dfrac{n\pi x}{\ell}\right)\left(e^{\dfrac{n\pi y}{\ell}}-e^{-\dfrac{n\pi y}{\ell}}\right)\)

This can be conveniently written as

\(\qquad u(x,y)=E\sin \left(\dfrac{n\pi x}{\ell}\right)\sinh \left(\dfrac{n\pi y}{\ell}\right)\) | \[(1)\]

where \(E=2BC.\)

At this stage we have just one final boundary condition to insert to obtain information about the constant \(E\) and the integer \(n\). Our solution \((1)\) gives

\(\qquad u(x,\ell)=E\sin\left(\dfrac{n\pi x}{\ell}\right)\sinh (n\pi)\)

and clearly this is not compatible, as it stands, with the given boundary condition

\(\qquad u(x,\ell)=U_0=\text{constant}.\)

The way to proceed is again to superpose solutions of the form \((1)\) for all positive integer values of \(n\) to give

\(\qquad u(x,y)=\sum_{n=1}^\infty E_n\sin\left(\dfrac{n\pi x}{\ell}\right)\sinh \left(\dfrac{n\pi y}{\ell}\right)\) | \[(2)\]

from which the final boundary condition gives

\[\begin{aligned} U_0&=\sum_{n=1}^\infty E_n\sin\left(\dfrac{n\pi x}{\ell}\right)\sinh (n\pi)\qquad 0<x<\ell.\\ &=\sum_{n=1}^\infty b_n\sin\left(\dfrac{n\pi x}{\ell}\right)\quad \text{where} \quad b_n=E_n\sinh(n\pi).\end{aligned}\] | \((3)\)

What we have here is a Fourier (sine) series for the function

\(\qquad f(x)=U_0\qquad 0<x<\ell.\)

Recalling the work on half-range Fourier series ( 23.5) we must extend this definition to produce an odd function with period \(2\ell\). Hence we define

\[\begin{aligned} f(x)&=&\left\{\begin{array}{rr}U_0&0<x<\ell\\ -U_0&-\ell<x<0\end{array}\right.\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\\ \\ f(x+\ell)&=f(x)\end{aligned}\]

illustrated in Figure 8.

[Image: Workbook 25.4 Figure 2]
Figure 8

(c) We can now apply standard Fourier series theory to evaluate the Fourier coefficients \(b_n\) in \((3)\).
We obtain

\(\qquad b_n=E_n\sinh n\pi=\dfrac{4U_0}{2\ell}\int_0^{\ell}\sin\left(\dfrac{n\pi x}{\ell}\right)\;dx\)

(Recall that, in general, \(b_n=2\ \times\) the mean value of \(f(x)\sin\left(\dfrac{n\pi x}{\ell}\right)\) over a period. Here, because \(f(x)\) is odd, and hence \(f(x)\sin \left(\dfrac{n\pi x}{\ell}\right)\) is even, we may take half the period for our averaging process.)
Carrying out the integration

\(\qquad E_n\sinh n\pi =\dfrac{2 U_0}{n\pi}(1-\cos n\pi)\) i.e. \(\qquad E_n=\left\{\begin{array}{cc} \dfrac{4U_0}{n\pi\sinh n\pi}&n=1,3,5,\ldots\\ \\ 0&n=2,4,6,\ldots\end{array}\right.\)

(Since \(f(x)\) is a square wave with half-period symmetry we are not surprised that only odd harmonics arise in the Fourier series.)

Finally substituting these results for \(E_n\) into \((2)\) we obtain the solution to the given problem as the infinite series:

\(\qquad\ u(x,y)=\dfrac{4U_0}{\pi}\sum_{{n=1\atop (n\ \text{odd})}}^\infty \dfrac{\sin\left(\dfrac{n\pi x}{\ell}\right)\sinh\left(\dfrac{n\pi y}{\ell}\right)}{n\sinh n\pi}\)

Example

Solve Laplace’s equation to determine the steady state temperature \(u(x,y)\) in the semi-infinite plate \(0\le x\le 1,\ \ y\ge 0\). Assume that the left and right sides are insulated and assume that the solution is bounded. The temperature along the bottom side is a known function \(f(x)\).

1. First write this problem as a mathematical boundary value problem paying particular attention to the mathematical representation of the boundary conditions:
Solution
Since the sides \(x = 0\) and \(x = 1\) are insulated, the temperature gradient across these sides is zero
i.e. \(\dfrac{\partial u}{\partial x}=0\) for \(x = 0\),\( 0 <y<\infty \) and \(\dfrac{\partial u}{\partial x}=0\) for \(x = 1, 0 < y<\infty \)

The third boundary condition is \(u(x, 0) = f(x)\).
The fourth boundary condition is less obvious: since the solution should be bounded (ie not grow and grow) we must demand that \( u(x, y) → 0 \) as \(y → \infty.\) (See figure below.)
[Image: Workbook 25.4 Task Solution Figure]
2. Now use the separation of variables method, putting \(u(x,y)=X(x)Y(y)\), to find the differential equations satisfied by \(X(x)\), \(Y(y)\) and decide on the sign of the separation constant \(K\):
Solution
We have boundary conditions which, like the worked example above, are periodic in \(x\). Hence the differential equations are, again,

\(\qquad X''=-\lambda^2 X\) | \(Y''=+\lambda^2\)

putting the separation constant \(K\) as \(-\lambda^2\).
3. Write down the solutions for \(X\), for \(Y\) and hence the product solution \(u(x,y)=X(x)Y(y)\):
Solution

\(X=A\cos \lambda x +B\sin \lambda x\) | \(Y=Ce^{\lambda y}+D e^{-\lambda y}\)

so

\(\qquad u=(A\cos \lambda x +B\sin \lambda x)(Ce^{\lambda y}+D e^{-\lambda y})\) | \[(4)\]

4. Impose the derivative boundary conditions on this solution:
Solution
\(\qquad \dfrac{\partial u}{\partial x}=(-\lambda A \sin \lambda x +\lambda B\cos \lambda x)(Ce^{\lambda y}+D e^{-\lambda y})\)

Hence\(\dfrac{\partial u}{\partial x}(0, y) = 0\) gives \(\lambda B(Ce^{\lambda y}+D e^{-\lambda y}) = 0\) for all \(y.\)
The possibility \(\lambda = 0\) can be excluded this would give a trivial constant solution in \((4)\). Hence we must choose \(B = 0\).
The condition \(\dfrac{\partial u}{\partial x}(1, y) = 0\) gives
\(\qquad -\lambda A\sin\lambda(Ce^{\lambda y}+D e^{-\lambda y}) = 0\)
Choosing \(A = 0\) would make \(u \equiv 0\) so we must force \(\sin \lambda\) to be zero i.e. choose \(\lambda = nπ\) where \(n\) is a positive integer.
Thus, at this stage \((4)\) becomes

\(\qquad u = A \cos nπx(Ce^{nπy} + De^{-nπy})\) |
\(     \qquad = \cos nπx(Ee^{nπy} + F e^{−nπy})\) | \[(5)\]

5. Now impose the condition that this solution should be bounded:
Solution
The region over which we are solving Laplace’s equation is semi-infinite i.e. the \(y\) coordinate increases without limit. The solution for \(u(x, y)\) in \((5)\) will increase without limit as \(y → \infty\) due to the term \(e^{nπy}\) (\(n\) being a positive integer.) This can be avoided i.e. the solution will be bounded if the constant \(E\) is chosen as zero.
6. Finally, use Fourier series techniques to deal with the final boundary condition \(u(x,0)=f(x)\):
Solution
Superposing solutions of the form \((5)\) (with \(E = 0\)) gives

\(\qquad u(x, y) = \sum_{n=0}^\infty F_n\cos(n\pi x)e^{-n\pi x}\) | \((6)\)

so the boundary condition gives
\(\qquad f(x) = \sum_{n=0}^\infty F_n\cos(n\pi x)\)
We have here a half-range Fourier cosine series representation of a function \(f(x)\) defined over \(0 < x < 1\). Extending \(f(x)\) as an even periodic function with period 2 and using standard Fourier series theory gives

\(\qquad F_n=2\int_0^{1}f(x)\cos(n\pi x) \;dx\) | \[n = 1,2,...\]

with
\(\qquad \dfrac{F_0}{2}=\int_0^{1}f(x) \;dx\)
Hence \((6)\) is the solution of this given boundary value problem, the integrals giving us in principle the Fourier coefficients \(F_n\) for a given function \(f(x)\).

Example

Now use the separation of variables method, putting \(u(x,y)=X(x)Y(y)\), to find the differential equations satisfied by \(X(x)\), \(Y(y)\) and decide on the sign of the separation constant \(K\):

Solution

We have boundary conditions which, like the worked example above, are periodic in \(x\). Hence the differential equations are, again,

\(\qquad X''=-\lambda^2 X\) | \(Y''=+\lambda^2\)

putting the separation constant \(K\) as \(-\lambda^2\).

Example

Write down the solutions for \(X\), for \(Y\) and hence the product solution \(u(x,y)=X(x)Y(y)\):

Solution

\(X=A\cos \lambda x +B\sin \lambda x\) | \(Y=Ce^{\lambda y}+D e^{-\lambda y}\)

so

\(\qquad u=(A\cos \lambda x +B\sin \lambda x)(Ce^{\lambda y}+D e^{-\lambda y})\) | \[(4)\]

Example

Impose the derivative boundary conditions on this solution:

Solution

\(\qquad \dfrac{\partial u}{\partial x}=(-\lambda A \sin \lambda x +\lambda B\cos \lambda x)(Ce^{\lambda y}+D e^{-\lambda y})\)

Hence\(\dfrac{\partial u}{\partial x}(0, y) = 0\) gives \(\lambda B(Ce^{\lambda y}+D e^{-\lambda y}) = 0\) for all \(y.\)
The possibility \(\lambda = 0\) can be excluded this would give a trivial constant solution in \((4)\). Hence we must choose \(B = 0\).
The condition \(\dfrac{\partial u}{\partial x}(1, y) = 0\) gives

\(\qquad -\lambda A\sin\lambda(Ce^{\lambda y}+D e^{-\lambda y}) = 0\)

Choosing \(A = 0\) would make \(u \equiv 0\) so we must force \(\sin \lambda\) to be zero i.e. choose \(\lambda = nπ\) where \(n\) is a positive integer.
Thus, at this stage \((4)\) becomes

\(\qquad u = A \cos nπx(Ce^{nπy} + De^{-nπy})\) |
\(     \qquad = \cos nπx(Ee^{nπy} + F e^{−nπy})\) | \[(5)\]

Example

Now impose the condition that this solution should be bounded:

Solution

The region over which we are solving Laplace’s equation is semi-infinite i.e. the \(y\) coordinate increases without limit. The solution for \(u(x, y)\) in \((5)\) will increase without limit as \(y → \infty\) due to the term \(e^{nπy}\) (\(n\) being a positive integer.) This can be avoided i.e. the solution will be bounded if the constant \(E\) is chosen as zero.

Example

Finally, use Fourier series techniques to deal with the final boundary condition \(u(x,0)=f(x)\):

Solution

Superposing solutions of the form \((5)\) (with \(E = 0\)) gives

\(\qquad u(x, y) = \sum_{n=0}^\infty F_n\cos(n\pi x)e^{-n\pi x}\) | \((6)\)

so the boundary condition gives

\(\qquad f(x) = \sum_{n=0}^\infty F_n\cos(n\pi x)\)

We have here a half-range Fourier cosine series representation of a function \(f(x)\) defined over \(0 < x < 1\). Extending \(f(x)\) as an even periodic function with period 2 and using standard Fourier series theory gives

\(\qquad F_n=2\int_0^{1}f(x)\cos(n\pi x) \;dx\) | \[n = 1,2,...\]

with

\(\qquad \dfrac{F_0}{2}=\int_0^{1}f(x) \;dx\)

Hence \((6)\) is the solution of this given boundary value problem, the integrals giving us in principle the Fourier coefficients \(F_n\) for a given function \(f(x)\).