Calculus

Fourier Series

Fourier Series Logo

Applications of Fourier Series to Differential Equations

Solved Problems

Example 3.

Using Fourier series expansion, solve the heat conduction equation in one dimension \[\frac{{\partial T}}{{\partial t}} = k\frac{{{\partial ^2}T}}{{\partial {x^2}}}\] with the Dirichlet boundary conditions: \(T = {T_1}\) if \(x = 0\) and \(T = {T_2}\) if \(x = L.\) The initial temperature distribution is given by \(T\left( {x,0} \right) = f\left( x \right).\)

Solution.

First we should define the steady state temperature distribution under the given boundary conditions.

Consider the equation \(k{\frac{{{\partial ^2}T}}{{\partial {x^2}}}} = 0.\) Integrating, we find the general solution:

\[{T_0}\left( x \right) = {C_1} + {C_2}x.\]

Find the coefficients \({C_1}\) and \({C_2}\) from the boundary conditions: \({T_0}\left( 0 \right) = {T_1},\) \({T_0}\left( L \right) = {T_2}.\) As a result, we have

\[{T_0}\left( x \right) = {T_1} + \left( {{T_2} - {T_1}} \right)\frac{x}{L}.\]

Now we construct the time-dependent temperature solution. Introduce the new variable

\[y\left( {x,t} \right) = T\left( {x,t} \right) - {T_0}\left( x \right).\]

The boundary conditions for \(y\left( {x,t} \right)\) become

\[y\left( {0,t} \right) = y\left( {L,t} \right) = 0,\]

The initial condition can be written in the form

\[y\left( {x,0} \right) = f\left( x \right) - {T_0}\left( x \right) = g\left( x \right).\]

Taking into account the new boundary conditions it's natural to apply the Fourier sine series expansion. Then

\[g\left( x \right) = \sum\limits_{n = 0}^\infty {{b_n}\sin \frac{{n\pi x}}{L}} ,\]

where the coefficients \({b_n}\) are defined by the formula

\[{b_n} = \frac{2}{L}\int\limits_0^L {g\left( x \right)\sin \frac{{n\pi x}}{L}dx} .\]

(We assume that these coefficients are known.)

We will search the general solution in the form of the series with time-dependent coefficients \({c_n}\left( t \right).\)

\[y\left( {x,t} \right) = \sum\limits_{n = 0}^\infty {{c_n}\left( t \right)\sin \frac{{n\pi x}}{L}} .\]

Obviously, the boundary conditions \(y\left( {0,t} \right) = 0\) and \(y\left( {L,t} \right) = 0\) are satisfied for all times \(t \gt 0.\) The initial conditions for \({c_n}\left( t \right)\) are

\[{c_n}\left( 0 \right) = {b_n},\;\; n = 0,1,2, \ldots\]

Substitute these expressions into the heat conduction equation \(k \frac{{{\partial ^2}y}}{{\partial {x^2}}} = \frac{{\partial y}}{{\partial t}}.\) Then

\[ - k\sum\limits_{n = 0}^\infty {\frac{{{n^2}{\pi ^2}}}{{{L^2}}}{c_n}\left( t \right)\sin \frac{{n\pi x}}{L}} = \sum\limits_{n = 0}^\infty {\frac{{d{c_n}\left( t \right)}}{{dt}}\sin \frac{{n\pi x}}{L}} .\]

Multiply both sides of the last expression by \({\sin {\frac{{m\pi x}}{L}}}\) and integrate on the interval \(\left[ {0,L} \right]\) using the orthogonality relations

\[ \int\limits_0^L {\sin \frac{{n\pi x}}{L}\sin \frac{{m\pi x}}{L}dx} = \begin{cases} 0, & \text{if} & m \ne n \\ \frac{L}{2}, & \text{if} & m = n \end{cases}.\]

Then we get

\[- k\sum\limits_{n = 0}^\infty {\frac{{{n^2}{\pi ^2}}}{{{L^2}}}{c_n}\left( t \right) \int\limits_0^L {\sin \frac{{n\pi x}}{L}\sin \frac{{m\pi x}}{L}dx} } = \sum\limits_{n = 0}^\infty {\frac{{d{c_n}\left( t \right)}}{{dt}} \int\limits_0^L {\sin \frac{{n\pi x}}{L}\sin \frac{{m\pi x}}{L}dx} }\]

or

\[ - k\frac{{{m^2}{\pi ^2}}}{{{L^2}}}{c_m}\left( t \right) = \frac{{d{c_m}\left( t \right)}}{{dt}}.\]

