Vous êtes sur la page 1sur 52

Lecture Notes on

Computational and Applied Mathematics


(MAT 3310, 3 units)

Academic year 2009/2010: second term

Prepared by
Jun ZOU (2006)a and Patrick CIARLET (2010)b

We have prepared the lecture notes purely for the convenience of our teaching. We gratefully
acknowledge the contribution of Prof. I-Liang CHERN (National Taiwan University, Taipei, Taiwan),
made during his visit to the Dept of Mathematics of CUHK in 2009.
a
Department of Mathematics, The Chinese University of Hong Kong, Shatin, N.T., Hong Kong
b
Dept of Applied Mathematics, Ecole Nationale Superieure de Techniques Avancees, Paris, France

At some locations, we put the symbol .


This corresponds to paragraphs that may
be omitted in a first reading.

Time-dependent problems and Fourier expansions

In this chapter, we shall build a new mathematical model, made up of a differential


equation, together with boundary and initial conditions. Indeed, we consider here the
change over time of the temperature inside a rod, so there is a time variable t, in
addition to the usual space variable x. The initial condition thus accounts for the
original configuration of the temperature distribution over the rod. As usual, since this
model originates from physical considerations, we shall begin by some proper derivation,
which relies on the principle of conservation of energy.
Then, we build the corresponding variational formulation of the problem. After that,
we propose some approximation, based on the finite element method for the approximation in space, and on the finite difference method for the approximation in time.
We also consider another approach to solve this problem, which is based on Fourier
series. Among others, it allows us to re-investigate the notion of infinite dimensional
functional vector spaces.

4.1

Modeling heat conduction in a bar

Consider a (continuous) rod53 of length ` and cross sectional area a, which rests horizontally.

Figure 4.1: A sample rod.

4.1.1

The heat equation

We want to model heat conduction in the rod. Set-up an x-axis along the rod. The
conduction process is described by a temperature function (x, t) 7 u(x, t). Here, x is
the space variable, x [0, `], and t is the time variable. The variation of temperature in
space generates a heat flux54 , called q(x, t). In general, a flux is oriented : it is a vector
53
54

The rod is very thin, in the sense that its length is much bigger than its cross-section.
The heat flux is the amount of energy that flows through a surface per unit area per unit time.

83

quantity. So, by convention, if q is positive, we consider from now on there is a flux from
left to right (see figure 4.2).

q >0

q<0
or

Figure 4.2: Convention: orientation of vector flux and corresponding sign.


Joseph Fourier provided in his Theorie analytique de la chaleur treatise (1822), an
empirical law of the heat flux, which can be described as:
q =

u
,
x

(4.1)

where > 0 is called the heat conductivity. It is a material dependent parameter. This
empirical law is called Fouriers law. Note that there is a minus sign, due to the fact
that the heat flows from high temperature regions to low temperature regions (this is
the second law of thermodynamics, as stated by Rudolf Clausius in 1850). Finally, since
u is a function of both x and t, one considers the partial derivative with respect to x in
(4.1).
In the absence of external heat sources or sinks, the internal energy density h(x, t)
is linearly proportional to the temperature:
h = cv u,
where cv > 0 is called the specific heat.
The heat conduction model is based on the principle of the conservation of energy
described below. Let us consider an arbitrary portion of the rod, , which corresponds
to x [x , x+ ]. The internal energy in is equal to
Z x+
a
cv u(, t) dx.
x

Its rate of change with respect to time is equal to


Z x+

d
a
cv u(, t) dx .
dt
x
Then, in the absence of external heat sources or sinks, the variation of energy in must
be the same as the heat flux through its extremities, located at x = x and x = x+ . Its
84

is thus given by the following contribution55 :



a (q(x+ ) + q(x )) = a


u
u
(x+ )
(x ) .
x
x

Thus, the conservation of energy states that




Z x+

u
d
u
cv u(, t) dx =
(x+ )
(x ) .
dt
x
x
x
Let us reformulate this equality. The left-hand side writes simply
 Z x+
 Z x+
u
d
cv (, t) dx,
cv u(, t) dx =
dt
t
x
x
whereas the right-hand side can be written


Z x+ 2
u
u
u
(x+ )
(x ) =
(, t) dx.

2
x
x
x x
We thus obtain that

x+



2u
u
cv
2 (, t)dx = 0.
t
x

This is valid for any arbitrary domain and any time t. Hence, we get the heat equation
u
2u
(x, t) 2 (x, t) = 0 0 < x < `, t.
t
x

(4.2)

Here, = /cv > 0 is the thermal diffusivity.


Finally, if there is some internal heat generation process that occurs inside the rod,
it is usually modeled with the help of a right-hand side f (x, t) that takes positive values.
In this case, the heat equation writes
u
2u
(x, t) 2 (x, t) = f (x, t) 0 < x < `, t.
t
x
4.1.2

(4.3)

Boundary conditions

In the case of the heat conduction in the rod, we are interested in the boundary conditions
at its endpoints, located at x = 0 and x = `.
There are three kinds of boundary conditions for this model:
55

Recall that if q is positive, then there is a flow from left to right. So, at x = x+ , if the flow is
positive (resp. negative), it contributes to a decrease (resp. an increase) of the energy in . This is the
reverse at x = x ...

85

Dirichlet boundary condition: u(x, t) = g(x), x {0, `}, for all t. This means that
the rod is attached to an environment (a heat bed), whose temperature is given
by g(x) at the endpoints.
Neumann boundary condition: u/x(x, t) = 0, x {0, `}, for all t. This means
that there is no heat flux on the boundary. In other word, the domain is insulated.
We may also impose u/x(`, t) = h(`) or u/x(0, t) = h(0), for all t, for some
positive function h. This means that we inject internal energy into the rod with
rate proportional to h. The change of sign is once more due to the convention on
the positiveness of the flow.
Robin boundary condition: u/x(`, t) = (g(`) u(`, t)), or u/x(0, t) =
(g(0) u(0, t)), for all t. Here, > 0 is a constant. This means that the
difference of u and its surrounding temperature g generates a heat flux, with a
rate that is linearly proportional to this difference. When u(x, t) on the boundary
is greater than its surrounding temperature g(x), then the heat flows outward the
rod. On the contrary, when u(x, t) on the boundary is smaller than its surrounding
temperature g(x), then the heat flows into the rod. This is consistent with the
second law of thermodynamics.
Finally, one can imagine any combination between the three kinds of boundary conditions
at the two endpoints that make up the boundary of the rod.
4.1.3

Initial Condition

To be able to determine the temperature at time t, we have to start from a given


