But
π

π
e
i
(
n

k
)
x
dx
=
1
i
(
n

k
)
e
i
(
n

k
)
x
π

π
= 0
if
n
=
k,
(7)
π

π
e
i
(
n

k
)
x
dx
=
π

π
dx
= 2
π
if
n
=
k.
(8)
Notice that via (5) one obtains from this easily the following formulas, which are
useful otherwise, (
m, n
∈
IN),
π

π
sin
nx
sin
mx dx
=
0
for
n
=
m,
or
n
=
m
= 0
π
for
n
=
m
= 0
,
(9)
π

π
cos
mx
cos
nx dx
=
0
for
n
=
m,
π
for
n
=
m
= 0
,
(10)
π

π
sin
mx
cos
nx dx
= 0
.
(11)
In view of (7) and (8), the only term in the series that survives the integration is
the term with
n
=
k
, hence
π

π
f
(
x
)
e

ikx
dx
= 2
πc
k
.
In other words, relabeling the integer
k
as
n
, we find
c
n
=
1
2
π
π

π
f
(
x
)
e

inx
dx,
n
= 0
,
±
1
,
±
2
,
. . . .
(12)
Using (6) and (2), this leads to
a
n
=
1
π
π

π
f
(
x
) cos
nx dx,
n
= 0
,
1
,
2
, . . . ,
(13)
b
n
=
1
π
π

π
f
(
x
) sin
nx dx,
n
= 1
,
2
,
. . . .
(14)
To summarize:
If
f
has a series expansion of the form (3) and (4), and the series
converge decently so that termbyterm integration is permissable,
then
the coeffi
cients
c
n
,
a
n
and
b
n
are given by (12), (13) and (14).
On the other hand, if
f
is (2
π
)periodic and Riemann integrable over [

π,
+
π
], then
the integrals in (12),(13) and (14) make good sense, too. We are now in a position
to make a formal definition.
Definition 2.1.
Suppose
f
is
2
π
periodic and integrable over
[

π, π
]
. Then the
numbers
c
n
,
a
n
and
b
n
defined by (12),(13) and (14) are called the Fourier coefficients
of
f
, and the corresponding series
∞
n
=
∞
c
n
e
inx
or
1
2
a
0
+
∞
n
=1
(
a
n
cos
nx
+
b
n
sin
nx
)
8