Professional Documents
Culture Documents
P∞
The coefficient an is found in a similar way: if we multiply f(x) = 21 a0 + n=1 (an cos nx+
bn sin nx) by cos nx we get
∞
X
1
f(x) cos nx = a0 cos nx + (am cos mx cos nx + bm sin mx cos nx).
2
m=1
1
Recalling the trigonometric identities
1
sin mx cos nx = [sin(m + n)x + sin(m − n)x],
2
1
cos mx cos nx = [cos(m + n)x + cos(m − n)x],
2
and
1
sin mx sin nx = [cos(m − n)x − cos(m + n)x],
2
we have Zπ
sin mx cos nx dx = 0, n ≥ 1,
−π
and Zπ
cos mx cos nx dx = 0, n 6= m.
−π
Note that this expression is valid also for n = 0 and that is why we write 21 a0 rather than
a0 .
P∞
We get the corresponding formula for bn by multiplying f(x) = 21 a0 + n=1 (an cos nx +
bn sin nx) by sin nx, integrating term by term, and using the fact
Zπ
sin mx sin nx dx = 0, n 6= m ,
−π
what yields
Zπ
1
bn = f(x) sin nx dx .
π −π
Thus, if the series is uniformly convergent the coefficients an and bn can be obtained
by the above formulas. However, we don’t know if a given function f(x) admits an ex-
pansion as a uniformly convergent trigonometric series. For this reason, it is better to
set aside the idea of finding the coefficients an and bn of the expansion, which may or
may not exist, and use instead those formulas to define certain numbers an and bn ,
called Fourier coefficients of f(x), that are used to construct the trigonometric series. To
form this series we don’t need f to be continuous; only that is integrable on the interval
2
−π ≤ x ≤ π. Of course, we hope that the Fourier series of f will converge and have f for
P
its sum, and that therefore the expression f(x) = 12 a0 + ∞
n=1 (an cos nx + bn sin nx) is a
valid expansion of f(x), but this is not always true.
Now notice that each term of the series has period 2π, so the sum also has period 2π;
that means that the known graph of the sum, i.e., between −π and π is repeated on each
successive interval of length 2π, as appears in the following figure
4
2
− 5π − 4π − 3π − 2π −π π 2π 3π 4π 5π
0
-2
-4
-15 -10 -5 0 5 10 15
3
showing that the series represents the function f(x) = x only on (−π, π) and not on the
entire real line.
In the points x = ±π, ±3π, . . . , the sum of the series has a sudden jump from −π to π.
If we substitute these values in the ‘expansion’ of f(x) = x we see that every term of the
series is 0, and therefore the sum is also 0 (represented by red points in the plot).
It can be verified that the partial sums of the Fourier series approximate the function
f1 (x) = x on the interval (−π, π) (but not at x = ±π).
Thus if we want to compute the Fourier series of an odd function, we don’t have to bother
calculating the cosine coefficients.
Example 2. The square wave: Consider the function defined by f2 (x) = 0, if −π ≤ x < 0,
and f2 (x) = π, if 0 ≤ x ≤ π. The expressions for the Fourier coefficients provide
Z 0 Zπ
1
a0 = 0 dx + π dx = π,
π −π 0
Z
1 π
an = π cos nx dx = 0, n ≥ 1,
π 0
Z
1 π 1 n 0, n = 2m
bn = π sin nx dx = (1 − (−1) ) = 2
π 0 n
n, n = 2m − 1
and thus the Fourier series is
π sin 3x sin 5x
f2 (x) = + 2 sin x + + + ... .
2 3 5
4
The sum of this series is periodic of period 2π, and its graph is shown in the following
figure:
3
2
1
0
− 4π − 3π − 2π −π π 2π 3π 4π
-1
-10 -5 0 5 10
π
At each of the points of discontinuity, the sum of the series has the value 2, shown as
isolated dots in the graph. Note that in this case, as well as in example 1, such isolated
points take on the value given by the average of the limits of the function as we approach
the point of discontinuity from the left and from the right.
5
1
0
− 4π − 3π − 2π −π π 2π 3π 4π
-1
-2
-10 -5 0 5 10
Note that, again, since the function is odd, the Fourier series has only sine terms.
The following theorem establishes the desired convergence behaviour (the Fourier series
not only converges, but also converges to the corresponding function) for a very large
class of functions.
Dirichlet’s theorem: Assume that f(x) is defined and bounded for −π ≤ x < π, and
also that it has only a finite number of discontinuities and only a finite number of maxima
and minima on this interval. Let f(x) be defined for other values of x by the periodicity
condition f(x + 2π) = f(x). Then, the Fourier series of f(x) converges to
1
[f(x− ) + f(x+ )]
2
6
at every point x, and therefore it converges to f(x) at every point of continuity of the
function. Thus, if at every point of discontinuity the value of the function is redefined as
the average of its two one-sided limits there,
1
f(x) = [f(x− ) + f(x+ )],
2
then the Fourier series represents the function everywhere.
Thus, the continuity of a function is not sufficient for the convergence of its Fourier series
to the function, and neither is it necessary: it is possible for a discontinuous function to be
represented everywhere by its Fourier series, provided its discontinuities are relatively
mild and provided it is relatively well-behaved between the points of discontinuity.
and Z
1 π (−1)n+1
bn = x sin nx dx = .
π 0 n
The Fourier series is therefore
∞ ∞
π 2 X cos(2n − 1)x X sin nx
f4 (x) = − 2
+ (−1)n+1 .
4 π (2n − 1) n
n=1 n=1
By Dirichlet’s theorem this equation is valid at all points of continuity, since f(x) is under-
stood to be the periodic extension of the initially given part. At the point of discontinuity
x = π, the series converges to
1 π
(f4 (π− ) + f4 (π+ )) = .
2 2
When x = π is substituted in the expansion, we obtain the sum of the reciprocals of the
squares of the odd numbers:
∞
X 1 1 1 1 π2
= 1 + + + + · · · = .
(2n − 1)2 32 52 72 8
n=1
7
With this result, we can also conclude that the sum of the reciprocals of the squares of all
the positive integers is given by
∞
X 1 1 1 1 π2
= 1 + + + + · · · = .
n2 22 32 42 6
n=1
However, if the Fourier series is not uniformly convergent because there are points of
discontinuity of f at the end points, there is an abnormality happening at the truncated
1 XN
Fourier series fN (x) = a0 + (an cos nx + bn sin nx), at the discontinuity points. If
2
n=1
α0 is a point of discontinuity, the jump in the truncated sum can be written as
with > 0 arbitrarily small. When → 0 and N → ∞ it can be proven that the jump of
the truncated sum can be approximated by
This means that very close to a discontinuity, the Fourier approximation overshoots the
function by about 18%. This is often called the Gibbs phenomenon.
8
7.3 Extension to arbitrary intervals
The standard form of a Fourier series, i.e., where the function under consideration is
defined on the interval −π ≤ x < π, might be adapted to a function defined on an
interval −L ≤ x < L, where L is a positive number different from π. This is done by the
change of variable
πx
t= .
L
The function f(x) is transformed into a function of t:
Lt
f(x) = f = g(t), −π ≤ t < π ,
π
and if f(x) satisfies the Dirichlet conditions, so does g(t). Therefore we can expand g(t)
in a Fourier series as usual:
X ∞
1
g(t) = a0 + (an cos nt + bn sin nt).
2
1
Next we transform this back into a solution of the original problem, i.e., finding an ex-
pansion of f(x) on the interval −L ≤ x < L :
X∞
1 nπx nπx
f(x) = a0 + an cos + bn sin .
2 L L
1
This is equivalent to computing directly the expression above, where we determine the
coefficients as
ZL
1
a0 = f(x) dx,
L −L
ZL
1 nπx
an = f(x) cos dx,
L −L L
ZL
1 nπx
bn = f(x) sin dx.
L −L L
9
Next we obtain the Fourier expansion of g(t):
1 0, n = 2m
a0 = 1; an = 0, n ≥ 1; bn = (1 − (−1)n ) = 2
nπ , n = 2m − 1
nπ
Therefore we have
∞
1 2 X sin(2n − 1)t
g(t) = +
2 π 2n − 1
1
10
Example: The sequence
One can form series similar to Fourier series, called generalized Fourier series, by using
any orthogonal sequence of functions. The formula for the generalized Fourier coeffi-
cients is particularly simple if
Zb
θm (x)θn (x) dx = 1, for m = n.
a
In this case, the functions θn (x) are said to be normalized, and {θn (x)} is called an or-
thonormal sequence. On the other hand, if
Zb
(θn (x))2 dx = αn 6= 1,
a
and a function f is called a null function if ||f|| = 0. The norm has the simple properties:
11
||f + g|| ≤ ||f|| + ||g|| (Minkowski inequality)
Now let {φn (x)} be an orthonormal sequence of functions on [a, b], and suppose we want
to expand another function f(x) in a series of the form
To determine the coefficients an we multiply both sides by φn (x) and integrate term by
term (assuming such an integration is valid). This yields:
Zb Zb
f(x)φn (x) dx = an [φn (x)]2 dx = an .
a a
A representation based on this family of functions is called the complex Fourier series
∞
X
f(x) = cn einx ,
n=−∞
where the coefficients are normally complex numbers. This expansion is often easier to
calculate since it involves integration of exponentials.
It is easy to obtain the complex Fourier series from the trigonometric sine/cosine Fourier
series:
∞ ∞
a0 X X
f(x) = + an cos nx + bn sin nx =
2
n=1 n=1
∞
X ∞
X
a0 einx + e−inx einx − e−inx
= + an + bn =
2 2 2i
n=1 n=1
12
∞ ∞ ∞
a0 X an − ibn inx X an + ibn −inx X
= + e + e = cn eint ,
2 2 2 n=−∞
n=1 n=1
with a0
, n=0
2
an − ibn
cn = n = 1, 2, 3, . . .
2
a−n + ib−n n = −1, −2, −3, . . .
2
Thus, for n positive
Zπ Zπ
1 1 1
cn = (an − ibn ) = f(x)(cos nx − i sin nx)dx = f(x)e−inx dx,
2 2π −π 2π −π
Summarising:
Zπ
a0 1
c0 = ; cn = f(x)e−inx dx, n 6= 0
2 2π −π
Example: Let’s find the complex Fourier series of the square wave f2 (x) = 0, if −π ≤ x <
0, and f2 (x) = π, if 0 ≤ x ≤ π. We have
Z Z
1 π −inx 1 π −inx 1 − e−inπ
cn = f(x)e dx = πe dx = , n 6= 0,
2π −π 2π 0 2ni
0, n even
cn = 1 −i , n 6= 0
= , n odd
ni n
and Z
1 π π
c0 = πdx = .
2π 0 2
Therefore the complex Fourier expansion is given by:
π X 1 π
e−3ix e−ix eix e3ix
inx
f(x) = − i e = − i ··· + + + + + ... .
2 n 2 −3 −1 1 3
|n| odd
13
It is easy to verify that this expansion coincides with the real one obtained in example 2,
an − ibn 2
since cn = , and thus an = 0 and bn = , as we already knew.
2 n
This result states clearly the direct relation between complex analysis and Fourier series.
However, this relation is enhanced with the following considerations. If we identify pe-
riodic continuous functions on R with continuous functions defined on the unit circle
C1 , we can view a periodic real function f as a (complex!) function defined on C1 ⊂ C.
As we will see in chapter 8, it is possible to extend univoquely our function f to the set
T1 = {z ∈ C : |z| ≤ 1} and get an analytic function. As a consequence, this function has a
power series expansion
X
cn zn .
n
which is a convergent series. The coefficients cn are obviously the ones determined at
the beginning of the section.
If we compute the derivatives and substitute into the equation we can use the method of
the undetermined coefficients to find A0 , An and Bn in the Fourier expansion and obtain
the desired solution y(x).
14
Example: Solve the following ODE:
y 00 + 2y = f(x),
where f(x) is 2π-periodic and defined by f(x) = x2 , −π < x < π. First we compute the
Fourier expansion of f, but notice that since it is an even function, we will have bn = 0,
for all n. We have: Zπ
1 2π2
a0 = x2 dx = ,
π −π 3
and integrating by parts
Zπ
1 4
an = x2 cos nxdx = (−1)n .
π −π n2
Therefore
∞
π2 X 4
f(x) = + (−1)n 2 cos nx.
3 n
n=1
with derivatives
∞
X ∞
X
0
y (x) = − nAn sin nx + Bn n cos nx,
n=1 n=1
and
∞
X ∞
X
00 2
y (x) = − n An cos nx − Bn n2 sin nx.
n=1 n=1
∞
π2 X 4
= + (−1)n 2 cos nx.
3 n
n=1
Setting the coefficients of the corresponding terms equal to one another, we get
Bn = 0
π2
A0 =
3
4
An = (−1)n
n2 (2 − n2 π2 )
15
Thus, the desired particular solution is
∞
π2 X 4
y(x) = + (−1)n 2 cos nx.
6 n (2 − n2 π2 )
n=1
Now, assume that there is an external force Fe = f(t) acting on the body of mass m. In
this situation, we want to solve the differential equation
mx 00 + kx = f(t).
The most important case is that in which f(t) is periodic, so that it can be expanded by
a Fourier series. Since we know how to solve the reduced (non-homogeneous) equation,
we only need a particular solution xp of the complete ODE. And we are mostly interes-
ted in particular solutions that are periodic with the same period as f(t). We call this
particular solution the steady periodic solution. The resulting equation
x 00 + a2 x = 0,
16
and we seek a 2L-periodic solution of the form
∞ ∞
A0 X nπt X nπt
xp (t) = + An cos + Bn sin ,
2 L L
n=1 n=1
where the coefficients will be determined, as before, by the method of the undetermined
coefficients. In some situations we can find that, when we expand f(t), some of its terms
coincide with the solution to the reduced equation. Then, we cannot use those terms in
the trial solution, since we will get a contradictory equation. That is, suppose
Nπ
a=
L
for some integer N. In this case we have to modify our proposed solution and try
X∞
A0 Nπt nπt nπt nπt
xp (t) = + t AN cos + BN sin + An cos + Bn sin .
2 L L L L
n=1
n6=N
Of course, the solution obtained in this way is not a Fourier series, not even periodic.
Further, the terms t AN cos Nπt nπt
will eventually dominate (when t → ∞)
L + BN sin L
and lead to wild oscillations. This behaviour or tendency of the system to oscillate at a
greater amplitude at some frequencies than at others is called pure resonance (or just res-
onance), and the corresponding frequences are called resonant frequencies or resonant
modes.
P∞ (−1)n
Consider m = 1, a = 9 and f(t) = n=1 n sin nt. Our trial solution is
∞ ∞
A0 X X
x(t) = + cos nt + sin nt .
2
n=1 n=1
(−1)n
A0 = 0; An = 0; (9 − n2 )Bn = .
n
Thus, for n 6= 3 we have the coefficients
(−1)n
Bn = .
n(9 − n2 )
A3 t cos 3t + B3 t sin 3t ,
17
with first and second derivatives given by
and
A3 (−6 sin 3t − 9t cos 3t) + B3 (6 cos 3t − 9t sin 3t) ,
(−1)3
A3 (−6 sin 3t−9t cos 3t)+B3 (6 cos 3t−9t sin 3t)+9(A3 t cos 3t+B3 t sin 3t) = sin 3t .
3
Equating the coefficients of cos 3t and sin 3t we obtain
(−1)3 1
−6A3 − 9tB3 + 9B3 t = ⇒ A3 = ,
3 18
and
−9tA3 + 6B3 + 9tA3 = 0 ⇒ B3 = 0 .
18