You are on page 1of 9

10/01/2017 Definition of Fourier Series and Typical Examples

Math24.net
Calculus

Home

Calculus
Limits and Continuity
Differentiation
Applications of Derivative
Integration    Definition of Fourier Series and Typical Examples
Sequences and Series
Double Integrals
Triple Integrals
Line Integrals Baron Jean Baptiste Joseph Fourier (1768 − 1830) introduced
Surface Integrals the idea that any periodic function can be represented by a
Fourier Series series of sines and cosines which are harmonically related. 
Differential Equations  
1st Order Equations To consider this idea in more detail, we should introduce some
2nd Order Equations definitions and common terms.
Nth Order Equations
Systems of Equations
Formulas and Tables

Basic Definitions
A function f (x) is said to have period P  if f (x + P ) = f (x) for all x. Let the function f (x) has period 2π. In this
case, it is enough to consider behavior of the function on the interval [−π, π] .

1.  Suppose that the function f (x) with period 2π is absolutely integrable on on [−π, π] so that the following


so­called Dirichlet integral is finite:
π

∫ |f (x)| dx < ∞;

−π

2.  Suppose also that the function f (x) is a single valued, piecewise continuous (must have a finite number of


jump discontinuities), and piecewise monotonic (must have a finite number of maxima and minima).

If the conditions 1 and 2 are satisfied, the Fourier series for the function f (x) exists and converges to the given
function (see also the Convergence of Fourier Series page about convergence conditions.) 

At a discontinuity x , the Fouries Series converges to
0

1
lim [f (x0 − ε) − f (x0 + ε)] .
ε→0
2

The Fourier series of the function f (x) is given by

a0
f (x) = + ∑ {an cos nx + bn sin nx},
2
n=1

where the Fourier coefficients a , a , and b  are defined by the integrals


0 n n

π π π

1 1 1
a0 = ∫ f (x) dx, an = ∫ f (x) cos nxdx, bn = ∫ f (x) sin nxdx.
π π π
−π −π −π

Sometimes alternative forms of the Fourier series are used. Replacing a  and b  by the new variables d  and φ  or d


n n n n n

and θ , where
n

an bn
2 2
dn = √an + bn , tan φn = , tan θn = ,
bn an

http://www.math24.net/definition­of­fourier­series.html 1/9
10/01/2017 Definition of Fourier Series and Typical Examples
we can write:
∞ ∞
a0 a0
f (x) = + ∑ dn sin(nx + φn ) or f (x) = + ∑ dn cos(nx + θn ).
2 2
n=1 n=1

Fourier Series of Even and Odd Functions
The Fourier series expansion of an even function f (x) with the period of 2π does not involve the terms with sines
and has the form:

a0
f (x) = + ∑ an cos nx,
2
n=1

where the Fourier coefficients are given by the formulas
π π

2 2
a0 = ∫ f (x) dx, an = ∫ f (x) cos nxdx.
π π
0 0

Accordingly, the Fourier series expansion of an odd 2π­periodic function f (x) consists of sine terms only and has the
form:

f (x) = ∑ bn sin nx,

n=1

where the coefficients b  are n

2
bn = ∫ f (x) sin nxdx.
π
0

Below we consider expansions of 2π­periodic functions into their Fourier series, supposing that these expansions
exist and are convergent. 

   Example 1

Let the function f (x) be 2π­periodic and suppose that it is presented by the Fourier series:

a0
f (x) = + ∑ {an cos nx + bn sin nx}.
2
n=1

Calculate the coefficients a , a , and b0 n n


.

Solution.
To define a , we integrate the Fourier series on the interval [−π, π] :
0

π π π

⎡ ⎤
∫ f (x) dx = πa0 + ∑ ⎢an ∫ cos nxdx + bn ∫ sin nxdx⎥.

n=1 ⎣ ⎦
−π −π −π

For all n > 0,
π π
π
π
sin nx ∣ cos nx ∣
∫ cos nxdx = ( )∣ = 0 and ∫ sin nxdx = (− ) = 0.
n ∣ n ∣
−π
−π
−π −π

Therefore, all the terms on the right of the summation sign are zero, so we obtain
π π

1
∫ f (x) dx = πa0 or a0 = ∫ f (x) dx.
π
−π −π

In order to find the coefficients a , we multiply both sides of the Fourier series by cos mx and integrate term by


n

term:
π π π π