Solving this ODE for \({{c_n}\left( t \right)},\) we obtain

\[\frac{{d{c_m}}}{{{c_m}}} = - \frac{{k{m^2}{\pi ^2}}}{{{L^2}}}dt,\;\; \Rightarrow \int {\frac{{d{c_m}}}{{{c_m}}}} = - \frac{{k{m^2}{\pi ^2}}}{{{L^2}}}\int {dt} ,\;\; \Rightarrow \ln {c_m}\left( t \right) = - \frac{{k{m^2}{\pi ^2}}}{{{L^2}}}t + {C_0},\;\; \Rightarrow {c_m}\left( t \right) = A\exp \left( { - \frac{{k{m^2}{\pi ^2}}}{{{L^2}}}t} \right).\]

Since in this case \(m = n,\) we can write

\[{c_n}\left( t \right) = A\exp \left( { - \frac{{k{n^2}{\pi ^2}}}{{{L^2}}}t} \right),\]

where \(A = {e^{{C_0}}}\) is a constant depending on the initial conditions.

Taking into account that \({c_n}\left( 0 \right) = {b_n},\) we get the solution for \({c_n}\left( t \right)\) in the form

\[{c_n}\left( t \right) = {b_n}\exp \left( { - \frac{{k{n^2}{\pi ^2}}}{{{L^2}}}t} \right).\]

Consequently, the final solution for the heat equation is expressed through the formula

\[T\left( {x,t} \right) = {T_0}\left( x \right) + \sum\limits_{n = 0}^\infty {{b_n}\exp \left( { - \frac{{k{n^2}{\pi ^2}}}{{{L^2}}}t} \right)\sin \frac{{n\pi x}}{L}} = {T_1} + \left( {{T_2} - {T_1}} \right)\frac{x}{L} + \sum\limits_{n = 0}^\infty {{b_n}\exp \left( { - \frac{{k{n^2}{\pi ^2}}}{{{L^2}}}t} \right)\sin \frac{{n\pi x}}{L}} .\]

Example 4.

Find the solution of wave equation for a fixed string

\[\frac{{{\partial ^2}u}}{{\partial {t^2}} = a^2}\frac{{{\partial ^2}u}}{{\partial {x^2}}},\; 0 \le x \le L\]

with the boundary conditions \(u\left( {0,t} \right) = u\left( {L,t} \right) = 0\) (the string is fixed at the endponts). The initial displacement and velocity are given by

\[u\left( {x,0} \right) = f\left( x \right),\; \frac{{\partial u\left( {x,0} \right)}}{{\partial t}} = g\left( x \right),\]

where \(f\left( x \right)\) and \(g\left( x \right)\) are some functions defined by the user, such that

\[f\left( 0 \right) = f\left( L \right) = g\left( 0 \right) = g\left( L \right) = 0.\]

Solution.

We will look for all periodic solutions in which the variables \(x\) and \(t\) are separated, that is in the form

\[u\left( {x,t} \right) = X\left( x \right) T\left( t \right).\]

Then

\[\frac{{{\partial ^2}u}}{{\partial {t^2}}} = XT^{\prime\prime}\;\; \text{and}\;\; \frac{{{\partial ^2}u}}{{\partial {x^2}}} = X^{\prime\prime}T.\]

Substituting this into the wave equation, we obtain

\[XT^{\prime\prime} = {a^2}X^{\prime\prime}T\;\;\; \text{or}\;\;\; \frac{{X^{\prime\prime}}}{X} = \frac{{T^{\prime\prime}}}{{{a^2}T}}.\]

Here the function on the left-hand side depends only on \(x,\) whereas the function on the right-hand side depends only on \(t.\) This can happen if both sides of the equation are constant. Hence,

\[\frac{{X^{\prime\prime}}}{X} = \frac{{T^{\prime\prime}}}{{{a^2}T}} = \text{const} = \alpha .\]

If the constant \(\alpha\) is positive, we can put \(\alpha = {\lambda ^2}\) to get

\[T^{\prime\prime} = {a^2}{\lambda ^2}T\]

with the general solution

\[T\left( t \right) = a\sinh \left( {a\lambda t} \right) + b\cosh \left( {a\lambda t} \right).\]

Such solution cannot produce periodic functions in \(t.\) Therefore, we get that the constant \(\alpha\) is negative: \(\alpha = - {\lambda ^2}.\) Then our wave equation can be split into two ODEs:

