# Calculus

Fourier Series# Applications of Fourier Series to Differential Equations

Problems 1-2

Problems 3-5

Fourier theory was initially invented to solve certain differential equations. Therefore, it is of no surprise that Fourier series are widely used for seeking solutions to various ordinary differential equations (ODEs) and partial differential equations (PDEs).

In this section, we consider applications of Fourier series to the solution of ODEs and the most well-known PDEs:

- the heat equation \({\large\frac{{\partial u}}{{\partial t}}\normalsize} = k{\large\frac{{{\partial ^2}u}}{{\partial {x^2}}}\normalsize};\)
- the wave equation \({\large\frac{{{\partial ^2}u}}{{\partial {t^2}}}\normalsize} = {a^2}{\large\frac{{{\partial ^2}u}}{{\partial {x^2}}}\normalsize};\)
- Laplace’s equation \({\large\frac{{{\partial ^2}u}}{{\partial {x^2}}}\normalsize} + {\large\frac{{{\partial ^2}u}}{{\partial {y^2}}}\normalsize} = 0.\)

## Solved Problems

Click on problem description to see solution.

### ✓ Example 1

Find the Fourier series solution to the differential equation \(y^{\prime\prime} + 2y = 3x\) with the boundary conditions \(y\left( 0 \right) =\) \( y\left( 1 \right) \) \(= 0.\)

### ✓ Example 2

Find the periodic solutions of the differential equation \(y’ + ky = f\left( x \right),\) where \(k\) is a constant and \(f\left( x \right)\) is a \(2\pi\)-periodic function.

### ✓ 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).\)

### ✓ 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}}},\;\;}\kern-0.3pt{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),\;\;}\kern0pt{\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.}\]

### ✓ 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).\]

### Example 1.

Find the Fourier series solution to the differential equation \(y^{\prime\prime} + 2y = 3x\) with the boundary conditions \(y\left( 0 \right) =\) \( y\left( 1 \right) \) \(= 0.\)

*Solution.*

We will use the Fourier sine series for representation of the nonhomogeneous solution to satisfy the boundary conditions. Using the results of Example 3 on the page Definition of Fourier Series and Typical Examples, we can write the right side of the equation as the series

\[{3x }={ \frac{6}{\pi }\sum\limits_{n = 1}^\infty {\frac{{{{\left( { – 1} \right)}^{n + 1}}}}{n}\sin n\pi x} .}\]
We assume that the solution has the form

\[y\left( x \right) = \sum\limits_{n = 1}^\infty {{b_n}\sin n\pi x} .\]
Substituting this into the differential equation, we get

\[

{\sum\limits_{n = 1}^\infty {\left( { – {n^2}{\pi ^2}} \right){b_n}\sin n\pi x} }+{ 2\sum\limits_{n = 1}^\infty {{b_n}\sin n\pi x} }

= {\frac{6}{\pi }\sum\limits_{n = 1}^\infty {\frac{{{{\left( { – 1} \right)}^{n + 1}}}}{n}\sin n\pi x} .}

\]
Since the coefficients of each sine mode must be equal to each other, we obtain the algebraic equation

\[

{\left( {2 – {n^2}{\pi ^2}} \right){b_n} = \frac{{6{{\left( { – 1} \right)}^{n + 1}}}}{{n\pi }}\;\;}\kern-0.3pt

{\text{or}\;\;{b_n} = \frac{{6{{\left( { – 1} \right)}^{n + 1}}}}{{n\pi \left( {2 – {n^2}{\pi ^2}} \right)}}.}

\]
Hence, the solution of the given differential equation is described by the series

\[{y\left( x \right) \text{ = }}\kern0pt{ \frac{6}{\pi }\sum\limits_{n = 1}^\infty {\frac{{{{\left( { – 1} \right)}^{n + 1}}}}{{n\left( {2 – {n^2}{\pi ^2}} \right)}}\sin n\pi x} .}\]

### Example 2.

Find the periodic solutions of the differential equation \(y’ + ky = f\left( x \right),\) where \(k\) is a constant and \(f\left( x \right)\) is a \(2\pi\)-periodic function.

*Solution.*

We represent the function \(f\left( x \right)\) on the right-hand side of the equation as a Fourier series:

\[f\left( x \right) = \sum\limits_{n = – \infty }^\infty {{c_n}{e^{inx}}} .\]
The complex Fourier coefficients are defined by the formula

\[{c_n} = \frac{1}{{2\pi }}\int\limits_{ – \pi }^\pi {f\left( x \right){e^{ – inx}}dx} .\]
Assuming that the solution can be represented as a Fourier series expansion

\[y = \sum\limits_{n = – \infty }^\infty {{y_n}{e^{inx}}} ,\]
we find the expression for the derivative:

\[y’ = \sum\limits_{n = – \infty }^\infty {in{y_n}{e^{inx}}} .\]
Substituting this into the differential equation, we get

\[{\sum\limits_{n = – \infty }^\infty {in{y_n}{e^{inx}}} }+{ k\sum\limits_{n = – \infty }^\infty {{y_n}{e^{inx}}} }={ \sum\limits_{n = – \infty }^\infty {{c_n}{e^{inx}}} .}\]
As this equation is valid for all \(n,\) we obtain

\[{in{y_n} + k{y_n} = {c_n}\;\;}\kern-0.3pt{\text{or}\;\;{y_n} = \frac{{{c_n}}}{{in + k}}.}\]
Here \({c_n}\) and \(k\) are known numbers. Consequently, the solution is given by

\[y\left( x \right) = \sum\limits_{n = – \infty }^\infty {\frac{{{c_n}}}{{in + k}}{e^{inx}}} .\]

Problems 1-2

Problems 3-5

### Related Pages

- Definition of Fourier Series and Typical Examples
- Complex Form of Fourier Series
- Topics in Differential Equations
- Linear Differential Equations of First Order
- Second Order Linear Nonhomogeneous Differential Equations with Constant Coefficients
- Multivariable Functions
- Two-Dimensional Coordinate System
- Addition and Subtraction Formulas