Beruflich Dokumente
Kultur Dokumente
Section 4
Fourier series
4.1 Preliminary definitions
Definition: Periodic function
A function f (x) is said to be periodic, with period p if, for all x, f (x + p) = f (x) where p
is a positive constant.
For example, sin(x) is periodic with period 2π. We can construct periodic functions such
as
x, 0≤x≤`
f (x) = , f (x + 2`) = f (x).
0, −` ≤ x < 0
This defines a periodic function with period 2`
y
x
−5` −4` −3` −2` −` ` 2` 3` 4`
Figure 4.1 An example of a periodic function.
x
a b
Proof of (4.1)
For m 6= n, use the relation
nπ mπ 1 n π π o
sin x sin x = cos (m − n) x − cos (m + n) x .
` ` 2 ` `
So, the integral becomes
1 `n
Z
π π o
cos (m − n) x − cos (m + n) x dx =
2 −` ` `
`
1 ` π ` π
sin (m − n) x − sin (m + n) x = 0.
2 (m − n)π ` (m + n)π ` −`
The proof of (4.2) is analogous. for m 6= n, we use
nπ mπ 1 n π π o
cos x cos x = cos (m − n) x + cos (m + n) x
` ` 2 ` `
etc.
Note that the cos and sin functions are also orthogonal to each other
Z ` nπ mπ
cos x sin x dx = 0 , for all m, n. (4.3)
−` ` `
MAGIC058 & MATH64062: Partial Differential Equations 3
Heuristic proof Remember, the set of functions {cos(nπx/`)} is orthogonal on the in-
terval [−`, `]. Multiplying (4.7) by cos(mπx/`) and integrating (with respect to x) over
the range −` to ` we have
Z ` mπ Z `
1 mπ
f (x) cos x dx = a0 cos x dx
−` ` 2 −` `
X ∞ Z ` nπ mπ Z ` nπ mπ
+ an cos x cos x dx + bn sin x cos x dx ,
n=1 −` ` ` −` ` `
where we have assumed that the orders of summation and integration can be interchanged.
Note that the m = 0 case is different from the other integrals in (4.2), which is why the
factor 1/2 is required in (4.7). Then, using (4.2) and (4.3), we deduce that
Z ` mπ
f (x) cos x dx = `am , m = 0, 1, 2, . . . .
−` `
Similarly, multiplying (4.7) by sin(mπx/`) and integrating over the range −` to `, we have
Z ` mπ Z `
1 mπ
f (x) sin x dx = a0 sin x dx
−` ` 2 −` `
X ∞ Z ` nπ mπ Z ` nπ mπ
+ an cos x sin x dx + bn sin x sin x dx .
n=1 −` ` ` −` ` `
MAGIC058 & MATH64062: Partial Differential Equations 4
Note that, throughout the above work, we have assumed that it is OK to interchange the
order of summation and integration. In fact, this is only valid if the sum on the right hand
side of (4.7) converges uniformly to f (x).
Example
Find the Fourier series representation of the function defined by
Z ` mπ
f (x) sin x dx = `bm , m = 0, 1, 2, . . . .
−` `
x, 0≤x<`
f (x) = , f (x + 2`) = f (x).
0, −` ≤ x < 0
The Fourier coefficients are given by
Z `
1 `
a0 = xdx = ,
` 0 2
1
Z ` nπ
1 `x nπ ` 1
Z ` nπ
an = x cos x dx = sin x − sin x dx
` 0 ` ` nπ ` 0 nπ 0 `
` `
= 2
{cos(nπ) − 1} =⇒ an = {(−1)n − 1} ,
(nπ) (nπ)2
1
Z ` nπ 1
`x nπ ` 1
Z ` nπ
bn = x sin x dx = − cos x + cos x dx
` 0 ` ` nπ ` 0 nπ 0 `
` `(−1)n
=− cos(nπ) =⇒ bn = − .
nπ nπ
Thus, at a point of continuity
∞ nπ (−1)n nπ
` `X 1 n
f (x) = + {(−1) − 1} cos x − sin x ,
4 π n=1 πn2 ` n `
but
n −2 for n = 1, 3, 5, . . . ,
{(−1) − 1} =
0 for n = 2, 4, 6, . . . ,
so we can rearrange the series into the form
∞
(−1)n
nπ
` `X 2 (2n − 1)π
f (x) = − cos x + sin x .
4 π n=1 π(2n − 1)2 ` n `
MAGIC058 & MATH64062: Partial Differential Equations 5
x
−5` −4` −3` −2` −` ` 2` 3` 4`
Figure 4.3 An example of a periodic function.
This is the Fourier series representation for f (x) as sketched above. Note, at a point of
discontinuity (i.e. at x = ±`, ±3`, . . .) the sum converges to `/2. (Proof left to reader.)
Points to remember
(i) The Dirichlet conditions are sufficient but not necessary for the Fourier series to
converge to f (x) at a point of continuity. There are functions, which we may come
across, which are not Dirichlet but do have Fourier series representations.
(ii) In the above example, the given function is periodic. If the given function is defined
on the interval [−`, `] only, then the Fourier series representation is equal to f (x) on
this interval and defines a periodic extension of f (x) for all x.
(iii) In the above example, the given function is defined on the full range [−`, `] and
is neither even or odd on this interval. Thus, we need the full range Fourier series
to represent this function. However, if a function is either even of odd then (4.7)
reduces to a half-range Fourier series.
2 `
Z nπ
an = f (x) cos x dx , bn = 0. (4.8)
` 0 `
Thus, the Fourier series representation for an even function contains no sine terms.
Alternatively, if f (x) is odd, then f (x) cos(nπx/`) is odd and f (x) sin(nπx/`) is even.
Hence, (4.4) and (4.5) reduce to
2 `
Z nπ
an = 0 , bn = f (x) sin x dx. (4.9)
` 0 `
The Fourier series representation of an odd function contains no cosine terms.
So, if we are given a function, f (x), which is defined only on the half-range interval
[0, `], then we can use the above information to construct both an even and odd periodic
extension to f (x) for all x. This is what we did in section 3 for the plucked string.
MAGIC058 & MATH64062: Partial Differential Equations 6
Example
Obtain the half-range (a) cosine series and (b) sine series for the function
f (x) = x 0 ≤ x < `.
Z `
2 nπ
an = x cos
x dx
` 0 `
2 x` nπ ` 2
Z ` nπ
= sin x − sin x dx
` nπ ` 0 nπ 0 `
−2 −` nπ ` 2`
= cos x = [cos(nπ) − 1],
nπ nπ ` 0 (nπ)2
and therefore
2`
an = ((−1)n − 1) for n = 1, 2, 3, . . . .
(nπ)2
For the case n = 0,
` `
2 x2
Z
2
a0 = xdx = = `,
` 0 ` 2 0
and so (4.7) becomes
∞
` 2` X (−1)n − 1 nπ
f (x) = + 2 cos x ,
2 π n=1 n2 `
x
−5` −4` −3` −2` −` ` 2` 3` 4`
Figure 4.4 An example of an even periodic extension of a function.
MAGIC058 & MATH64062: Partial Differential Equations 7
x
−5` −4` −3` −2` −` ` 2` 3` 4`
Both (4.10) and (4.11) represent the function f (x) = x on the interval [0, `]. On the
extension 0 − ` < x < 0, (4.10) and (4.11) are different as shown.
Important note: the series (4.10) converges much more rapidly (as 1/n2 ) than (4.11)
(as (−1)n /n). Why is this?
Finally, we can note that in (4.10), if we put x = 0 then we get
∞
` 4` X 1
0= − 2 ,
2 π n=1 (2n − 1)2
or
∞
X 1 π2
= ,
n=1
(2n − 1)2 8
so
∞
1 1 1 X (−1)n+1 π
1 − + − + ... = = .
3 5 7 n=1
2n − 1 4
There are many infinite series which may be determined by this means.
Proof
On the interval [−`, `], we have
∞
a0 X nπ nπ
f (x) = + an cos x + bn sin x .
2 n=1
` `
since the integrals inside the sum equate to `an and `bn .
Parseval’s identity is simpler if f (x) is even:
` ∞
a20 X 2
Z
2
{f (x)}2 dx = + an , (4.13)
` 0 2 n=1
or if f (x) is odd:
Z ` ∞
2 2
X
{f (x)} dx = b2n . (4.14)
` 0 n=1
Example
Take the Fourier series example we used previously, i.e.
∞
2 1 16 X 1
= + 4
3 2 π n=1 (2n − 1)4
or
∞
X 1 π4
= .
n=1
(2n − 1)4 96
A final note on the theory of Fourier series is that the Fourier series representation (4.7)
can be differentiated to obtain a Fourier series representation for a new function f 0 (x) as
long as the sum converges for all x (see example sheet).
∂u
∂y
=0
Figure 4.6 A slab that is insulated on the top and bottom surfaces.
Then, no heat flows in the y-direction, and throughout the bar ∂/∂y = 0. Thus, (4.15)
becomes
∂u ∂ 2u
=ν 2, (4.16)
∂t ∂x
MAGIC058 & MATH64062: Partial Differential Equations 10
Similarly, on the vertical faces, either the temperature is specified (as function of y), or it
is insulated (∂u/∂x = 0).
Example
A bar of length ` has initial temperature distribution u(x, 0) = f (x). The faces at x = 0
and x = ` are maintained at zero temperature. Find the temperature distribution in the
bar for t > 0. The boundary value problem is written as
∂u ∂ 2u
= ν 2,
∂t ∂x
with
u(0, t) = u(`, t) = 0 ,
u(x, 0) = f (x) .
X(0) = C = 0 ,
Example
A rectangular plate, length a and breadth b, has insulated faces. Three edges are held at
zero temperature whilst the fourth (on u = 0) has temperature u(x, 0) = f (x). Determine
the steady state temperature distribution in the plate.
u=0
y
b u=0
u=0 ∇2 u = 0
x
a
u = f (x)
Figure 4.7 A slab that in insulated on all faces with an initial temperature
distribution on the bottom face.
∂ 2u ∂ 2u
+ =0
∂x2 ∂y 2
along with
(i) u(0, y) = 0 ,
(ii) u(a, y) = 0 ,
(iii) u(x, b) = 0 ,
(iv) u(x, 0) = f (x) .
X 00 Y 00
= −λ2 = − .
X Y
Note that we choose the parameter to be −λ2 (as before) for reasons that will be clear
soon. In this case X(x) is periodic but Y (y) is not. We have the following two ODEs,
u(0, y) = 0 =⇒ X(0) = 0 =⇒ A = 0 ,
We finally use the last boundary condition to determine the coefficients An . Thus, condi-
tion (iv) gives
X∞ nπ
u(x, 0) = An sin x = f (x)
n=1
a
MAGIC058 & MATH64062: Partial Differential Equations 14
2 a
Z nπ 2u0
An = u0 sin x dx = (1 − (−1)n ) .
a 0 a nπ
So, the solution of the boundary value problem is
∞ nπ
2u0 X 1 sin x nπ
u(x, y) = (1 − (−1)n ) a
nπ
sinh (b − y) ,
π n=1 n sinh a
b a
I. D. Abrahams