\[X^{\prime\prime} + {\lambda ^2}X = 0,\;\; T^{\prime\prime} + {a^2}{\lambda ^2}T = 0.\]

Solving the first equation, we find that

\[X\left( x \right) = {C_1}\cos \lambda x + {C_2}\sin\lambda x,\]

where \({C_1}\) and \({C_2}\) are constants of integration.

Considering the boundary conditions for the fixed string, we set

\[X\left( 0 \right) = X\left( L \right) = 0.\]

Then

\[X\left( 0 \right) = {C_1} = 0,\;\; X\left( L \right) = {C_2}\sin \lambda L = 0.\]

By setting \({C_2} \ne 0\) (otherwise we would get the trivial solution \(X \equiv 0\)), we find that \(\lambda L = \pi n\) (\(n\) is an integer).

Thus, the so-called eigenvalues are

\[{\lambda _n} = \frac{{\pi n}}{L},\;\; n = 1,2,3, \ldots\]

The corresponding eigenfunctions are written as

\[{X_n}\left( x \right) = \sin \frac{{\pi nx}}{L}.\]

For \(\lambda = {\lambda _n}\) the second equation yields

\[{T_n} = {A_n}\cos a{\lambda _n}t + {B_n}\sin a{\lambda _n}t = {A_n}\cos \frac{{a\pi nt}}{L} + {B_n}\sin \frac{{a\pi nt}}{L}.\]

Thus, we can write:

\[{u_n}\left( {x,t} \right) = \sin \frac{{\pi nx}}{L}\left( {{A_n}\cos \frac{{a\pi nt}}{L} + {B_n}\sin\frac{{a\pi nt}}{L}} \right).\]

Here \(n\) is a positive integer, \({A_n}\) and \({B_n}\) are arbitrary constants depending on the initial conditions.

Now we can combine the general solution of the wave equation as a linear combination of the particular solutions:

\[u\left( {x,t} \right) = \sum\limits_{n = 1}^\infty {{u_n}\left( {x,t} \right)} = \sum\limits_{n = 1}^\infty {\sin \frac{{\pi nx}}{L}\left( {{A_n}\cos \frac{{a\pi nt}}{L} + {B_n}\sin\frac{{a\pi nt}}{L}} \right)}.\]

Assuming that the series is differentiable, we find that

\[\frac{{\partial u\left( {x,t} \right)}}{{\partial t}} = \sum\limits_{n = 1}^\infty {\sin \frac{{\pi nx}}{L}\left( { - {A_n}\frac{{a\pi n}}{L}\sin\frac{{a\pi nt}}{L} + {B_n}\frac{{a\pi n}}{L}\cos\frac{{a\pi nt}}{L}} \right).}\]

Determine the constants \({A_n}\) and \({B_n}\) using the initial conditions:

\[u\left( {x,0} \right) = \sum\limits_{n = 1}^\infty {{A_n}\sin \frac{{\pi nx}}{L}} = f\left( x \right),\]
\[\frac{{\partial u\left( {x,0} \right)}}{{\partial t}} = \sum\limits_{n = 1}^\infty {{B_n}\frac{{a\pi n}}{L}\sin \frac{{\pi nx}}{L}} = g\left( x \right).\]

As one can see, we should expand the functions \(f\left( x \right)\) and \(g\left( x \right)\) into the series based on the orthogonal system \(\left\{ {\sin \frac{{\pi nx}}{L}} \right\}.\) By the formulas for Fourier coefficients,

\[{A_n} = \frac{2}{L}\int\limits_0^L {f\left( x \right)\sin \frac{{\pi nx}}{L}dx} ,\;\; {B_n} = \frac{2}{{a\pi n}}\int\limits_0^L {g\left( x \right)\sin \frac{{\pi nx}}{L}dx} ,\;\; n = 1,2,3, \ldots\]

Thus, the solution to the wave equation with the given boundary and initial conditions is given by the infinite series

\[u\left( {x,t} \right) = \sum\limits_{n = 1}^\infty {{u_n}\left( {x,t} \right)} = \sum\limits_{n = 1}^\infty {\sin \frac{{\pi nx}}{L}\left( {{A_n}\cos \frac{{a\pi nt}}{L} + {B_n}\sin\frac{{a\pi nt}}{L}} \right)},\]

where the coefficients \({A_n}\) and \({B_n}\) are defined by the formulas given above.

The first term \({u_1}\left( {x,t} \right)\) of the series is called the fundamental tone, the other terms \({u_n}\left( {x,t} \right)\) are called harmonics. The period and frequency of a harmonic are given by the formulas