a0 ⎡ ⎤
∫ f (x) cos mxdx = ∫ cos mxdx + ∑ ⎢an ∫ cos nx cos mxdx + bn ∫ sin nx cos mxdx⎥.
2
n=1 ⎣ ⎦
−π −π −π −π

http://www.math24.net/definition­of­fourier­series.html 2/9
10/01/2017 Definition of Fourier Series and Typical Examples
The first term on the right side is zero. Then, using the well­known trigonometric identities, we have
π π

1
∫ sin nx cos mxdx = ∫ [sin(n + m)x + sin(n − m)x] dx = 0,
2
−π −π

π π

1
∫ cos nx cos mxdx = ∫ [cos(n + m)x + cos(n − m)x] dx = 0,
2
−π −π

if m ≠ n. 

In case when m = n, we can write:
π π π
π
1 2
1 cos 2mx ∣
∫ sin nx cos mxdx = ∫ [sin 2mx + sin 0] dx, ⇒ ∫ sin mxdx = [ (− )∣ ]
2 2 2m ∣
−π
−π −π −π

1
= [− cos(2mπ) + cos(2m (−π)) ] = 0;
4m

π π π
π
1 2
1 sin 2mx ∣
∫ cos nx cos mxdx = ∫ [cos 2mx + cos 0] dx, ⇒ ∫ cos mxdx = [( )∣ + 2π]
2 2 2m ∣
−π
−π −π −π

1
= [sin(2mπ) − sin(2m (−π))] + π = π.
4m

Thus,
π π

1
∫ f (x) cos mxdx = am π, ⇒ am = ∫ f (x) cos mxdx, m = 1, 2, 3, …
π
−π −π

Similarly, multiplying the Fourier series by sin mx and integrating term by term, we obtain the expression for b m :

1
bm = ∫ f (x) sin mxdx, m = 1, 2, 3, …
π
−π

Rewriting the formulas for a , b , we can write the final expressions for the Fourier coefficients:


n n

π π

1 1
an = ∫ f (x) cos nxdx, bn = ∫ f (x) sin nxdx.
π π
−π −π

   Example 2

Find the Fourier series for the square 2π­periodic wave defined on the interval [−π, π] :