temperature distribution at an earlier time t0 < t56 . In general, we shall assume that
the temperature distribution is known at the initial time t = 0. Let us denote it by
u0 (x), for x [0, `]. The initial condition writes simply
u(x, 0) = u0 (x) 0 x `.
56

(4.4)

Indeed, we could integrate formally the heat equation (4.3) in time, to find for any x [0, `]:

Z t 2
u
u(x, t) = u(x, t0 ) +
2 + f (x, ) dt.
x
t0

If we were dealing with a second order in time equation, we would integrate twice in time, and so need
another condition to determine the value of u/t(x, t0 )...

86

4.1.4

Initial boundary value problem

The mathematical formulation for heat conduction is thus to find a solution u(x, t)
which satisfies (4.2) (or (4.3)), one of the above boundary conditions, and finally the
initial condition (4.4). In particular, the data are f (x, t) (heat equation), u0 (x) (initial
condition) and g(x) or h(x) (boundary condition). The parameters and possibly
come from the model.

4.2

Variational formulation

To fix ideas, let us consider that the temperature solves the initial boundary value
problem below:
2u
u
(x, t) 2 (x, t) = f (x, t)
t
x
u(x, t) = 0
u(x, 0) = u0 (x)

0 < x < 1, t > 0

(4.5)

x {0, 1}, t > 0

(4.6)

0 x 1.

(4.7)

Remark 4.1. We note here that this corresponds to a surrounding environment with
0 temperature! Actually, one can also consider that the surrounding environment has a
fixed temperature us > 0, and that, if we denote the actual temperature in the rod by
urod (x, t), we solve the initial boundary value problem with unknown u(x, t) = urod (x, t)
us , after replacing the initial data urod,0 (x) by u0 (x) = urod,0 (x) us .
To derive the variational formulation, let us proceed as in chapter 2. So, we multiply
both sides of equation (4.5) by an arbitrary57 test function v(x) satisfying v |x=0 = 0 and
v |x=1 = 0, and we integrate over ]0, 1[ in space:

Z 1
Z 1
2u
u
(, t) 2 (, t) v dx =
f (, t)v dx t > 0.
t
x
0
0
To remove the second order derivative term, we integrate by parts. According to the
boundary conditions prescribed for the test function at x = 0 and x = 1, we find
Z 1
Z 1
Z 1
u
u
dv
(, t)v dx +
(, t) dx =
f (, t)v dx t > 0.
(4.8)
x
dx
0 t
0
0
Since the test function v(x) is independent of t, we can further replace the first term by
Z 1

d
u(, t)v dx .
dt
0
57

The test function v is independent of the time variable t.

87

Let us denote by V 00 the set of functions with homogeneous Dirichlet boundary conditions at x = 0 and x = 1. The above computation lead58 to the variational formulation,
or weak formulation, of the initial boundary value problem (4.5)-(4.7):
Find u with u(, t) V 00 , for t > 0, such that
Z 1
 Z 1
Z 1
d
u
dv
u(, t)v dx +
(, t) dx =
f (, t)v dx v V 00 , t > 0 (4.9)
dt
x
dx
0
0
0
u(x, 0) = u0 (x) 0 x 1.
As usual, one can go back from this variational formulation to the original initial boundary value problem. First, one notes that the boundary conditions (4.6) satisfied by u(, t)
at the endpoints follow from the definition of the functional space V 00 . Then, the initial
condition (4.7) is also included in the variational formulation (4.9). Finally, to recover
(4.5), one performs computations the other way around, replacing the first term and
then integrating by parts the second term to find, for all v V 00 and all t > 0:

Z 1
u
2u
(, t) 2 (, t) f (, t) v dx = 0.
t
x
0
As in chapter 2, using some density property in the functional space V 00 , we conclude
that the heat equation (4.5) holds. So, we have derived the result below.

Theorem 4.1. The initial boundary value problem (4.5)-(4.7) is equivalent to the variational formulation (4.9).
To prove existence of the solution, some ideas will be given later on, using the completeness of the Fourier series. However, we can already prove uniqueness of the solution as
follows. It is based on the energy equality below.
Lemma 4.1. There holds, for all s > 0,
1
2

Z
0

2
u
u (, s) dx +

dxdt =
x
0
0
Z sZ 1
Z
1 1 2
f u dxdt +
u dx.
2 0 0
0
0
2

Z sZ

58

(4.10)

Find the variational formulations corresponding to the case of a Dirichlet boundary condition at
x = 0, and either a Neumann or a Robin boundary condition at x = 1.

88

Proof. Proceeding with care, we can use, at all times t, u(, t) as a test function in (4.9).
On the one hand, it is a function of x only, and moreover it belongs to V 00 . On the
other hand, this test function is a function of both the space and time variables, so the
first term must remain as it appears in (4.8). We get
1

Z
0

u
(, t)u(, t) dx +
t

u
x

2

Z
(, t) dx =

f (, t)u(, t) dx.
0

The first term is nothing else than


1d
2 dt

Z

u (, t) dx ,
0

so, if we integrate over time for t ]0, s[ and if we use the initial condition, we reach
1
2

Z
0

1
u (, s) dx
2
2

Z
0

u20

Z sZ
dx +

u
x

2

Z sZ
dxdt =

f u dxdt,
0

which is exactly (4.10).


Uniqueness of the solution follows. Indeed, considering two solutions u1 (x, t) and
u2 (x, t), we see first that we have by linearity:
Z 1
Z 1
(u1 u2 )
dv
(u1 u2 )
(, t)v dx +

(, t) dx = 0 v V 00 , t > 0
t
x
dx
0
0
(u1 u2 )(x, 0) = 0 0 x 1.
Using the same ideas as in the proof of the energy equality, we find that, for all s > 0:
2
Z
Z sZ 1 
1 1
(u1 u2 )
2
(u1 u2 ) (, s) dx +

dxdt = 0.
2 0
x
0
0
So, it follows that u1 (x, t) = u2 (x, t) for all x, and all t 0.

4.3

Approximation of the heat equation

To build a numerical method to solve the heat equation, we proceed into two steps. As a
matter of fact, both space- and time-derivatives are present in the initial boundary value
problem and in the variational formulation, so one has to provide two approximations.
We begin by the approximation in space with the finite element method, and carry on
with the approximation in time with the finite difference method.
89

4.3.1

The finite element method in space

We use a similar approximation technique as the one we developed in section 3.2. We


divide the interval [0, 1] into (N + 1) intervals [xi1 , xi ] of length hi := xi xi1 , for
i = 1, , N + 1. The mesh size h is defined by h := maxi=1, ,N +1 hi . We then build
the continuous piecewise linear finite element space of trial functions:
Vh = span {0 , 1 , , N +1 } ,
where the basis functions (i )i=0, ,N +1 are defined as before (see for instance figure 3.4).
According to the homogeneous Dirichlet boundary conditions, the approximate solution
uh (, t) (for all t 0), and the discrete test functions vh belong to the space


Vh00 = vh Vh : vh (0) = vh (1) = 0 = span {1 , , N }.
In other words, one can write
j=N

uh (x, t) =

Uj (t)j (x),

j=1

where the coefficients (Uj )j=1, ,N are functions of the time variable t.
One can then build the semi-approximate59 variational formulation as follows:
Find uh with uh (, t) Vh00 , for t 0, such that
Z 1
 Z 1
Z 1
d
uh
dvh
uh (, t)vh dx +

(, t)
dx =
f (, t)vh dx vh Vh00 , t > 0 (4.11)
dt
x
dx
0
0
0
uh (x, 0) = h (u0 )(x) 0 x 1.
To define an admissible initial condition, we introduce a map h from the functional
space to which u0 belongs into Vh00 , that allows us to approximate the initial value u0 .
For instance, we can consider the interpolation operator on the interior mesh points
h (v)(x) =

i=N
X

v(xi )i (x) 0 x 1.

i=1

In particular, it depends on the division of [0, 1] into intervals.


59

So far, we considered only the approximation in space, so the approximation process is unfinished.

90

Following section 3.2, we can then express the semi-approximate variational formulation
as N ordinary differential equations in time. To that aim, replace uh (x, t) by its expression and take vh = i in (4.11), for i = 1, , N . We obtain, for i = 1, , N and
t > 0:
# j=N Z
"j=N Z


Z 1
1
1
X
d X
0 0
j i dx Uj (t) =
f (, t)i dx.
j i dx Uj (t) +
dt j=1
0
0
0
j=1
Then, let us introduce:
~ (t) RN with components (Uj (t))j=1,N ;
U
Z 1
N
F~ (t) R with components Fi (t) :=
f (, t)i dx, for i = 1, , N ;
0

M RN N with entries Mij :=

j i dx, for i, j = 1, , N ;
0

N N

KR

Z
with entries Kij :=

0j 0i dx, for i, j = 1, , N .

Note that the matrices M and K are independent of the time variable. Indeed, they
depend only on the finite element method in space. The matrix M is called the mass
~ (t)
matrix, and the matrix K is called the stiffness matrix. By construction, the vector U
solves the N ordinary differential equations
~ 0 (t) + KU
~ (t) = F~ (t) t > 0.
MU
As in section 3.2, one can check that this system is equivalent to (4.11), middle line.
Also, both matrices M and K are symmetric positive definite.
Let us consider next the approximate initial condition. Simply, one introduces
~ 0 RN with components (U0 )i := h (u0 )(xi ), for i = 1, , N .
U
~ (0) = U
~ 0.
Then, the approximate initial condition is replaced by U
So we have proved that the semi-approximate variational formulation can be equivalently
rewritten as N ordinary differential equations in time.

91

Theorem 4.2. The semi-approximate variational formulation (4.11) is equivalent to


~ with U
~ (t) RN , for t 0, such that
Find U
~ 0 (t) + KU
~ (t) = F~ (t) t > 0
MU
~ (0) = U
~ 0.
U

(4.12)

Using finally the eigenvalues (m )m=1, ,N and eigenvectors (V~m )m=1, ,N of the generalized matrix eigenvalue problem 60
KV~ = MV~ ,
one can prove that the system (4.12) has one, and only one solution (and so does the
semi-approximate variational formulation (4.11)!). Indeed, it is well-known that one
can build a basis of RN , (V~m )m=1, ,N , made of eigenvectors of the generalized matrix
eigenvalue problem, which is in addition such that (MV~m , V~` )RN = 1 if m = `, and 0 else.
~ (t) as
Writing the vector U
~ (t) =
U

`=N
X

` (t)V~` ,

~ (t), V~` )RN , ` = 1, N,


with ` (t) := (MU

`=1

one finds that (m )m=1,N is the solution to


Find (m )m=1,N with m (t) such that, for m = 1, , N ,
0
m
(t) + m m (t) = (F~ (t), V~m )RN t > 0
~ 0 , V~m )RN .
m (0) = (MU

(4.13)

These N independent ordinary differential equations have the solutions61 , for s > 0,
Z s
m (s) = m (0) exp(m s) +
(F~ (t), V~m )RN exp(m (s t)) dt.
(4.14)
0

We conclude that (4.12) has one, and only one, solution


~ (t) =
U

m=N
X

m (t)V~m

with m (t) given by (4.14), m = 1, N.

m=1

Thus, the semi-approximate variational formulation (4.11) has one, and only one, solution.
60
61

This is possible as soon as M is symmetric positive definite, and K is symmetric...


Check this result.

92

4.3.2

The finite difference method in time

To solve numerically the N ODEs in (4.12), we use the finite difference method to
~ 0 (t)). So, let (tk )k0 be an
approximate the first order derivative in time (in our case, U
increasing sequence of discrete times, such as for instance tk = k4t for some timestep
~ k RN the approximation of U
~ (tk ), for k 0. In other
4t > 0. Let us denote by U
words, we expect that the ith component Uik is an approximation of Ui (tk ), which is
itself an approximation of the exact solution at position xi , and time tk . So, we write
Uik Ui (tk ) u(xi , tk ) i = 1, , N, k 0.
We recall that no approximation is needed at the endpoints x0 = 0 and xN +1 = 1, since
the value of the solution is known explicitly there (it is equal to 0 for the initial boundary
value problem (4.5)-(4.7)). As we saw in section 3.1, there are several choices, such as
forward differencing, backward differencing and centered differencing... Once this choice
is made, we can build the fully discretized numerical scheme.
We consider first the case of forward differencing at time t = tk : u0 (tk ) (u(tk+1 )
u(tk ))/4t, for k 0. The resulting approximation of (4.12) is simply
~ k )k0 with U
~ k RN , for t > 0, such that
Find (U
!
~ k+1 U
~k
U
~ k = F~ (tk ) k 0
+ KU
M
4t

(4.15)

~0 = U
~ 0.
U
Assuming that we know explicitly how to solve62 the linear system with matrix M, we
can write the explicit time-scheme, or Euler explicit scheme,
~ k+1 = U
~ k + 4t M1 (F~ (tk ) KU
~ k ) k 0.
U
This fully discretized numerical scheme can be first solved for k = 0, then k = 1, k = 2,
~ k , so in
etc. Obviously, we dont intend to compute an infinite sequence of vectors U
practice we fix a final time t = T , once and for all, and we compute the vectors for
k = 0, , K, where K := bT /4tc.
Ideally, we have computed M1 ... More realistically, we have an efficient solver for the linear system
~ MX
~ = G,
~ relying for instance in the Cholesky factorization.
in X:
62

93

Next, consider the case of backward differencing at time t = tk+1 : u0 (tk+1 )


(u(tk+1 ) u(tk ))/4t, for k + 1 1. This time, we find
~ k )k0 with U
~ k RN , for t > 0, such that
Find (U
!
~ k+1 U
~k
U
~ k+1 = F~ (tk+1 ) k 0
M
+ KU
4t

(4.16)

~0 = U
~ 0.
U
In this case, we can write the implicit time-scheme, or Euler implicit scheme,
~ k+1 = MU
~ k + 4t F~ (tk+1 ) k 0,
(M + 4t K)U
so we have now to solve linear systems with the matrix M + 4t K.
 Mixing the two previous schemes, we find, with a parameter [0, 1],
~ k )k0 with U
~ k RN , for t > 0, such that
Find (U
!
~ k+1 U
~k
U
~ k+1 + (1 )KU
~k
+ KU
M
4t
= F~ (tk+1 ) + (1 )F~ (tk ) k 0

(4.17)

~0 = U
~ 0.
U
These are called the -schemes. When = 0, we have the explicit scheme (4.15) and,
when = 1, we have the implicit scheme (4.16). To advance in time, one finds the
expression
~ k+1 = (M (1 )4t K)U
~ k + 4t F~ (tk+1 ) + (1 )4t F~ (tk ) k 0,
(M + 4t K)U
In the particular case where = 1/2, the scheme is called the Crank-Nikolson scheme.
Finally, to prove convergence in time and space of the fully discretized numerical
schemes, one has to have at hand mathematical tools that are too advanced for this
class...

4.4

Motivation of Fourier series: solving the heat equation on


a circle

In this section, we are going to present one of the most powerful analytical methods
Fourier series. We investigate Fouriers original approach, solving the heat equation in
94

the absence of source terms, on a circular rod.


We consider the heat equation on a circle:
u
2u
(x, t) 2 (x, t) = 0 x [0, 2], t > 0
t
x

(4.18)

with a matching condition, also called a periodic boundary condition


u(0, t) = u(2, t) t 0

(4.19)

and initial condition (see the change of notations)


u(x, 0) = f (x) x [0, 2].

(4.20)

The reason why we consider periodic boundary condition is for simplicity. The method
can also be extended to an arbitrary finite straight rod, with Dirichlet boundary condition or Neumann boundary condition.
Among others, Joseph Fourier made two important observations for this equation:
If we differentiate cos kx twice, we get the same cos kx:

d2
cos kx = k 2 cos kx.
dx2

Here, k belongs to R. If in addition we want that vk : x 7 cos kx fulfills63


the periodic boundary condition (4.19), that is 1 = cos 2k, then k belongs to Z.
Finally, since cos kx = cos(kx), we can restrict ourselves to k N. In modern
day language, vk (x) is an eigenvector of the differential operator d2 /dx2 over
]0, 2[ with periodic boundary condition, with corresponding eigenvalue k := k 2 .
Then, we can guess a solution to the heat equation, which looks like
u(x, t) = a(t) cos kx x [0, 2], t 0.
Namely, we assume here that the initial condition writes f (x) := a(0) cos kx.
Indeed, using this ansatz, we plug it into equation, to get
a0 (t) cos kx = k a(t) cos kx x [0, 2], t > 0.
63

This elementary discussion is of fundamental importance! Without boundary conditions, one ends
up with a continuum of eigenvalues. On the other hand, as soon as boundary conditions are added, the
set of eigenvalues becomes countable.

95

We can eliminate cos kx and find that a(t) satisfies


a0 (t) = k a(t) t > 0,

a(0) given.

This can be solved immediately:


a(t) = a(0)ek t .
Thus,
u(x, t) = a(0)ek t cos kx x [0, 2], t 0,
is a solution to the heat equation in this particular case. Similar conclusions can
be drawn with wk (x) := sin kx and k := k 2 , for k N \ {0} (obviously, sin 0x = 0
so k = 0 is not a relevant value!). We also have at hand solutions like
u(x, t) = b(0)ek t sin kx x [0, 2], t 0,
for any strictly positive integer k.
If we know two solutions u1 and u2 , then their linear combination is also a solution,
with the same linear combination of the initial conditions. This is because the
equation and the accompanying boundary and initial conditions are linear.
Combining these two observations, we immediately get that all functions
u(x, t) = a0 +

N 
 2
X
ak cos kx + bk sin kx ek t

x [0, 2], t 0,

k=1

are solutions of the heat equation on the circular rod. The corresponding initial data is
f (x) := a0 +

N
X

ak cos kx + bk sin kx x [0, 2].

k=1

P
The function a0 + N
k=1 ak cos kx + bk sin kx is called a trigonometric polynomial. Just
as in the case of Taylor series with which a nicely behaving function can be approximated by an infinite expansion of polynomial terms on an interval, we would also like
to approximate any 2-periodic function by Fourier series. In other words,

96

Question 1. Can any 2-periodic function be represented as a trigonometric series?


Regarding the initial condition (4.20), this writes
f (x) = a0 +


X


ak cos kx + bk sin kx
x [0, 2],

(4.21)

k=1

for some coefficients (ak )k0 and (bk )k>0 . The next question that comes to mind is: how
to find these coefficients? According to our previous computations, this provides a way
to find the actual solution to the heat equation on a circular rod!
Question 2. Does the function
u(x, t) = a0 +


X

 2
ak cos kx + bk sin kx ek t

x [0, 2], t 0,

(4.22)

k=1

solve the heat equation (4.18)-(4.20)?


This is a motivation to develop the theory of Fourier series. With this mathematical
tool, one obtains an elegant way for solving the heat equations... In what follows, we
shall focus mostly on addressing Question 1.
Notice that we have the following orthogonality relations for (cos kx)k0 and (sin kx)k>0 :

0
(

Z 2
Z 2
2 if k = k = 0
if k = k 0
.
sin kx sin k 0 x dx =
cos kx cos k 0 x dx =
if k = k 0 6= 0 ,

0 if k 6= k 0
0
0

0
0 if k 6= k
Furthermore, sin kx is always orthogonal to cos k 0 x:
Z 2
sin kx cos k 0 x dx = 0.
0

Thus, to find the coefficient am in the expansion of the initial condition, we formally
multiply (4.21) by cos mx and integrate64 from 0 to 2. Using the above orthogonality
properties, we see that all terms vanish, except the term involving am :
Z
Z 2
1 2
1
am =
f (x) cos mx dx m > 0,
a0 =
f (x) dx.
(4.23)
0
2 0
64

Note that it is similar to building a variational formulation, except that the form of the test functions
is known exactly here... The computations are formal, in the sense that we assume we can swap the
integral and the infinite summation.

97

For bm , we have
1
bm =

f (x) sin mx dx m > 0.

(4.24)

The above procedure is at least formally true. In fact, the exploration of Fourier
series opened the door of modern analysis. Before we introduce Fourier theory, let us
make some remarks on the essential keys to this theory. According to Euler, the two
key ingredients cos kx and sin kx can be combined together with the complex valued
ekx = cos kx + sin kx.
Within this complex valued framework, the very essential ingredients of Fourier series
are
1. For k Z, the function ekx is an eigenvector of the differential operator d2 /dx2
over ]0, 2[ with periodic boundary condition, with corresponding eigenvalue k :=
k2:

d2
2 ekx = k 2 ekx x R, and e2k = 1.
dx
2. The functions (ekx )kZ oscillate, and indeed they oscillate more and more as |k|
increases. They can be used to approximate any function with oscillation at any
scale.
3. The functions (ekx )kZ fulfill orthogonality relations 65 ! That is
(
Z 2
2 if k + k 0 = 0,
0
ekx ek x dx =
0 if k + k 0 6= 0.
0
In fact, for k + k 0 =
6 0,
Z 2

e(k+k )x dx =

h
ix=2
1
(k+k0 )x
e
= 0.
(k + k 0 )
x=0

On the other hand, one finds for k + k 0 = 0,


Z 2
Z
(k+k0 )x
e
dx =
0

dx = 2.

65

These will be expressed properly in 4.6.2, devoted to the complex Fourier series, with the help of
the complex inner product.

98

4.5

Fourier Series

We now explain elements of the theory of Fourier series.


4.5.1

Inner product function space

Let us learn some basic teminology about periodic functions.


Definition 4.1 (Periodic functions). A function g(x) is called a periodic function with
period d > 0 if
g(x + d) = g(x) x.
For example, ekx , cos kx and sin kx are all periodic functions with period 2. But
cos 2kx,

sin 2kx

are periodic functions with period 2 and also with period . Now suppose g(x) is a
function with period 2, i.e., g(x + 2) = g(x) x. In this case, the graph of g(x) in any
interval of length 2 will be repeated in its neighboring interval of length 2. Because
of the periodicity, we can consider any interval of length 2 for the Fourier expansions
(4.21), or (4.28) and (4.29) below. One often chooses [, ] or [0, 2].
In our subsequent discussions, we will always use the interval [, ].
Let us denote the space of real-valued 2-periodic functions by Vper . It is a vector space
over R. In Vper , we define the inner product
Z
f g dx.
(4.25)
(f, g)2 :=

One can check that it enjoys the following properties


1. (f, f )2 0 for all f Vper , and (f, f )2 = 0 implies66 f = 0;
2. (f, g)2 = (g, f )2 for all f, g Vper ;
3. (f1 + f2 , g)2 = (f1 , g)2 + (f2 , g)2 for all f1 , f2 , g Vper ;
4. (af, g)2 = a(f, g)2 for all f, g Vper , for all a R.
R
 More precisely, f 2 (x) dx = 0 implies that f (x) = 0 almost everywhere in [, ]. See 4.5.3
for details. So, from now on, f = 0 means that f (x) = 0 almost everywhere...
66

99

We can define the mean square norm 67 over Vper :


kf k2 :=

(f, f )2 .

We can see that the inner product satisfies the following Cauchy-Schwarz inequality:
|(f, g)2 | kf k2 kgk2

f, g Vper .

This is because
0 (f + tg, f + tg)2 = kf k22 + 2t(f, g)2 + t2 kgk22
for all t R. Therefore, we have a negative discriminant for the polynomial of degree 2
in t:
(f, g)22 kf k22 kgk22 0.
From this Cauchy-Schwarz inequality, it is natural to define the angle [0, ] between
two vectors f and g by
(f, g)2
cos :=
,
kf k2 kgk2
and along the same way orthogonality relations with respect to the inner product, when
cos = 0.
Definition 4.2 (Orthogonal functions). Two real-valued functions f (x) and g(x) are
said to be orthogonal on the interval [a, b] if the following holds
Z
(f, g)2 = 0, or equivalently

f g dx = 0.
a

According to Section 4.4, the following three sequences


(cos kx)k0 ,

(sin kx)k>0 ,

(cos kx)k0 (sin kx)k>0

are all orthogonal sequences of functions on [, ] (or [0, 2]).


67

This is indeed a norm, since


kf k2 = 0 implies f = 0 (in the sense of footnote66 );
kaf k2 = |a| kf k2 for all f Vper , for all a R;
kf + gk2 kf k2 + kgk2 for all f, g Vper .

The last property is actually a consequence of the Cauchy-Schwarz inequality proved below.

100

4.5.2

Completeness of Fourier series

We would like to provide an answer to Question 1. We consider first the trigonometric


functions
{1, cos x, sin x, cos 2x, sin 2x, , cos kx, sin kx, }.
(4.26)
Let us consider the space, for N N,
N
Vper

:= {F (x) = A0 +

N
X

(Ak cos kx + Bk sin kx), Ak , Bk R}.

k=1

It is the spaces of all trigonometric polynomials of order less or equal to N . For any 2
N
periodic function f of Vper , we measure the distance from f to Vper
by
min kf F k22 .

N
F Vper

This is equivalent to minimizing the functional E of R2N +1 :


Z

E(A0 , A1 , , AN , B1 , , BN ) :=

f (x) A0

N
X
2
(Ak cos kx + Bk sin kx) dx .
k=1

N
Let us introduce fN (x) Vper
the truncated Fourier series of order N
N
X
fN (x) = a0 +
(ak cos kx + bk sin kx),
k=1

where the coefficients (ak )k=0,N and (bk )k=1,N are respectively given by (4.23) and (4.24).
Then we claim that

N
Theorem 4.3. Let f Vper and N N. The best trigonometric approximation in Vper
of f in norm k k2 is its truncated Fourier series fN .

Proof. First, we remark that E goes to infinity when k(A0 , A1 , , AN , B1 , , BN )kR2N +1


goes to infinity68 . Moreover, E is a continuous function. So, according to theorem 2.1,
To see this, one uses the orthogonality relations, which ensure there is no cross-terms like Ak A0k or
Bk Bk0 for k 6= k 0 , and no terms like Ak Bk0 in the expression of E. So the only quadratic terms are A2k
1
and Bk2 , and they all come up with a strictly positive coefficient (either 2
or 1 ).
68

101

there is a minimum point. In addition, E is differentiable, so the minimum point is


st
st
st
st
a stationary point (see theorem 2.3): call it ABst := (Ast
0 , A1 , , AN , B1 , , BN ).
Then, for 1 k N ,
Z
N
X


E
st
st
f (x) A0
(ABst ) =2
(Ast
cos
kx
+
B
sin
kx)
cos kx dx
0=
k
k
Ak

k=1
Z


cos
kx
cos kx dx
=2
f (x) Ast
k

Z
f (x) cos kxdx 2Ast
=2
k.

Therefore

Z
1
=
f (x) cos kx dx = ak ,

according to (4.23). Similarly we have
Z
1
st
A0 =
f (x)dx = a0 ,
2
Ast
k

and, for 1 k N (see (4.24)),


Bkst

1
=

f (x) sin kx dx = bk .

There is only one stationary point, so it must be the minimum point!


Our second claim is:

Theorem 4.4. (Bessels inequality) Given a 2 periodic function f such that


Z
Z
f (x) cos kx dx,
f (x) sin kx dx, k > 0 exist for all k,
kf k2 < and

and given N 0, we have kfN k2 kf k2 for all N , where fN is the truncated Fourier
series of f of order N .
Proof. First, for any 0 k N , we have by using the orthogonality relations and the
definitions of the coefficients (4.23) and (4.24), that
Z
Z
Z

(4.23)

f (x) fN (x) cos kx dx =


f (x) cos kx dx
ak (cos kx)2 dx = 0 ,
Z
Z
Z


(4.24)

f (x) fN (x) sin kx dx =


f (x) sin kx dx
bk (sin kx)2 dx = 0 .

102

Taking the linear combination that defines the truncated Fourier series, this implies that
Z

(f fN , fN )2 =
f fN fN dx = 0.

Then, it follows that


kf k22 = k(f fN ) + fN k22 = kf fN k22 + 2(f fN , fN )2 + kfN k22
= kf fN k22 + kfN k22 kfN k22 .
This proves our claim.
In the same spirit, using the orthogonality relations, we have that (kf fN k2 )N is a
decreasing sequence. Indeed, let M > N , then:
kf fN k22 = k(f fM ) + (fM fN )k22 = kf fM k22 + 2(f fM , fM fN )2 + kfM fN k22 .
As before, we find that, for k M ,
Z

f (x) fM (x) cos kx dx = 0 ,
Z


f (x) fM (x) sin kx dx = 0 .

But (fM fN )(x) is a linear combination of the trigonometric polynomials of order


k M , so (f fM , fM fN )2 = 0. It follows that, for M > N , we have
kf fN k22 = kf fM k22 + kfM fN k22 kf fM k22 ,
that is kf fN k2 kf fM k2 .
Finally, we have by orthogonality that
kfN k22

a0 +

a20

(
2a20 +

N
X
k=1
N
X
k=1
k=N
X

(ak cos kx + bk sin kx)


a2k (cos kx)2

2

dx

b2k (sin kx)2

2

dx

)
(a2k + b2k ) .

k=1

So, it follows that the series

k0

a2k and

2
k>0 bk

103

both converge, when kf k2 < .

Corollary 4.1. Let f Vper .


Let (ak )k0 and (bk )k>0 be the coefficients of its truncated Fourier series, respectively given
P
P
by (4.23) and (4.24). Then the series k0 a2k and k>0 b2k converge.
Remark 4.2. To answer Question 1 properly, we need that limN kf fN k2 = 0.
In other words, the truncated Fourier series must capture the whole function f (x) in
the limit N . It is a simple matter to check that this is guaranteed if, and only if,
for all g Vper ,
Z
Z
g(x) cos kx dx = 0 k 0,
g(x) sin kx dx = 0 k > 0,

implies that g = 0 (almost everywhere). In that case, (cos kx)k0 (sin kx)k>0 is called
a complete family of Vper . Otherwise, there are some non-zero functions of Vper that are
orthogonal to all the trigonometric polynomials.
An interesting question is then to consider the opposite approach! Given (ak )k0 and
P
P
(bk )k>0 such that k0 a2k and k>0 b2k are (finitely) convergent, introduce the trigonometric polynomials
N
X
(ak cos kx + bk sin kx),
gN (x) := a0 +
k=1

for N 0. It is then worthwhile to consider the sequence (gN (x))N 0 . Indeed, following
the steps of the proof of Bessels inequality, we see that, for M > N ,
k=M
X

kgM gN k22 =

(a2k + b2k ).

k=N +1

P
P
In other words, since the series k0 a2k and k>0 b2k are (finitely) convergent, we have
that the sequence (gN (x))N 0 is a Cauchy sequence of Vper with respect to the norm
k k2 . To be able to answer positively Question 1, this sequence ought to converge
towards some (2 periodic) function g(x). Indeed, in this case, we can write
lim kg gN k2 = 0.

To summarize, having any Cauchy sequence of trigonometric polynomials with respect


to the norm k k2 , we want that it converges in Vper . Intuitively, we want that there are
104

no functions missing from this functional space69 . Therefore, we consider from now on
that the functional space Vper is defined as the completion of the set of trigonometric
N
polynomials N 0 Vper
with respect to the norm k k2 :
N
Vper := {f periodic over [, ], (PN )N , PN Vper
, lim kf PN k2 = 0}.
N

With this definition, and endowed with norm kk2 , Vper is a complete (or Cauchy) normed
vector space, where the inner product (4.25) is a scalar product. In other words, Vper is
a Hilbert space.
Our final claim, stated without proof (see the next subsection for details), is

Theorem 4.5. (Completeness of Fourier series) Given a function f of Vper , let


fN (x) be its truncated Fourier series of order N
N
X
(ak cos kx + bk sin kx),
fN (x) = a0 +
k=1

where the coefficients (ak )k=0,N and (bk )k=1,N are respectively given by (4.23) and (4.24).
Then we have, for x [, ],
f (x) = lim fN (x) = a0 +
N

(ak cos kx + bk sin kx).

(4.27)

k=1

Briefly, to solve Question 2, one needs to justify differentiation with respect to x and
to t in the Fourier series. This can be addressed using tools that are similar to the ones
we discussed in this subsection.
4.5.3

 Additional comments

Let us give a few additional details concerning the completion of the trigonometric
polynomials, i.e. the functional space Vper .

We recall the fundamental example of the set of rational numbers Q. One has 2 R \ Q. But one

can build a sequence of rational numbers (qn )n0 that converges to 2 in R (take qn to be the decimal

expansion of 2 with n digits). So, (qn )n0 is a Cauchy sequence in Q, but it does not converge in

Q: 2 is a missing point of Q. They are many others... Classically, the set of real numbers R is the
completion of Q.
69

105

To begin with, one can prove that the space of periodic, continuous functions, which is
obviously a subspace of Vper , is dense in Vper with respect to the norm k k2 .
In addition, Vper now comprises square Riemann-integrable functions, but also bounded
functions with up to a countable number of discontinuities, such as the characteristic
function 1Q (which is not a square Riemann-integrable function!).
Actually, one can prove that Vper is equal to the set of Lebesgue-measurable functions f
R
defined over ], [, and such that ],[ |f |2 dx < , where dx is the Lebesgue measure:
one writes Vper := L2 (], [). It follows that (4.27) holds almost everywhere. Still, Vper
does not include all generalized functions: see subsection 4.7.3 dealing with the delta
function.
Second, let us consider an important result on the approximation of periodic, continuous
functions. To measure continuous functions defined over [, ], that is elements of
C 0 ([, ]), one introduces the uniform norm 70 : kf k := supx[,] |f (x)|.
Theorem 4.6. (Weierstrass) Given a continuous and 2 periodic function f ,
there exists a sequence of trigonometric polynomials (Pn )n0 which converges uniformly to f over [, ]:
lim kf Pn k = 0.
n

The above result does not state which sequence of trigonometric polynomials (Pn )n0
converges uniformly to f . As a matter of fact, the sequence (Pn )n0 is not equal to the
sequence of truncated Fourier series! In some sense, this was to be expected, since we are
considering here the uniform norm kk , whereas all the results concerning the truncated
Fourier series have been obtained for the mean square norm k k2 . Nevertheless, the
Weierstrass theorem is an important intermediate result to obtain the completeness of
the Fourier series. Indeed, we can finally prove theorem 4.5.
Proof. (of theorem 4.5). Let f Vper , and  > 0.
Step 1: according to the density of the space of periodic, continuous functions in Vper ,
there exists fc C 0 ([, ]), periodic, and such that kf fc k2 < /2.
Step 2: thanks to Weierstrass theorem, there exists a trigonometric polynomial PN such

that kfc Pn k < /(2 2).

Given any f C 0 ([, ]), check that kf k2 2 kf k . So, if a sequence converges in k k


norm, it must also converge in k k2 norm. But the converse assertion is not true...
70

106

Step 3: we know that kfc Pn k2

2 kfc Pn k , so it follows that

kf Pn k2 kf fc k2 + kfc Pn k2 < .
Step 4: using the best approximation theorem 4.3, we have that kf fn k2 kf Pn k2 ,
so it follows that kf fn k2 < .
Step 5: if one recalls that (kf fN k2 )N is a decreasing sequence (see the proof of Bessels
inequality) we have proved that the sequence of partial Fourier series (fN )N converges
to f , in the sense that limN kf fN k2 = 0. Using standard Lebesgue measure
theory in Vper = L2 (] , [), we finally conclude that (4.27) holds almost everywhere
in [, ].
Remark 4.3. One can proceed similarly in the space of functions v defined over [a, b],
and such that v(a) = 0 and v(b) = 0. This corresponds to the space V 00 that we
introduced in the previous chapters. In this case, one can check that it is enough to rely
on the Fourier series defined by

bk sin kx with

k=1

b2k < .

k1

In other words, the completeness of the Fourier series relies here only on the sine functions. Using the orthogonality relations, one can then prove our previous claims on
having sufficiently enough test functions, choosing v(x) := sin kx, for k 1, to go from
the variational formulation to the original differential equation.

4.6
4.6.1

Real and complex Fourier series


Real Fourier series

Let us recall how to find the Fourier series for f Vper , that is

X
f (x) = a0 +
(ak cos kx + bk sin kx).

(4.28)

k=1

We need to express all the coefficients (ak )k0 and (bk )k>0 as a function of f . We have
found that they are respectively given by (4.23) and (4.24), whose expressions are recast
here:

107

a0
ak
bk

Z
1
=
f (x) dx ,
2
Z
1
=
f (x) cos kx dx k 1 ,

Z
1
f (x) sin kx dx k 1.
=

To summarize, we can expand f (x) as follows:


f (x) = a0 + a1 cos x + b1 sin x + a2 cos 2x + b2 sin 2x +
where all the coefficients are given by the above formulas.
4.6.2

Complex Fourier series

First let us consider the class of all complex-valued 2-periodic functions Wper . It is a
vector space over C. We define the following complex inner product 71 :
Z
(f, g)2 :=
f g dx,

where g(x) is the conjugate of g(x) C.


One can show that it satisfies
1. (f, f )2 0 for all f Wper , and (f, f )2 = 0 implies f = 0;
2. (f, g)2 = (g, f )2 for all f, g Wper ;
3. (f1 + f2 , g)2 = (f1 , g)2 + (f2 , g)2 for all f1 , f2 , g Wper ;
4. (af, g)2 = a(f, g)2 and (f, ag)2 = a(f, g)2 for all f, g Vper , for all a C.
We can define the mean square norm 72 over Wper :
p
kf k2 := (f, f )2 .
71
72

Do not forget that one takes the conjugate of one of the two functions, here the second one!
Indeed, one has
kf k2 = 0 implies f = 0;
kaf k2 = |a| kf k2 for all f Wper , for all a C;
kf + gk2 kf k2 + kgk2 for all f, g Wper .

The last property is a consequence of the Cauchy-Schwarz inequality for the complex-valued functions.

108

We can see that the complex inner product satisfies a Cauchy-Schwarz inequality for the
complex-valued functions:
|(f, g)2 | kf k2 kgk2

f, g Wper .

If (f, g)2 = 0, this is obvious! Otherwise, as in the case of real-valued functions, consider
0 (f + tg, f + tg)2 = kf k22 + t((f, g)2 + (g, f )2 ) + t2 kgk22 = kf k22 + 2t<((f, g)2 ) + t2 kgk22
for all t R. The negative discriminant yields now: ((<((f, g)2 ))2 kf k22 kgk22 0. To recover the Cauchy-Schwarz inequality as stated above, replace g by g1 := g(f, g)2 /|(f, g)2 |,
to get
|(f, g)2 | = <((f, g1 )2 ) kf k2 kg1 k2 = kf k2 kgk2 .
Definition 4.3 (Orthogonal functions). Two complex-valued functions f (x) and g(x)
are said to be orthogonal on the interval [a, b] if the following holds
Z b
(f, g)2 = 0, or equivalently
f g dx = 0.
a

For example, (ekx )kZ is an orthogonal sequence of complex-valued functions on


[, ] or [0, 2], since, for k 6= k 0 ,
Z 2
Z 2
h
ix=2
1
0
kx k0 x
kx k0 x
(kk0 )x
(e , e )2 =
e e dx =
e
= 0.
e(kk )x dx =
(k k 0 )
x=0
0
0
On the other hand, one finds
(ekx , ekx )2 = 2

k Z.

To summarize, we have
0

(ekx , ek x )2 = 2 kk0
where

(
kk0 =

for k, k 0 Z,

1 if k = k 0 ,
0 if k 6= k 0 .

is the Kronecker symbol.


Now we shall discuss how to expand a complex-valued function f in terms of (ekx )kZ :
f (x) =

X
k=

109

ck ekx .

(4.29)

We need to find all the coefficients (ck )kZ . Using the orthogonality relations of (ekx )kZ ,
we multiply both sides of (4.29) by emx for m Z and integrate over [, ], to obtain
formally73
Z
Z
mx
mx
cm emx emx dx = 2 cm ,
f (x)e
dx =
(f (x), e )2 =

or

1
cm =
2

f (x)emx dx =

1
(f (x), emx )2
2

m Z.

(4.30)

That is, the Fourier series is


f (x) = c0 + c1 eix + c1 eix + c2 e2ix + c2 e2ix +

(4.31)

with coefficients (cm )mZ defined by (4.30).


Remark 4.4. Note that in the Fourier series (4.31), the function f (x) can be a realvalued function. For a real-valued function, one can choose the real Fourier expansion
(4.28) or the complex expansion (4.31).
4.6.3

Relations between the real and complex Fourier series

There are close relations between the real and complex Fourier series. Here, we consider
a 2-periodic function f (x) which can be complex-valued. One can still use the formulas
(4.23) and (4.24) to compute the coefficients (ak )k0 and (bk )k0 (we consider here that
b0 = 0!), that can belong to C. Or, one can apply the formulas respectively to the real
and imaginary parts of f (x).
(a) On the one hand, the coefficients (ck )kZ in the complex form (4.31) can be derived
from the coefficients (ak )k0 and (bk )k0 . In fact, we know
ekx = cos kx + sin kx,

ekx = cos kx sin kx.

(4.32)

We obtain, for k 0,
Z
Z
Z
kx
kx
(f, e )2 =
f (x)e
dx =
f (x) cos kx dx
f (x) sin kx dx ,

Z
Z
Z
kx
kx
(f, e
)2 =
f (x)e dx =
f (x) cos kx dx +
f (x) sin kx dx .

73

Using some tools very similar to the ones we used to prove the completeness of the real Fourier
series (see 4.5.2), we can justify mathematically these computations...

110

This is exactly
1
1
c0 = a0 ; ck = (ak bk ) and ck = (ak + bk ) k > 0.
2
2
(b) On the other hand, the coefficients (ak )k0 and (bk )k0 in (4.28) can be recovered
from the complex coefficients (ck )kZ in (4.31). Indeed, using the formulas
cos kx =


1 kx
e + ekx ,
2

sin kx =


1 kx
e ekx ,
2

we find:
a0 = c 0 ,
Z
1
ak =
f (x) cos kx dx = ck + ck k > 0,

Z
1
f (x) sin kx dx = (ck ck ) k > 0.
bk =

(c) About real-valued functions, it is easy to check that the following assertions are
equivalent:
f is real-valued ;
ak and bk are real for all k 0 ;
ck = ck for all k 0.

4.7
4.7.1

Remarks on the Fourier series


Examples of Fourier series

We now give some examples to illustrate the derivation of the Fourier series.
P 0 0
0
Example 4.1. Find the Fourier series of f (x) = a00 + N
k=1 (ak cos kx + bk sin kx).
Solution. There are two possibilities:
1. By computing directly the coefficients, and using the orthogonality relations.
2. By using the best approximation theorem 4.3.
Indeed, when N N 0 , we find that
0

N
X
0
2
(a0k cos kx + b0k sin kx) F k22 = 0.
min kf F k2 = min ka0 +

N
F Vper

N
F Vper

k=1

111

P 0 0
But, we know that the minimum point, here Fmin (x) = a00 + N
k=1 (ak cos kx +
0
bk sin kx) is equal to the truncated Fourier series (this is the precisely statement
of theorem 4.3), whose coefficients are those of the Fourier series, namely (ak )k0
and (bk )k>0 given by (4.23) and (4.24).
In both cases, one finds that
(
a0k if k N 0
ak =
,
0 if k > N 0

(
bk =

b0k if k N 0
0 if k > N 0

Example 4.2. Compute the Fourier expansions of the functions


(
x + if x 0
1. f (x) =
.
x if 0 x ,
2. f (x) = ( x)(x + ) x .
(
1 if < x < 0
3. f (x) =
.
1
if 0 < x < ,
For the third case, note that one can consider that f () = 1, so that the function is
2-periodic (obviously, it is not continuous over [, ]!).
4.7.2

Sine series and cosine series

Definition 4.4 (Odd and even functions). Let f (x) be defined over [a, a] (for a > 0).
It is called an even function if it satisfies
f (x) = f (x),

x [a, a] .

It is called an odd function if it satisfies


f (x) = f (x),

x [a, a] .

It is easy to check the following

Z
Proposition 4.1. For any odd function f (x) on [, ], we have
Z
Z
For any even function f (x) on [, ], we have
f (x) dx = 2

112

f (x) dx = 0.

f (x) dx.

Example 4.3. Find the Fourier series of the odd function


f (x) = x , x [, ] .
Solution. The Fourier coefficients (ak )k0 are
Z
Z
1
1
a0 =
x dx = 0, ak =
x cos kx dx = 0 k 1.
2

Indeed, x cos kx is an odd function, for k 0.
On the other hand, for the coefficients (bk )k>0 , we have
Z
Z
2
1
x sin kx dx =
x sin kx dx k 1.
bk =

0
By integration by parts, we obtain

x=
Z
2
2 cos k
2
2
+
cos kx dx =
bk =
x cos kx
= (1)k+1
k
k 0
k
k
x=0

k 1.

So the required Fourier series is




sin 2x sin 3x
+
,
x = b1 sin x + b2 sin 2x + = 2 sin x
2
3

x ] , [.

Remark 4.5. Note that the Fourier series above does not converge to the expected value
at x = . Indeed, all terms of the series are equal to 0 when x = or x = .

Corollary 4.2.

1. The Fourier series of an even function has only cosine terms ;

2. The Fourier series of an odd function has only sine terms.


Proof.

1. For an even function f (x), one finds


Z
1
bk =
f (x) sin kx dx = 0 k 1.

2. For an odd function f (x), one finds


Z
Z
1
1
a0 =
f (x) dx = 0, ak =
f (x) cos kx dx = 0 k 1.
2

113

These simple results have powerful consequences. Indeed, every function f (x) defined
over [, ] can be written as the sum of an even function and of an odd function, i.e.,
f (x) = fe (x) + fo (x) x [, ],
with

f (x) + f (x)
f (x) f (x)
, fo (x) =
x [, ].
2
2
On the other hand, every function f (x) defined over ]0, [ can be extended74 in at least
two ways to ] , [:
fe (x) =

even extension:
define f(x) = f (x) for x ] , 0[, and f(x) = f (x) for x ] , 0[ ;
odd extension:
define f(x) = f (x) for x ] , 0[, and f(x) = f (x) for x ] , 0[.
Example 4.4. The function f (x) = 1 is known on the half-period ]0, [. Find its Fourier
series when
(a) f (x) is extended to ] , [ as an even function ;
(b) f (x) is extended to ] , [ as an odd function.
Solution. By definition of even and odd functions, we have
(a) Extend f (x) as an even function, so that f(x) = 1 over ] , 0[[0, [:
Z
Z
1
1

f (x) dx =
1 dx = 1,
a0 =
2
0
Z
Z
1
2
ak =
f (x) cos kx dx =
cos kx dx = 0 k 1,

0
Z
1
bk =
f (x) sin kx dx = 0 k 1.

Therefore the Fourier series of the even extension of f (x) = 1 is as expected!
f(x) = 1 x ] , [.
This recovers the original constant function.
74

More precisely, the extension is to ] , 0[]0, [, and one can choose for f (0) the value 0...

114

(b) Extend f (x) as an odd function, so that f(x) = sign(x) over ] , 0[[0, [, that
is the step function:
Z
1
a0 =
f(x) dx = 0,
2
Z
1
ak =
f (x) cos kx dx = 0 k 1,

Z
Z
1
2
bk =
f (x) sin kx dx =
sin kx dx k 1

0

0
if k is even
=
4 if k is odd .
k
So the Fourier series of the odd extension of f (x) is
o
4 n sin x sin 3x sin 5x
f(x) =
+
+
+ ,

1
3
5

x ] , [.

Considering its restriction to ]0, [, that is f (x), it looks very different than the original
value 1...
4.7.3

The function

We consider here the generalized function on [, ]. This generalized function is one


of the most important tools in physics and engineering. It can be defined via its action:
Z
g dx = g(0) g C 0 ([, ]).

The support of its action is reduced to {0}, since it does not see functions g, as soon as
g(0) = 0:
Z
gdx = 0 g C 0 ([, ]) with g(0) = 0.

According to (4.23) and (4.24), the Fourier coefficients are


Z
1
1
a0 =
(x) dx =
,
2
2
Z
1
1
1
ak =
(x) cos kx dx = cos 0 = , k > 0,

Z
1
bk =
(x) sin kx dx = 0 , k > 0.

115

Therefore, the real Fourier series writes:


(x) =

1
1X
+
cos kx.
2 k=1

(4.33)

In the other hand, we have the complex Fourier series

1 X kx
(x) =
e .
2 k=

(4.34)

We have from (4.34) that


1 X kx
1
1X
1
kx
+
e +e
=
+
cos kx ,
(x) =
2 2 k=1
2 k=1

which is the same as (4.33). ]


P
2
Now, one can use corollary 4.1. If belongs to Vper , then both series
k0 ak and
P
2
k>0 bk must converge. While it is true for the latter, this is certainly not true for the
former, as limk ak 6= 0.
On the other hand, consider now, for N 0, the partial (or finite) sum75 PN (x) appearing in (4.34):
N
X
1
PN (x) =
ekx

2 k=N
N
X
1
N x
=
e
e(N +k)x
2
k=N
2N
X
1
N x
=
e
ekx
2
k=0
(2N +1)x
1
N x 1 e
=
e
2
1 ex
1
1
1
e(N + 2 )x e(N + 2 )x
=

2
ex/2 ex/2
sin(N + 21 )x
1
or PN (x) =

.
2
sin 12 x

Example 4.5. In which sense does the series (4.34) reflect the behavior of (x)?
A first attempt: answer the following questions...
75

According to the above, (PN )N 0 does not converge to the delta function in Vper ...

116

1. For a given N , show that


lim PN (x) =

x0

1
1
(N + ).

In other words, PN (x) will tend to infinity at x = 0 when N goes larger and larger.
2. Prove that

PN (x) dx = 1 N 0.

3. Plot x 7 PN (x) using Matlab, for N = 10, 20, 30, 40, 50, 100.
4. Calculate the integral
Z

PN (x)f (x) dx

approximately for some values of N , and some appropriately chosen functions f (x).
Check whether (PN (x))N 0 satisfies that
Z
lim
PN (x)f (x) dx = f (0).
N

if so, the action of PN approximates the action of in some sense.


4.7.4

The convolution product

A powerful tool, related to the Fourier series, is the convolution product. Given two
functions f (x) and g(x) defined over R, it is defined by
Z
f (x y)g(y) dy x R.
(f g)(x) :=

Using the change of variable y 0 = x y, we remark that


Z
(f g)(x) :=
f (y 0 )g(x y 0 ) dy 0 ,

so it follows that f g = g f .
Let us investigate the convolution with the delta function. The extension of the
action of the generalized function over elements of C 0 (R) is clear from its definition!
Then, if we let g(x) = (x), we get simply
Z
(f )(x) = ( f )(x) =
f (x y)(y) dy = f (x) x R.

117

In other words, the delta function is the identity element (or neutral element) of the
convolution product.
Next, we remark that any function f (x) defined over [, ] that belongs to Vper can
be extended to f(x), defined over R, with

f (x) if x [, ]
f(x) =
.
0
else .
Now, going back to the truncated Fourier series for a function f (x) defined over [, ],
we recall that we have
Z
N
X
1
kx
ck e , where ck =
fN (x) =
f (y)eky dy k Z.
2

k=N
We get
fN (x) =

=
=
=


Z
N
X
1
ky
f (y)e
dy ekx
2

k=N
!
Z
N
1 X k(xy)
f (y)
e
dy
2 k=N

Z
f (y)PN (x y) dy

Z
f(y)PN (x y) dy

= (PN f)(x).

Above, PN (x) is the partial sum appearing in the complex Fourier series of the delta
function (4.34).
But, on the one hand, according to the completeness of the Fourier series (recall that
f Vper ):
lim fN (x) = f (x) x [, ].
N

On the other hand, we know by the definition of the extension f that f (x) = f(x) for
all x [, ]. Gluing everything back together, we have actually proven that
lim (PN f)(x) = lim fN (x) = f (x) = f(x) x [, ].

118

And that is not all! Since the delta function is the identity element of the convolution
product, we have in addition that
( f)(x) = f(x) x [, ].
There follows finally:
lim (PN f)(x) = ( f)(x) x [, ].

In other words, with respect to the convolution product , we can write

PN , as N .

4.8

 Fourier transform

Fourier transform plays a very important role in a wide variety of scientific fields, such
as: mathematics, physics and engineering. It consists of extending the notion of Fourier
series. Among others, one can apply this transform to solving some differential equations
on line.
4.8.1

A formal derivation, definition and examples

Recall that
ekx = cos kx + sin kx.
From this expression, we infer that the magnitude of k, namely |k|, determines the
intensity of the oscillation of the function exp(kx): |k| measures the frequency of the
oscillation. To better understand the relation between the magnitude of k and the
oscillations of exp(kx), one may for instance plot and compare the figures of sin x,
sin 4x and sin 8x...
To given with, we note that the Fourier series expansion for 2-periodic functions
can be extended to any 2T -periodic functions, for any T > 0, by the following scaling
method. Given a 2T -periodic complex-valued function f (x0 ), we can rescale it as a
2-periodic function f 0 (x) by the following equivalent tranformations:
f 0 (x0 ) := f (x), where x0 = x/T ; or, equivalently, f 0 (x0 ) := f (T x0 /) .

119

(Here, f 0 (x0 ) does not denote the derivative of f (x)).


Let us write down the complex Fourier series for the 2-periodic function f 0 (x0 ):

f 0 (x0 ) =

0 0

ck0 ek x

k0 =

where

1
ck0 :=
2

0 0

f 0 (y 0 )ek y dy 0 .

We now perform the following change of variables y = T y 0 /, to get


Z T  
1
y k0 y/T

=
f0
e
dy
2 T
T
T
Z T
1
0
f (y)ek y/T dy.
=
2T T

ck 0

We now express x0 in terms of x again:


f (x) = f

 x 
T

ck0 ek x/T .

k0 =

Combining the above two, f (x) can be expanded as


f (x) =

ck 0 e

k0 x/T

k0 =

1
=
2T
k0 =

Z

f (y)e

k0 y/T

dy ek x/T .

Then let 4x := /T and introduce the auxiliary variable k := k 0 4x. We can write

Z T
X
1
ky
f (y)e
dy ekx .
f (x) =
4x
2 k=k0 4x,k0 Z
T
Now, if we let formally T go to , this means that we are considering a general function
f (x) defined on the whole real line R in the limit. Moreover, we have in that case, for
any given k,
Z
 Z


f (y)eky dy

f (y)eky dy := g(k).

Also, we remark that, when T is large, then 4x is small. Therefore, for small
4x, we may write formally
f (x)

1
2

X
k=k0 4x,k0 Z

120

4x g(k)ekx .

But, we know that we have, for any given x,


Z

kx

g(k)e

dk =

XZ

(k0 +1/2)4x

g(k)ekx dk ,

(k0 1/2)4x

k0 Z

4x g(k)ekx for small 4x.

k=k0 4x,k0 Z

We conclude that, for a function f (x) defined over the real line R, we can write formally
1
f (x) =
2

g(k)ekx dk

x R.

Thus, we have the definition below, where we replace g(k) by the standard fb(k).
Definition 4.5 (Fourier transform). For a given complex-valued function f (x) defined
on R, the Fourier transform of f (x) is the complex-valued function fb(k):
Z
fb(k) :=
f (x)ekx dx , k R ,
(4.35)

where k plays the role of the frequency.


Conversely, the inverse Fourier transform of fb(k) recovers the original function f (x):
Z
1
f (x) :=
fb(k)ekx dk , x R .
(4.36)
2
Remark 4.6. With this definition, we remark that fb = 0 if, and only if, f = 0.
Also, this definition can be used and generalized functions.
Example 4.6. Find the Fourier transform of the delta function.
Solution.
Z

b =
(k)

(x)ekx dx = 1 for all k R.

So the Fourier transform of the delta function is the constant function 1. ]


Example 4.7. Find the Fourier transform of the square pulse:

1 if |x| a
f (x) :=
.
0 if |x| > a

121

Solution.
Z

kx

fb(k) =

f (x)e

ekx dx =

dx =

2 sin ka
.
k

Remark 4.7. The Fourier transform of the square pulse has a meaning at k = 0. Indeed,
limk0 fb(k) = 2a.
Example 4.8. For a > 0, find the Fourier transform of the function:

eax if x 0
f (x) =
eax
if x < 0 .
Solution. By definition, we have
Z
Z
kx
b
f (k) =
f (x)e
dx =

axkx

dx

eaxkx dx

1  axkx x=
1  axkx x=0
2k
=
e
e
.

= 2
x=0
x=
a + ik
a ik
a + k2
Example 4.9. For a > 0, find the Fourier transform of the function
f (x) = ea|x| .
Solution. By definition, we have
Z
b
f (x)ekx dx
f (k) =

Z
Z
(a+k)x
=
e
dx +
0

e(ak)x dx

x=


x=0
1
1
(a+k)x
(ak)x
=
e
+
e
a + k
a k
x=0
x=
1
1
2a
=
+
= 2
.
]
a + k a k
a + k2


Example 4.10. Find the Fourier transform of the sign function

1
if x > 0
f (x) :=
1 if x < 0 .

122

Solution. We have
Z

fb(k) =

f (x)e

kx

Z
dx =

kx

ekx dx.

dx

x=0
x=


But what is the value of ekx x=0 ? of ekx x= ?
To solve this problem, we consider the function

eax if x > 0
fa (x) =
,
eax if x < 0
it is easy to see that, for all x 6= 0:
lim fa (x) = f (x).

a0+

Then we can compute fb(k) formally, by inverting the limit sign (lima0+ ) and the
Z
integral sign
dx):

kx

f (x)e
dx =
lim+ fa (x) ekx dx
a0


Z
2k
kx
fa (x)e
dx = lim+ 2
= lim+
a0 a + k 2
a0

2
2
= .
]
=
k
k

fb(k) =

Example 4.11. Find the Fourier transform of the constant function


x R.

f (x) = 1

Solution. Using auxiliary functions as before, and inverting limit and integral signs, we
find formally
Z

123

kx

e
dx =
e
dx +
ekx dx

Z

Z 0
ax kx
ax kx
e e
dx +
e e
dx
= lim+
a0
0

 1
1 0 if k 6= 0
= lim+
+
=
.
? if k = 0
a0
a + k a k

fb(k) =

kx

dx = +. On the other hand,

What is fb(0) ? Obviously, we have that fb(0) =

we have found at example 4.6 that the Fourier transform of the delta function is the
constant function 1. But, by definition, using the inverse Fourier transform, we ought
to recover the original function! Indeed, let fb(k) = (k), then by the inverse Fourier
transform we have
Z
1

1 = f (x) =
fb(k)ekx dk =
,
2
2
so76 is equal to 2, or fb(k) = 2(k).
4.8.2

Two identities for Fourier transforms

One can prove that


(1) For a complex-valued function f (x) and its Fourier transform fb(k), we have
Z
Z
2
2
|f (x)| dx =
|fb(k)|2 dk .
(4.37)

(2) The complex inner product of two complex-valued functions f (x) and g(x) satisfies
Z
Z
fb(k)b
g (k) dk.
f (x)g(x) dx =
2

Example 4.12. Check the relation (4.37) for the following function

eax if x > 0
f (x) =
0
if x < 0 .
Solution. We have
Z

e2ax dx =

|f (x)| dx = 2

.
a

While there holds


Z

kx

fb(k) =

f (x)e

Z
dx =

eax ekx dx

1  axkx x=
1
e
=
;
x=0
a + k
a + k

76

There is a factor 2, due to the discrepancy in the multiplicative coefficients, between the Fourier
transform (4.35), and the inverse Fourier transform (4.36).

124

therefore



fb(k) 2 dx =

dk
=
|a + k|2

dk

,
=
a2 + k 2
a

that verifies (4.37). Here we have used the change of variables k = a cos / sin to
compute the last integral. ]
4.8.3

Important properties of Fourier transform

This subsection discusses some additional properties of the Fourier transforms.


(1) One can directly verify from definition that
[)(k) = fb(k) C.
(f
(2) One can directly verify from definition that
(f\
+ g)(k) = fb(k) + gb(k).
With property (2), we have that two different (generalized) functions necessarily
have two different Fourier transforms.
(3) The Fourier transform of the first order derivative F (x) := df /dx(x) is
d
df
(k) = k fb(k).
dx
To see this, we use the inverse Fourier transform
Z
1
fb(k)ekx dk,
f (x) =
2
to obtain formally (by inverting differentiation and the integral sign)
 Z

Z
Z

df
d
1
1
d b
1
kx
kx
b
(x) =
f (k)e dk =
f (k)e
dk =
k fb(k)ekx dk.
dx
dx 2
2 dx
2
Comparing with the direct definition of the inverse Fourier transform of df /dx(x)
df
1
(x) =
dx
2

d
df
(k)ekx dk
dx

yields the result. Indeed, we have just proven that the inverse Fourier transform
\
of df
/dx(k) k fb(k) is 0, so this function is actually 0 (see remark 4.6).
125

f (x)dx (with a R) is

(4) The Fourier transform of the primitive F (x) :=


a

Z b
fb(k)
f (k) ka
b
F (k) =
+ Ca (k), where Ca =
e dk.
k
k
To see this, we use
dF
(x) = f (x) x R.
dx
Taking the Fourier transform on both sides gives (see property (3)),
fb(k)
k Fb(k) = fb(k), which implies Fb(k) =
k

k 6= 0.

So far, we have found the expression of Fb(k), for k 6= 0. We now take the ansatz
fb(k)
Fb(k) =
+ C(k) for some C R,
k
which is consistent with the previous result. To remove the indetermination on
the value of the constant C, we use that fact that F (a) = 0, that is
1
0=
2

Fb(k)e

ka

1
dk =
2

fb(k) ka
C
e dk +
,
k
2

which leads to the result as stated above.


(5) The Fourier transform of F (x) := f (x d) (with d R) is ekd fb(k).
In fact, we have using the change of variables y = x d:
Z
Z
Z
kx
kx
Fb(k) =
F (x)e
dx =
f (xd)e
dx =
f (y)ek(y+d) dy = ekd fb(k).

(6) The Fourier transform of F (x) := exd f (x) (with d R) is fb(k d).
By definition, we have
Z
Z
kx
b
F (k) =
F (x)e
dx =
f (x)e(kd)x dx = fb(k d).

(7) By definition (see 4.7.4), the convolution of the two (generalized) functions G(x)
and h(x) is the (generalized) function
Z
u(x) = (G h)(x) :=
G(x y)h(y) dy x R.

126

b b
We now show that u
b(k) = G(k)
h(k), for all k R.
In fact, we have formally, by inverting the integrals respectively over x and y:
Z

kx

Z

kx

G(x y)h(y)e
dy dx

Z

Z
kx
kx
G(x y)h(y)e
dx dy =
h(y)
G(x y)e
dx dy
=


Z
Z
0 kx0 ky
0
h(y)
G(x )e
e
dx dy with the change of variables x0 := x y
=


 Z

Z
ky
0 kx0
0
b b
=
h(y)e
dy
G(x )e
dx = G(k)
h(k).

u
b(k) =

u(x)e
Z

dx =

4.8.4

Application of the Fourier transform to differential equations

Fourier transforms can be applied to solve many types of differential equations. Here
we consider one example. Consider the second order differential equation with unknown
u(x) (and a > 0):
d2 u
2 (x) + a2 u(x) = h(x) x R.
dx
In order to solve the equation, we apply the Fourier transform to each term of the
equation to obtain
(k)2 u
b(k) + a2 u
b(k) = b
h(k) k R.
This gives
b
h(k)
k R.
2
a + k2
Let G(x) be the (generalized) function with inverse Fourier transform
u
b(k) =

b
G(k)
:=

1
a2 + k 2

(4.38)

k R.

Then, according to (4.38), there holds


u
b(k) =

b
h(k)
b b
= G(k)
h(k) k R.
2
a + k2

By the convolution property (7), the solution u(x) is actually given by


Z
u(x) = (G h)(x) =
G(x y)h(y) dy.

127

(4.39)

To find G(x), we recall that the Fourier transform of the function f (x) = ea|x| is
precisely fb(k) = 2a/(a2 + k 2 ), for k R (see example 4.9). So, we have according to
property (1):
1
G(x) = ea|x| x R.
2a
Now we conclude from (4.39) that
Z
1
u(x) =
ea|xy| h(y) dy x R.
]
2a

4.9

Orthogonal functions

In this section, we introduce some further knowledge on orthogonal functions. The idea
is to be able to consider more general inner products than (, )2 , and therefore to build
other families of orthonormal functions than (cos kx)k0 , (sin kx)k>0 or (ekx )kZ .
For a given positive function w(x) on [a, b], strictly positive over ]a, b[, we define an
inner product
Z b
(f, g) :=
f g dx
a

for any two real functions f (x) and g(x) defined on [a, b]. The function (x) is called a
weight function. We will often use the following norm77 :
nZ b
o 21
kf k :=
f 2 dx .
a

Definition 4.6 (Weighted orthogonal functions). Let f (x) and g(x) be two real functions
on [a, b]. f (x) is said to be orthogonal to g(x) with respect to the inner product (, ) if
(f, g) = 0.
A sequence of functions (fk )k0 is said to be orthonormal with respect to the inner
product (, ) if the following holds:
(fm , fn ) = mn

for m, n 0.

Check if function f (x) = cos x is orthogonal to g(x) = sin x with respect to the inner
product (, ) for the choices of weight (x) = 1, x, x2 .
Verify that any sequence of orthogonal functions (gk )k0 on the interval [a, b] are
linearly independent.
77

This is the reason why (x) must be strictly positive (almost everywhere) over ]a, b[. Otherwise, if
vanishes over some interval [, ] for < , then obviously k1[,] k = 0!

128

Now we are going to demonstrate that

Proposition 4.2. Any sequence of linearly independent functions (k )k0 defined on [a, b]
can generate a sequence of functions (qk )k0 which are orthonormal with respect to the
inner product (, ) .
Proof. Gram-Schmidt orthogonalization is such a technique. Given a sequence (k )k0
of linearly independent functions defined on [a, b], we are going to construct a sequence
of orthonormal functions (qk )k0 as follows:
0) Initializing step. Set
qe0 (x) = 0 (x),

x [a, b].

qe0 (x)
,
ke
q0 k

x [a, b].

Then, normalize qe0 (x):


q0 (x) =

NB. Since (k )k0 is linearly independent, one has k 6= 0 for all k, so ke


q0 k > 0
and the function q0 is well-defined.
1) First step. Set
qe1 (x) = 1 (x) 10 q0 (x),
Choose 10 such that
Z
(e
q1 , q0 ) =

x [a, b].

q1 q0 dx = 0.
a

Equivalently, this gives


b

Z
10 := (1 , q0 ) =

1 q0 dx.
a

Then, normalize qe1 (x):


q1 (x) =

qe1 (x)
,
ke
q1 k

x [a, b].

NB. Since (k )k0 is linearly independent, and since q0 span{0 }, the linear
combination qe1 = 1 10 0 cannot be equal to 0: ke
q1 k > 0.
k) Induction. For k 1, suppose q0 , q1 , , qk are constructed such that

q span{ , , } i {0, , k}
i
0
i
.

(qi , qj ) = ij i, j {0, , k}
129

We then construct qk+1 in two substeps as before. Set


n
o
qek+1 (x) = k+1 (x) k+1,0 q0 (x) + + k+1,k qk (x) ,

x [a, b],

with k+1,i := (k+1 , qi ) for i = 0, , k, so that there holds


(e
qk+1 , qi ) = 0,
Then, normalize qek+1 :
qk+1 (x) =

i = 0, , k.
qek+1 (x)
.
ke
qk+1 k

n
NB. Once more, qek+1 cannot be equal to 0, because the linear combination k+1,0 q0 (x)+
o
+ k+1,k qk (x) belongs to span{0 , , k }.
Then, we have q0 , q1 , , qk+1 such that

q span{ , , } i {0, , k + 1}
i
0
i
.

(qi , qj ) = ij i, j {0, , k + 1}

As a result of the induction process, the sequence (qk )k0 constructed above is an orthonormal sequence with respect to (, ) , i.e.
(qi , qj ) = ij

i, j N.

Since the Gram-Schmidt orthogonalization is a constructive technique, it can be used in


principle to build new families of orthonormal functions.
Example 4.13. Given the sequence of polynomials
1, x, x2 , , xk , ,
on the interval [1, 1], use the Gram-Schmidt orthogonalization process to construct an
orthonormal sequence of polynomials (with respect to the unit weight (x) = 1), and
write down the first three constructed polynomials explicitly.
Solution (Exercise). The three polynomials are


3
45
1
1
P0 (x) = , P1 (x) = x , P2 (x) = x2
.
3
2
2
8

130

Example 4.14. Check if the Chebyshev polynomials


T0 (x) = 1, T1 (x) = x, T2 (x) = 2x2 1, T3 (x) = 4x3 3x

are orthogonal on [1, 1] with respect to the weight function (x) = 1/ 1 x2 .


Solution (Exercise). Use the transformation x = cos .
Example 4.15. Expand a given function f (x) on [a, b] in terms of a given orthogonal
sequence of functions (k (x))k0 with respect to the inner product (, ) .
Solution. Let
f (x) = 0 0 (x) + 1 1 (x) + 2 2 (x) + ,
and use ad hoc orthogonality relations to compute the coefficients (k )k0 . ]

131

132

Vous aimerez peut-être aussi