\[{T_n} = \frac{{2L}}{{an}},\;\; {\omega _n} = \frac{{a\pi n}}{L}.\]

Example 5.

Find the solution to Laplace's equation

\[\frac{{{\partial ^2}u}}{{\partial {x^2}}} + \frac{{{\partial ^2}u}}{{\partial {y^2}}} = 0\]

on a circle \({x^2} + {y^2} \le 1\) with the boundary condition

\[{\left. {u\left( {x,y} \right)} \right|_{{x^2} + {y^2} = 1}} = f\left( {x,y} \right).\]

Solution.

We will find the solution in polar coordinates \(\left( {r,\varphi } \right).\) The relationship between cartesian and polar coordinates is given by the standard formulas (Figure \(1\)):

\[{x = r\cos \varphi ,\;\;\;}\kern-0.3pt{y = r\sin \varphi .}\]
Laplace’s equation on the unit circle
Figure 1.

In polar coordinates, the function \(u\left( {x,y} \right)\) becomes \(u\left( {r,\varphi } \right)\) depending on the variables \(r\) and \(\varphi.\) Obviously, \(u\left( {r,\varphi } \right)\) is a \(2\pi\)-periodic function in \(\varphi.\) Similarly, the boundary function \(f\left( {x,y} \right)\) becomes the function \(f\left( \varphi \right)\) depending only on the angle \(\varphi.\)

The Laplace's equation in polar coordinates is

\[{r^2}\frac{{{\partial ^2}u}}{{\partial {r^2}}} + r\frac{{\partial u}}{{\partial r}} + \frac{{{\partial ^2}u}}{{\partial {\varphi ^2}}} = 0.\]

We will seek the solution \(u\left( {r,\varphi } \right)\) as a Fourier series expansion:

\[u\left( {r,\varphi } \right) = \frac{{{a_0}\left( r \right)}}{2} + \sum\limits_{n = 1}^\infty {\left[ {{a_n}\left( r \right)\cos n\varphi + {b_n}\left( r \right)\sin n\varphi } \right]} ,\]

where the Fourier coefficients \({{a_n}\left( r \right)}\) and \({{b_n}\left( r \right)}\) depend on the radius \(r.\)

Assuming that the function \(u\left( {r,\varphi } \right)\) is smooth enough, so we may differentiate it twice with respect to \(r\) and \(\varphi,\) we obtain