0, if −π ≤ x ≤ 0
f (x) = { .
1, if 0 < x ≤ π

Solution.
First we calculate the constant a 0
:

π π

1 1 1
a0 = ∫ f (x) dx = ∫ 1dx = ⋅ π = 1.
π π π
−π 0

Find now the Fourier coefficients for n ≠ 0 :
π π
π
1 1 1 sin nx ∣ 1
an = ∫ f (x) cos nxdx = ∫ 1 ⋅ cos nxdx = [( )∣ ] = ⋅ 0 = 0,
π π π n ∣ πn
0
−π 0

π π

http://www.math24.net/definition­of­fourier­series.html 3/9
10/01/2017 Definition of Fourier Series and Typical Examples
π π
π
1 1 1 cos nx 1

bn = ∫ f (x) sin nxdx = ∫ 1 ⋅ sin nxdx = [ (− ) ] = − ⋅ (cos nπ − cos 0)
π π π n ∣ πn
0
−π 0

1 − cos nπ
= .
πn

As cos nπ = (−1) , we can write:


n

n
1 − (−1)
bn = .
πn

Thus, the Fourier series for the square wave is
∞ n
1 1 − (−1)
f (x) = + ∑ sin nx.
2 πn
n=1

We can easily find the first few terms of the series. By setting, for example, n = 5, we get
2 3 4
1 1 − (−1) 1 − (−1) 1 − (−1) 1 − (−1)
f (x) = + sin x + sin 2x + sin 3x + sin 4x
2 π 2π 3π 4π
5
1 − (−1) 1 2 2 2
+ sin 5x + … = + sin x + sin 3x + sin 5x + …
5π 2 π 3π 5π

The graph of the function and the Fourier series expansion for n = 10 is shown in Figure 1.

Fig.1, n = 10 Fig.2, n = 5, n = 10

   Example 3

Find the Fourier series for the sawtooth wave defined on the interval [−π, π] and having period 2π.

Solution.
Calculate the Fourier coefficients for the sawtooth wave. Since this function is odd (Figure 2), then a 0
= an = 0.

Find the coefficients b : n

π π

1 1
bn = ∫ f (x) sin nxdx = ∫ x sin nxdx.
π π
−π −π

To calculate the latter integral we use integration by parts formula:
π π

π
∫ udv = (uv)| − ∫ vdu.
−π

−π −π

cos nx
Let u = x, dv = sin nxdx.  Then du = dx, v = ∫ sin nxdx = −
n
,  so the integral becomes

http://www.math24.net/definition­of­fourier­series.html ⎡ ⎤ 4/9
10/01/2017 Definition of Fourier Series and Typical Examples
π π

1 1 ⎡ cos nx
π
cos nx


bn = ∫ x sin nxdx = ⎢ (− ) − ∫ (− ) dx⎥
π π n ∣ n
−π
⎣ ⎦
−π −π

π
π
1 ⎡ π cos nπ (−π) cos(−nπ) 1 ⎤ 1 sin nx ∣
= ⎢(− + ) + ∫ cos nxdx⎥ = [−2π cos nπ + ( )∣ ]
π n n n nπ n ∣
⎣ ⎦ −π
−π

1 1 1 2 sin nπ
= [−2π cos nπ + (sin nπ − sin(−nπ))] = [−2π cos nπ + ]
nπ n nπ n

2 sin nπ
= [ − π cos nπ] .
nπ n

Substituting sin nπ = 0 and cos nπ = (−1)  for all integer values of n, we obtain n

2 n
2 n
2 n+1
bn = (−π(−1) ) = − (−1) = (−1) .
nπ n n

Thus, the Fourier series expansion of the sawtooth wave is (Figure 2 above)

2 n+1
x = ∑ (−1) sin nx.
n
n=1

   Example 4

Let f (x) be a 2π­periodic function such that f (x) = x  for x ∈ [−π, π] . Find the Fourier series for the parabolic


2

wave.

Solution.
Since this function is even, the coefficients b n
= 0.  Then
π π π
π
3 3 2
1 1 2 2 x ∣ 2 π 2π
2 2
a0 = ∫ f (x) dx = ∫ x dx = ∫ x dx = ⋅ [( )∣ ] = ⋅ = ,
π π π π 3 ∣ π 3 3
0
−π −π 0

π π π

1 2 2
2
an = ∫ f (x) cos nxdx = ∫ f (x) cos nxdx = ∫ x cos nxdx.
π π π
−π 0 0

Apply integration by parts twice to find:

2
u = x
π ⎡ ⎤ π
π
dv = cos nxdx ⎡ 2
x sin nx ∣ ⎤
2 2 ⎢ ⎥ 2 sin nx
an = ∫ x cos nxdx = ⎢ ⎥ = ⎢( )∣ − ∫ 2x dx⎥
⎢ du = 2xdx ⎥
π ⎢ ⎥ π n ∣0 n
⎣ ⎦
0 0
sin nx
⎣ v = ∫ cos nxdx = ⎦
n

π π
⎡ ⎤ ⎡ ⎤
2 2
2
2 2
= ⎢π sin nπ − (−π) sin(−nπ) − 2 ∫ x sin nxdx⎥ = ⎢2π sin nπ − 2 ∫ x sin nxdx⎥
πn πn
⎣ ⎦ ⎣ ⎦
0 0

u = x
π ⎡ ⎤
4 ⎢ dv = sin nxdx ⎥
= − ∫ x sin nxdx = ⎢ ⎥
⎢ ⎥
πn ⎢ du = dx ⎥
0
cos nx
⎣ v = ∫ sin nxdx = − ⎦
n

π π

4 ⎡ π ⎤ 4 ⎡ ⎤
x cos nx ∣ cos nx
= − ⎢ (− ) − ∫ (− ) dx⎥ = ⎢π cos nπ − ∫ cos nxdx⎥
πn n ∣ n 2
⎣ 0
⎦ πn ⎣ ⎦
0 0

π
4 sin nx ∣ 4 sin nπ
= [π cos nπ − ( )∣ ] = [π cos nπ − ].
2 2
πn n ∣ πn n
0

As sin nπ = 0 and cos nπ = (−1)  for integer n, we have


n

4 n
4 n
an = ⋅ π(−1) = (−1) .
πn2 n2

Then the Fourier series expansion for the parabolic wave is (Figure 3)

2 ∞

http://www.math24.net/definition­of­fourier­series.html 5/9
10/01/2017 Definition of Fourier Series and Typical Examples
2 ∞
π 4 n
2
x = + ∑ (−1) cos nx.
3 n2
n=1

Fig.3, n = 2, n = 5 Fig.4, n = 1, n = 2

   Example 5

Find the Fourier series for the triangle wave
π
+ x, if −π ≤ x ≤ 0
2
f (x) = { π ,
− x, if 0 < x ≤ π
2

defined on the interval [−π, π] .

Solution.
The constant a  is 0

π 0 π
⎡ π π ⎤
1 1
a0 = ∫ f (x) dx = ⎢ ∫ ( + x) dx + ∫ ( − x) dx⎥
π π 2 2
⎣ ⎦
−π −π 0

0 π
2 2
1 π x ∣ π x ∣
= [( x + )∣ + ( x − )∣ ]
π 2 2 ∣ 2 2 ∣
−π 0

2
2 2 2
1 ⎡ ⎛ π (−π) ⎞ π π ⎤
= 0 − − + + ( − ) − 0 = 0.
π ⎣ ⎝ 2 2 ⎠ 2 2 ⎦

Determine the coefficients a n
:

π 0 π

1 1 ⎡ π π ⎤
an = ∫ f (x) cos nxdx = ⎢ ∫ ( + x) cos nxdx + ∫ ( − x) cos nxdx⎥
π π 2 2
⎣ ⎦
−π −π 0

0 0 π π
⎡ π π ⎤
1
= ⎢ ∫ cos nxdx + ∫ x cos nxdx + ∫ cos nxdx − ∫ x cos nxdx⎥ .
π 2 2
⎣ ⎦
−π −π 0 0

Integrating by parts, we can write

x sin nx x sin nx x sin nx cos nx


∫ x cos nxdx = − ∫ dx = + .
n n n n2

Then
0 0 π π
1 π sin nx ∣ x sin nx cos nx ∣ π sin nx ∣ x sin nx cos nx ∣
an = [ ( )∣ + ( + )∣ + ( )∣ − ( + )∣ ] .
π 2 n ∣ n n2 ∣ 2 n ∣ n n2 ∣
−π −π 0 0

The values of sin nx at x = 0 or x = ±π are zero. Therefore,

1 1 2
http://www.math24.net/definition­of­fourier­series.html 6/9
10/01/2017 Definition of Fourier Series and Typical Examples
1 0 π
1 2
an = [ (cos nx)| − (cos nx)| ] = [cos 0 − cos(−πn) − cos πn + cos 0] = [1 − cos πn]
2 −π 0 2 2
πn πn πn

2 n
= [1 − (−1) ] .
2
πn

4
When n = 2k, then a 2k
= 0.  When n = 2k + 1, then a 2k+1
= 2
, k = 0, 1, 2, 3, …  
πn

Since the function f (x) is even, the Fourier coefficients b  are zero. Therefore, the complete Fourier expansion for n

the triangle wave (see Figure 4 above) is

4 cos(2k + 1)x
f (x) = ∑ .
2
π
k=0
(2k + 1)

   Example 6

Find the Fourier series for the function

0, if −π ≤ x ≤ 0
f (x) = { ,
sin x, if 0 < x ≤ π

defined on the interval [−π, π] .

Solution.
First we find the constant a 0
:

π π

1 1 1 π
1 2
a0 = ∫ f (x) dx = ∫ sin xdx = [ (− cos x)| ] = (− cos π + cos 0) = .
0
π π π π π
−π 0

Now we calculate the coefficients a n
:

π π π

1 1 1
an = ∫ f (x) cos nxdx = ∫ sin x cos nxdx = ∫ [sin(x + nx) + sin(x − nx)] dx
π π 2π
−π 0 0

π
π
1 1 cos(n + 1)x cos(n − 1)x ∣
= ∫ [sin(n + 1)x + sin(n − 1)x] dx = [ (− + )∣ ]
2π 2π n + 1 n − 1 ∣
0
0

1 cos(n − 1)π cos(n + 1)π 1 1


= [ − − + ]
2π n − 1 n + 1 n − 1 n + 1

1 cos(n − 1)π cos(n + 1)π 2


= [ − − ].
2
2π n − 1 n + 1 n − 1

Notice that

cos(n + 1)π = cos(πn + π) = cos(πn − π + 2π) = cos((n − 1) π + 2π) = cos(n − 1)π.

Since cos(n − 1)π = (−1) n−1


,  we get the following expression for the coefficients a n
:

1 2 n−1
an = ⋅ ⋅ [(−1) − 1] .
2
2π n − 1

It can be seen that a n
= 0  for odd n. For even n, when n = 2k (k = 1, 2, 3, …) ,  we have

1 4 1 2
a2k = ⋅ (− ) = − ⋅ .
2 2
2π k − 1 π k − 1

Calculate the coefficients b . Start with b n 1
:

π π π π

1 1 1 2
1
b1 = ∫ f (x) sin xdx = ∫ sin x sin xdx = ∫ sin xdx = ∫ (1 − cos 2x) dx
π π π 2π
−π 0 0 0

π
1 sin 2x ∣ 1 1
= [ (x − )∣ ] = ⋅ π = .
2π 2 ∣ 2π 2
0

The other coefficients b  for n > 1 are zero. Indeed,


n

π π π

http://www.math24.net/definition­of­fourier­series.html 7/9
10/01/2017 Definition of Fourier Series and Typical Examples
π π π

1 1 1
bn = ∫ f (x) sin nxdx = ∫ sin x sin nxdx = ∫ [cos(x − nx) − cos(x + nx)] dx
π π 2π
−π 0 0

π
π
1 1 sin(n − 1)x sin(n + 1)x ∣
= ∫ [cos(n − 1)x − cos(n + 1)x] dx = [( − )∣ ] = 0
2π 2π n − 1 n + 1 ∣
0
0

Thus, the Fourier series of the given function is given by

1 1 2 1
f (x) = + sin x − ∑ cos(2kx).
2
π 2 π 4k − 1
k=1

Graphs of the function and its Fourier expansions for n = 2 and n = 8 are shown in Figure 5.

Fig.5, n = 2, n = 8 Fig.6, n = 10

   Example 7

Find the Fourier series for the function
π
⎧ −1, if −π ≤ x ≤ −
⎪ 2
π π
f (x) = ⎨ 0, if −
2
< x ≤
2
,

⎪ π
1, if < x ≤ π
2

defined on the interval [−π, π] .

Solution.
π π

π ⎡ 2 2 π ⎤
1 1 1 π π
⎢ ⎥
a0 = ∫ f (x) dx = ⎢ ∫ (−1) dx + ∫ 0dx + ∫ 1dx⎥ = (− + 0 + ) = 0.
π π ⎢ ⎥ π 2 2
π π
−π ⎣−π − ⎦
2 2

Compute the coefficients a n
:

π

π ⎡ 2 π ⎤
1 1
⎢ ⎥
an = ∫ f (x) cos nxdx = ⎢ ∫ (− cos nx) dx + ∫ cos nxdx⎥
π π ⎢ ⎥
π
−π ⎣−π ⎦
2

π
− π
1 sin nx ∣ 2 sin nx ∣ 1 nπ nπ
= [ (− )∣ + ( )∣ ] = [− sin(− ) + sin(−nπ) + sin nπ − sin ]
π n ∣ n ∣ π πn 2 2
−π
2

1 nπ nπ
= [ sin − sin nπ + sin nπ − sin ] = 0.
πn 2 2

(These results are obvious since this function is odd.) 

Calculate the coefficients b n
:

http://www.math24.net/definition­of­fourier­series.html ⎡ ⎤ 8/9
10/01/2017 Definition of Fourier Series and Typical Examples
π

π ⎡ 2 π ⎤
1 1
⎢ ⎥
bn = ∫ f (x) sin nxdx = ⎢ ∫ (− sin nx) dx + ∫ sin nxdx⎥
π π ⎢ ⎥
π
−π ⎣−π ⎦
2

π
− π
1 cos nx cos nx 1 nπ nπ
∣ 2 ∣
= [( ) − ( ) ] = [cos(− ) − cos(−nπ) − cos nπ + cos ]
π n ∣ n ∣ π
πn 2 2
−π
2

1 nπ nπ 2 nπ
= [cos − cos nπ − cos nπ + cos ] = (cos − cos nπ) .
πn 2 2 πn 2

Thus, the Fourier series expansion of the function is given by

2 1 nπ
f (x) = ∑ (cos − cos nπ) sin nx.
π n 2
n=1

The graph of the function and the Fourier series expansion for n = 10 are shown in Figure 6 above.

30 Like 286
 

All Rights Reserved © www.math24.net, 2010­2016   info@math24.net

http://www.math24.net/definition­of­fourier­series.html 9/9

You might also like