Suppose that the real function f may be presented as sum of the Fourier series:
f(x) = + ∑
m=0∞(a
m cos mx + bm sin mx) | | (1) |
Therefore, f is periodic with period 2π. For expressing the Fourier coefficients am and bm with the
function itself, we first multiply the series (1) by cos nx (n ∈ ℤ) and integrate from −π to π.
Supposing that we can integrate termwise, we may write
∫
−ππf(x) cos nxdx = ∫
−ππcos nxdx +∑
m=0∞ . | |
(2) |
When n = 0, the equation (2) reads
∫
−ππf(x) dx = ⋅ 2π = πa0, | | (3) |
since in the sum of the right hand side, only the first addend is distinct from zero.
When n is a positive integer, we use the product formulas of the trigonometric identities,
getting
The latter expression vanishes always, since the sine is an odd function. If m≠n, the
former equals zero because the antiderivative consists of sine terms which vanish at
multiples of π; only in the case m = n we obtain from it a non-zero result π. Then (2)
reads
| ∫
−ππf(x) cos nxdx = πa
n | | (4) |
to which we can include as a special case the equation (3).
By multiplying (1) by sin nx and integrating termwise, one obtains similarly
| ∫
−ππf(x) sin nxdx = πb
n. | | (5) |
The equations (4) and (5) imply the formulas
and
for finding the values of the Fourier coefficients of f.