\[\frac{{\partial u}}{{\partial r}} = \frac{{{a'_0} \left( r \right)}}{2} + \sum\limits_{n = 1}^\infty {\left[ {{a'_n} \left( r \right)\cos n\varphi + {b'_n} \left( r \right)\sin n\varphi } \right]} ,\]
\[\frac{{{\partial ^2}u}}{{\partial {r^2}}} = \frac{{{a^{\prime\prime}_0} \left( r \right)}}{2} + \sum\limits_{n = 1}^\infty {\left[ {{a^{\prime\prime}_n}\left( r \right)\cos n\varphi + {b^{\prime\prime}_n}\left( r \right)\sin n\varphi } \right]} ,\]
\[\frac{{\partial u}}{{\partial \varphi }} = \sum\limits_{n = 1}^\infty {\left[ { - {a_n}\left( r \right)n\sin n\varphi + {b_n}\left( r \right)n\cos n\varphi } \right]} ,\]
\[\frac{{{\partial ^2}u}}{{\partial {\varphi ^2}}} = \sum\limits_{n = 1}^\infty {\left[ { - {a_n}\left( r \right){n^2}\cos n\varphi - {b_n}\left( r \right){n^2}\sin n\varphi } \right]} .\]

Substituting this into the Laplace's equation yields

\[\frac{{{r^2}{a^{\prime\prime}_0}\left( r \right)}}{2} + \frac{{r{a'_0} \left( r \right)}}{2} + \sum\limits_{n = 1}^\infty {\Big[ {\Big( {{r^2}{a^{\prime\prime}_n}\left( r \right) + r{a'_n} \left( r \right) - {n^2}{a_n}\left( r \right)} \Big)\cos n\varphi }} + {\Big( {{r^2}{b^{\prime\prime}_n}\left( r \right) + r{b'_n} \left( r \right) - {n^2}{b_n}\left( r \right)} \Big)\sin n\varphi } \Big] = 0.\]

Since this expression is equal to zero for all \(r\) and \(\varphi,\) we conclude that

\[{r^2}{a^{\prime\prime}_n}\left( r \right) + r{a'_n} \left( r \right) - {n^2}{a_n}\left( r \right) = 0\;\; \text{for}\;\;n = 0,1,2,3, \ldots\]
\[{r^2}{b^{\prime\prime}_n}\left( r \right) + r{b'_n} \left( r \right) - {n^2}{b_n}\left( r \right) = 0\;\; \text{for}\;\;n = 1,2,3, \ldots \]

Thus, we have got the system of ODEs instead of the original PDE. (This method was proposed by Joseph Fourier in \(1822\)). It is important, that each ODE in the system can be solved independently.

We can check directly that the functions

\[{a_n}\left( r \right) = {a_n}\left( 1 \right){r^n},\;\; {b_n}\left( r \right) = {b_n}\left( 1 \right){r^n}\]

satisfy the last differential equations.

Here the constants \({a_n}\left( 1 \right)\) and \({b_n}\left( 1 \right)\) must be found from initial conditions to the ODEs. To get these initial conditions, we expand into Fourier series the function \(f\left( \varphi \right) = u\left( {1,\varphi } \right)\) defining the boundary conditions for the Laplace's equation. This yields:

\[f\left( \varphi \right) = \frac{{{\alpha _0}}}{2} + \sum\limits_{n = 1}^\infty {\left( {{\alpha _n}\cos n\varphi + {\beta _n}\sin n\varphi } \right)} = u\left( {1,\varphi } \right) = \frac{{{a_0}\left( 1 \right)}}{2} + \sum\limits_{n = 1}^\infty {\left[ {{a_n}\left( 1 \right)\cos n\varphi + {b_n}\left( 1 \right)\sin n\varphi } \right]} .\]

Equating coefficients of \({\cos n\varphi }\) and \({\sin n\varphi }\) in this expression, we obtain that

\[{a_n}\left( 1 \right) = {\alpha _n},\;\; n = 0,1,2,3, \ldots\]
\[{b_n}\left( 1 \right) = {\beta_n},\;\; n = 1,2,3, \ldots\]

Hence, the system of ODEs has solutions

\[{a_n}\left( r \right) = {\alpha _n}{r^n},\;\;{b_n}\left( r \right) = {\beta _n}{r^n}.\]

Thus, the solution to the Laplace's equation is given by

\[u\left( {r,\varphi } \right) = \frac{{{\alpha _0}}}{2} + \sum\limits_{n = 1}^\infty {{r^n}\left( {{\alpha _n}\cos n\varphi + {\beta _n}\sin n\varphi } \right)} ,\]

where \({{\alpha _n}},\) \({{\beta_n}}\) are known numbers defined by the boundary conditions.

We can simplify this answer. Substitute the explicit expressions for the coefficients \({{\alpha _n}},\) \({{\beta_n}}:\)

\[u\left( {r,\varphi } \right) = \frac{1}{\pi }\int\limits_{ - \pi }^\pi {f\left( t \right)\left[ {\frac{1}{2} + \sum\limits_{n = 1}^\infty {{r^n}\Big( {\cos nt\cos n\varphi + \sin nt\sin n\varphi } \Big)} } \right]dt}.\]

Notice that

\[\cos nt\cos n\varphi + \sin nt\sin n\varphi = \cos n\left( {t - \varphi } \right).\]

Therefore,

\[u\left( {r,\varphi } \right) = \frac{1}{{2\pi }}\int\limits_{ - \pi }^\pi {f\left( t \right)\left[ {1 + 2\sum\limits_{n = 1}^\infty {{r^n}\cos n\left( {t - \varphi } \right)} } \right]dt }.\]

One can show that using the formula \(\cos x = {\frac{{{e^{ix}} + {e^{ - ix}}}}{2}},\) the term in the square brackets reduces to the infinite geometric series whose sum is

\[1 + 2\sum\limits_{n = 1}^\infty {{r^n}\cos n\left( {t - \varphi } \right)} = \frac{{1 - {r^2}}}{{1 - 2r\cos \left( {t - \varphi } \right) + {r^2}}}.\]

Then the answer is given by

\[u\left( {r,\varphi } \right) = \frac{1}{{2\pi }}\int\limits_{ - \pi }^\pi {f\left( t \right) \frac{{1 - {r^2}}}{{1 - 2r\cos \left( {t - \varphi } \right) + {r^2}}}dt}.\]

The last expression is called Poisson's integral for the unit circle.

Page 1 Page 2