If h(x) is a function of period 2L, then it can be proved that h(x) can be expressed as the following series
| (1) |
which is called Fourier series. It is not trivial to prove the above statement (what is needed in the proof is to prove that the set of functions cos(nπx∕L) and sin(nπx∕L) with n = 0,1,…∞ is a “complete set”[1]). I will ignore this proof and simply start with Eq. (1).
At this point it is not clear what the coefficients an and bn are. These can be obtained by taking product of Eq. (1) with cos(jπx∕L) and sin(jπx∕L), respectively, and then integrating form −L to L, which gives
| (2) |
and, for j ≥ 1,
| (3) |
| (4) |
In order to enable an to be uniformly expressed by Eq. (3), Fourier series are often redefined as
| (5) |
[Fourier series (5) can also be written as
| (6) |
where n ranges from −∞ to ∞, and there is no special treatment for the edge case of n = 0. In obtaining expression (6) from (5) , use has been made of an cos(nπx∕L) = a−n cos(−nπx∕L) and bn sin(nπx∕L) = b−n sin(−nπx∕L).]
Note that sine and cosine are similar to each other: one can be obtained from the other by shifting, i.e., they differs only in the “phase”. Using trigonometric identities, expression (5) can be expressed in terms of only cosine:
| (7) |
where the amplitude An is given by
| (8) |
and the phase Φn is given by
| (9) |
where atan2(y,x) is the 2-argument arctangent, which gives an angle in the correct quadrant. Expresion (7) can be stated as: a periodic signal is composed of cosine functions of different frequencies and phases (we interpret x as time).
If h(x) is a complex-valued function (the independent variable x is still real number), then the above Fourier expansion can be applied to its real part and imaginary part, respectively. Combining the results, we can see that Eqs. (3)-(5) is still valid. In this case, an and bn are complex numbers.