Moon Arrows Sun
Arrows
With demos
Arrows
Formulary mode

Fourier Series

Let \(f(t)\) be a \(T\)-periodic function.


Fourier's hypothesis is that this function can be reconstructed as a sum of cosines and sines:

$$f(t) = a_0 + \sum_{n = 1}^{+ \infty} a_n \cos(n \omega t) + \sum_{n = 1}^{+ \infty} b_n \sin(n \omega t) $$

With the first coefficient \(a_0\):

$$a_0 = \frac{1}{T}\int_{0}^{T} f(t) \, dt $$

And the two coefficients \((a_n, \ b_n)\):

$$ \forall n \in \mathbb{N}^*,$$
$$ a_n = \frac{2}{T} \int_{0}^{T} f(t) \cos(n \omega t) \, dt $$
$$ b_n = \frac{2}{T} \int_{0}^{T} f(t) \sin(n \omega t) \, dt $$
$$ \text{with } \begin{cases} T : \text{Period of the function } f(t) \\ \omega = \frac{2\pi}{T} : \text{Pulsation } \end{cases} $$

By switching to exponential notation, we get everything under a single sum:

$$f(t) = \sum_{-\infty}^{+\infty} c_n \ e^{in\omega t} $$

As well as a single coefficient \((c_n)\):

$$ c_n = \frac{1}{T} \int_{0}^{T} f(t) e^{-in\omega t} \, dt $$

Proofs

The trigonometric notation

Let \(n \in \mathbb{N}^*\) be a natural number greater than or equal to 1.

As this proof is quite long, we have split it into several successive steps.

  1. In the ideal world: on \( \bigl[-\pi; \pi\bigr]\)

    Let \(f(x)\) be a \(2\pi\)-periodic function.

    In this world, the angular frequency is \(\omega = \frac{2\pi}{2\pi} = 1\). The sines and cosines are therefore simply written as \(\sin(nx)\) and \(\cos(nx)\).

    Fourier's initial hypothesis is that this function can be reconstructed as a sum of cosines and sines:

    $$f(x) = a_0 + \sum_{n = 1}^{+ \infty} a_n \cos(nx) + \sum_{n = 1}^{+ \infty} b_n \sin(nx) \qquad(H)$$

    The goal is then to determine the coefficients \((a_0)\) and \((a_n, b_n)\) for all \(n\) as well.

    1. Isolating \( a_0 \)

      By simply integrating our starting function \((H)\), we get:

      $$\int_{-\pi}^{\pi} f(x) \hspace{0.3em} dx = \int_{-\pi}^{\pi} a_0 \hspace{0.3em} dx + \int_{-\pi}^{\pi} \sum_{n = 1}^{+ \infty} a_n \cos(nx) \hspace{0.3em} dx + \int_{-\pi}^{\pi} \sum_{n = 1}^{+ \infty} b_n \sin(nx) \hspace{0.3em} dx $$

      Since the \(cos\) and \(sin\) functions are \(2\pi\)-periodic, they cancel out over the interval from \(-\pi\) to \(\pi\):

      $$\int_{-\pi}^{\pi} f(x) \hspace{0.3em} dx = \int_{-\pi}^{\pi} a_0 \hspace{0.3em} dx + \underbrace{ \int_{-\pi}^{\pi} \sum_{n = 1}^{+ \infty} a_n \cos(nx) \hspace{0.3em} dx } _{=0} + \underbrace{ \int_{-\pi}^{\pi} \sum_{n = 1}^{+ \infty} b_n \sin(nx) \hspace{0.3em} dx } _{=0} $$

      Which, after cleaning up, yields:

      $$\int_{-\pi}^{\pi} f(x) \hspace{0.3em} dx = \int_{-\pi}^{\pi} a_0 \hspace{0.3em} dx$$
      $$\int_{-\pi}^{\pi} f(x) \hspace{0.3em} dx = 2\pi a_0 $$
      $$a_0 = \frac{1}{2\pi}\int_{-\pi}^{\pi} f(x) \hspace{0.3em} dx $$
    2. Calculating the harmonics \( a_n \)

      Let \(m \in \mathbb{N}^*\) be a natural number greater than or equal to 1.

      To isolate the coefficient \(a_n\), we multiply equation \((H)\) by \(\cos(mx)\):

      $$f(x) \cos(mx) = a_0 \cos(mx) + \sum_{n = 1}^{+ \infty} a_n \cos(nx) \cos(mx) + \sum_{n = 1}^{+ \infty} b_n \sin(nx) \cos(mx) $$

      Then we integrate it from \(-\pi\) to \(\pi\):

      $$\int_{-\pi}^{\pi} f(x) \cos(mx) \hspace{0.3em} dx = \underbrace{ \int_{-\pi}^{\pi} a_0 \cos(mx) \hspace{0.3em} dx } _{(A)} + \underbrace{ \int_{-\pi}^{\pi} \sum_{n = 1}^{+ \infty} a_n \cos(nx) \cos(mx) \hspace{0.3em} dx } _{(B)} + \underbrace{ \int_{-\pi}^{\pi} \sum_{n = 1}^{+ \infty} b_n \sin(nx) \cos(mx) \hspace{0.3em} dx } _{(C)} \qquad (1) $$

      From this point forward, many terms cancel out:

      • Part \((A)\) cancels out in all cases:

        $$ \forall m \in \mathbb{N}^*, \ A = \int_{-\pi}^{\pi} a_0 \cos(mx) \hspace{0.3em} dx \qquad (A)$$
        $$ A = a_0\left[ \frac{\sin(mx)}{m}\right]_{-\pi}^{\pi} $$
        $$ A = a_0 \left(\frac{\sin(m\pi)}{m} - \frac{\sin(-m\pi)}{m} \right) $$
        $$ A = a_0 \left( \frac{\sin(m\pi)}{m} + \frac{\sin(m\pi)}{m} \right)$$
        $$ A = a_0 \left( \frac{2\sin(m\pi)}{m} \right) $$

        All sine functions that are multiples of \(\pi\) are equal to \(0\), therefore:

        $$ A = 0 $$
      • Part \((B)\) cancels out only if \((n \neq m)\):

        $$ \forall m \in \mathbb{N}^*, \ B = \int_{-\pi}^{\pi} \sum_{n = 1}^{+ \infty} a_n \cos(nx) \cos(mx) \hspace{0.3em} dx \qquad (B)$$

        Now, we know from trigonometric addition formulas that:

        $$ \forall (\alpha, \beta) \in \hspace{0.04em} \mathbb{R}^2, $$
        $$ \cos(\alpha + \beta) + \cos(\alpha - \beta) = 2 \cos(\alpha) \cos(\beta) $$

        So, in our case:

        $$ B = \int_{-\pi}^{\pi} \sum_{n = 1}^{+ \infty} a_n \frac{ \cos\Bigl((n + m)x\Bigr) + \cos\Bigl((n - m)x\Bigr) }{2} \hspace{0.3em} dx$$

        By linearity of the integral , we can switch both symbols \(\int\) and \(\sum\):

        $$ B = \sum_{n = 1}^{+ \infty} \int_{-\pi}^{\pi} a_n \frac{ \cos\Bigl((n + m)x\Bigr) + \cos\Bigl((n - m)x\Bigr) }{2} \hspace{0.3em} dx $$
        $$ B = \sum_{n = 1}^{+ \infty} \frac{1}{2} a_n \left( \int_{-\pi}^{\pi} \cos\Bigl((n + m)x\Bigr) + \int_{-\pi}^{\pi} \cos\Bigl((n - m)x\Bigr) \hspace{0.3em} dx \right) $$

        $$ \underline{\text{Case 1: When } (n \neq m)} $$
        $$ B = \sum_{\substack{n = 1 \\ n \neq m}}^{+ \infty} \frac{1}{2} a_n \left(\left[ \frac{\sin(n + m)x}{n + m}\right]_{-\pi}^{\pi} + \left[ \frac{\sin(n - m)x}{n - m}\right]_{-\pi}^{\pi} \right) $$
        $$ B = \sum_{\substack{n = 1 \\ n \neq m}}^{+ \infty} \frac{1}{2} a_n \left(\frac{\sin\Bigl((n + m)\pi\Bigr)}{n + m} - \frac{\sin\Bigl((n + m)(-\pi)\Bigr)}{n + m} + \frac{\sin\Bigl((n - m)\pi\Bigr)}{n - m} - \frac{sin\Bigl((n - m)(-\pi)\Bigr)}{n - m} \right) $$

        All sine functions that are multiples of \(\pi\) are equal to \(0\), therefore:

        $$ B = \sum_{\substack{n = 1 \\ n \neq m}}^{+ \infty} \frac{1}{2} a_n \left(\underbrace{\frac{2\sin\Bigl((n + m)\pi\Bigr)}{n + m}} _{=0} + \underbrace{\frac{2\sin\Bigl((n - m)\pi\Bigr)}{n - m} } _{=0} \right) $$
        $$ (n \neq m) \implies B = 0 $$

        $$ \underline{\text{Case 2: When } (n = m)} $$

        All terms cancel out except one when \((n = m)\):

        $$ \begin{cases} (n + m) = 2m \implies \cos\Bigl((n + m)x\Bigr) = \cos(2mx) \\ (n - m) = 0 \implies \cos\Bigl((n - m)x\Bigr) = 1 \end{cases} $$
        $$ B = \frac{1}{2} a_m \left( \int_{-\pi}^{\pi} \cos(2mx) \, dx + \int_{-\pi}^{\pi} dx \right) $$
        $$ B = \frac{1}{2} a_m \left( \left[ \frac{\sin(2mx)}{2}\right]_{-\pi}^{\pi} + \bigl[ x \bigr]_{-\pi}^{\pi} \right) $$
        $$ B = \frac{1}{2} a_m \left( \frac{\sin(2m \pi)}{2} - \frac{\sin\Bigl(2m (-\pi) \Bigr)}{2} + \pi -(- \pi) \right) $$
        $$ B = \frac{1}{2} a_m \Bigl( \underbrace{\sin(2m \pi)} _{=0} + 2\pi \Bigr) $$
        $$ (n = m) \implies B = a_m \pi $$

        Comment:

        Conveniently enough, the case \((n = m)\) must be treated separately anyway, because \(B\) would not have been defined due to its denominator.

      • Part \((C)\) cancels out in all cases:

        $$ \forall m \in \mathbb{N}^*, \ C = \int_{-\pi}^{\pi} \sum_{n = 1}^{+ \infty} b_n \sin(nx) \cos(mx) \hspace{0.3em} dx \qquad (C)$$

        Now, we know from trigonometric addition formulas that:

        $$ \forall (\alpha, \beta) \in \hspace{0.04em} \mathbb{R}^2, $$
        $$ \sin(\alpha + \beta) + \sin(\alpha - \beta) = 2 \sin(\alpha) \cos(\beta) $$

        So, in our case:

        $$ C = \int_{-\pi}^{\pi} \sum_{n = 1}^{+ \infty} b_n \frac{ \sin\Bigl((n + m)x\Bigr) + \sin\Bigl((n - m)x\Bigr) }{2} \hspace{0.3em} dx$$
        $$ C = \sum_{n = 1}^{+ \infty} \int_{-\pi}^{\pi} b_n \frac{ \sin\Bigl((n + m)x\Bigr) + \sin\Bigl((n - m)x\Bigr) }{2} \hspace{0.3em} dx $$
        $$ C = \sum_{n = 1}^{+ \infty} \frac{1}{2} b_n \left( \int_{-\pi}^{\pi} \sin\Bigl((n + m)x\Bigr) + \int_{-\pi}^{\pi} \sin\Bigl((n - m)x\Bigr) \hspace{0.3em} dx \right) $$
        $$ C = \sum_{n = 1}^{+ \infty} \frac{1}{2} b_n \left(\left[ \frac{\cos(n + m)x}{n + m}\right]_{-\pi}^{\pi} + \left[ \frac{\cos(n - m)x}{n - m}\right]_{-\pi}^{\pi} \right) $$
        $$ C = \sum_{n = 1}^{+ \infty} \frac{1}{2} b_n \left(\frac{\cos\Bigl((n + m)\pi\Bigr)}{n + m} - \frac{\cos\Bigl((n + m)(-\pi)\Bigr)}{n + m} + \left( \frac{\cos\Bigl((n - m)\pi\Bigr)}{n - m} - \frac{\cos\Bigl((n - m)(-\pi)\Bigr)}{n - m} \right) \right) $$
        $$ C = \sum_{n = 1}^{+ \infty} \frac{1}{2} b_n \left( \underbrace{ \frac{\cos\Bigl((n + m)\pi\Bigr)}{n + m} - \frac{\cos\Bigl((n + m)\pi\Bigr)}{n + m} } _{=0} + \left( \underbrace{ \frac{\cos\Bigl((n - m)\pi\Bigr)}{n - m} - \frac{\cos\Bigl((n - m)\pi\Bigr)}{n - m} } _{=0} \right) \right) $$
        $$ C = 0 $$
      • Conclusion:

        Now, if we take our formula \((1)\) and evaluate it when \((n = m)\):

        $$ (n = m) \implies \int_{-\pi}^{\pi} f(x) \cos(nx) \hspace{0.3em} dx = a_n \pi $$

        Which gives,

        $$ a_n = \frac{1}{\pi} \int_{-\pi}^{\pi} f(x) \cos(nx) \hspace{0.3em} dx $$
    3. Calculating the harmonics \( b_n \)

      This section is carried out in the same manner as before, but this time multiplying by \(sin(mx)\):

      $$\int_{-\pi}^{\pi} f(x) \sin(mx) \hspace{0.3em} dx = \underbrace{ \int_{-\pi}^{\pi} a_0 \sin(mx) \hspace{0.3em} dx } _{(A')} + \underbrace{ \int_{-\pi}^{\pi} \sum_{n = 1}^{+ \infty} a_n \cos(nx) \sin(mx) \hspace{0.3em} dx } _{(B')} + \underbrace{ \int_{-\pi}^{\pi} \sum_{n = 1}^{+ \infty} b_n \sin(nx) \sin(mx) \hspace{0.3em} dx } _{(C')} \qquad (1') $$
      • Part \((A')\) cancels out in all cases:

        $$ \forall m \in \mathbb{N}^*, \ A' = \int_{-\pi}^{\pi} a_0 \sin(mx) \hspace{0.3em} dx \qquad (A')$$
        $$ A' = a_0 \left[ -\frac{\cos(mx)}{m}\right]_{-\pi}^{\pi} $$
        $$ A'= a_0 \left(-\frac{\cos(m\pi)}{m} + \frac{\cos(-m\pi)}{m} \right)$$
        $$ A'= a_0 \left(-\frac{\cos(m\pi)}{m} + \frac{\cos(m\pi)}{m} \right)$$
        $$ A'= 0 $$
      • Part \((B')\) cancels out in all cases:

        $$ \forall m \in \mathbb{N}^*, \ B' = \int_{-\pi}^{\pi} \sum_{n = 1}^{+ \infty} a_n \cos(nx) \sin(mx) \hspace{0.3em} dx \qquad (B')$$

        Now, we know from trigonometric addition formulas that:

        $$ \forall (\alpha, \beta) \in \hspace{0.04em} \mathbb{R}^2, $$
        $$ \sin(\alpha + \beta) - \sin(\alpha - \beta) = 2 \cos(\alpha) \sin(\beta) $$

        This is almost the same as part \((C)\) previously calculated, but with a minus sign \((-)\) instead of a plus sign \((+)\):

        $$ B' = \int_{-\pi}^{\pi} \sum_{n = 1}^{+ \infty} a_n \frac{ \sin\Bigl((n + m)x\Bigr) - \sin\Bigl((n - m)x\Bigr) }{2} \hspace{0.3em} dx$$

        The steps are therefore identical, and so is the result:

        $$ B' = \sum_{n = 1}^{+ \infty} \frac{1}{2} a_n \left( \underbrace{ \frac{\cos\Bigl((n + m)\pi\Bigr)}{n + m} - \frac{\cos\Bigl((n + m)\pi\Bigr)}{n + m} } _{=0} - \left( \underbrace{ \frac{\cos\Bigl((n - m)\pi\Bigr)}{n - m} - \frac{\cos\Bigl((n - m)\pi\Bigr)}{n - m} } _{=0} \right) \right) $$
        $$ B' = 0 $$
      • Part \((C')\) cancels out only if \((n \neq m)\):

        $$ \forall m \in \mathbb{N}^*, \ C' = \int_{-\pi}^{\pi} \sum_{n = 1}^{+ \infty} b_n \sin(nx) \sin(mx) \hspace{0.3em} dx \qquad (C')$$

        Now, we know from trigonometric addition formulas that:

        $$ \forall (\alpha, \beta) \in \hspace{0.04em} \mathbb{R}^2, $$
        $$ cos(\alpha - \beta) - \cos(\alpha + \beta) = 2 \sin(\alpha) \sin(\beta) $$

        This is almost the same as part \((B)\) previously calculated:

        $$ C' = \int_{-\pi}^{\pi} \sum_{n = 1}^{+ \infty} b_n \frac{ \cos\Bigl((n - m)x\Bigr) - \cos\Bigl((n + m)x\Bigr) }{2} \hspace{0.3em} dx$$

        $$ \underline{\text{Case 1: When } (n \neq m)} $$
        $$ C' = \sum_{\substack{n = 1 \\ n \neq m}}^{+ \infty} \frac{1}{2} b_n \left(\left[ \frac{\sin(n - m)x}{n - m}\right]_{-\pi}^{\pi} - \left[ \frac{\sin(n + m)x}{n + m}\right]_{-\pi}^{\pi} \right) $$
        $$ C' = \sum_{\substack{n = 1 \\ n \neq m}}^{+ \infty} \frac{1}{2} b_n \left(\frac{\sin\Bigl((n - m)\pi\Bigr)}{n - m} - \frac{\sin\Bigl((n - m)(-\pi)\Bigr)}{n - m} - \left( \frac{\sin\Bigl((n + m)\pi\Bigr)}{n + m} - \frac{sin\Bigl((n + m)(-\pi)\Bigr)}{n + m} \right) \right) $$

        All sine functions that are multiples of \(\pi\) are equal to \(0\), therefore:

        $$ C' = \sum_{\substack{n = 1 \\ n \neq m}}^{+ \infty} \frac{1}{2} b_n \left(\underbrace{\frac{2\sin\Bigl((n + m)\pi\Bigr)}{n + m}} _{=0} - \underbrace{\frac{2\sin\Bigl((n - m)\pi\Bigr)}{n - m} } _{=0} \right) $$
        $$ (n \neq m) \implies C' = 0 $$

        $$ \underline{\text{Case 2: When } (n = m)} $$

        Then:

        $$ \begin{cases} (n - m) = 0 \implies \cos\Bigl((n - m)x\Bigr) = 1 \\ (n + m) = 2m \implies \cos\Bigl((n + m)x\Bigr) = \cos(2mx) \end{cases} $$
        $$ C' = \frac{1}{2} b_n \left( \int_{-\pi}^{\pi} dx - \int_{-\pi}^{\pi} \cos(2mx) \right) $$
        $$ C' = \frac{1}{2} b_n \left( \bigl[ x \bigr]_{-\pi}^{\pi} - \left[ \frac{sin(2mx)}{2}\right]_{-\pi}^{\pi} \right) $$
        $$ C' = \frac{1}{2} b_n \left( + \pi -(- \pi) - \left( \frac{sin(2m \pi)}{2} - \frac{sin\Bigl(2m (-\pi) \Bigr)}{2} \right) \right) $$
        $$ C' = \frac{1}{2} b_n \Bigl( 2\pi + \underbrace{sin(2m \pi)} _{=0} \Bigr) $$
        $$ C' = \pi b_n $$
        $$ (n = m) \implies C' = b_n \pi $$
      • Conclusion:

        In the same manner as before, evaluating \((1')\) when \((n = m)\):

        $$ (n = m) \implies \int_{-\pi}^{\pi} f(x) \sin(nx) \hspace{0.3em} dx = b_n \pi $$

        Which gives,

        $$ b_n = \frac{1}{\pi} \int_{-\pi}^{\pi} f(x) \sin(nx) \hspace{0.3em} dx $$
  2. Change of variables: moving to the physical world \( \bigl[0; T\bigr]\)

    Now, let's leave the ideal world and move toward any physical signal \(f(t)\) that is \(T\)-periodic and starts at \((t = 0\text{ s})\). Its angular frequency is then \(\omega = \frac{2\pi}{T}\).

    To transfer our previous formulas, we proceed using two consecutive steps.

    1. Shifting the window

      Since the function \(f(x)\) is \(2\pi\)-periodic, calculating its area between \(-\pi\) and \(\pi\) is equivalent to calculating it between \(0\) and \(2\pi\).

    2. Change of variables

      We now want to transition from \(x\) (the angle) to the variable \(t\) (time). The relationship between the two is:

      $$ x = \omega t$$
      $$ \left(\text{with } \omega = \frac{2\pi}{T}\right) $$

      We must also transform our differential \(dx\):

      $$ dx = \omega \, dt$$

      Fourier's starting hypothesis is now written as:

      $$f(t) = a_0 + \sum_{n = 1}^{+ \infty} a_n \cos(n \omega t) + \sum_{n = 1}^{+ \infty} b_n \sin(n \omega t) $$

      Thus, the three previous relations transform and become:

      $$a_0 = \frac{1}{2\pi}\int_{0}^{T} f(t) \hspace{0.3em} \omega \, dt $$
      $$a_0 = \frac{\omega}{2\pi}\int_{0}^{T} f(t) \, dt $$
      $$a_0 = \frac{1}{T}\int_{0}^{T} f(t) \, dt $$
      $$ \forall n \in \mathbb{N}^*,$$
      $$ a_n = \frac{1}{\pi} \int_{0}^{T} f(t) \cos(n \omega t) \hspace{0.3em} \omega \, dt $$
      $$ a_n = \frac{\omega}{\pi} \int_{0}^{T} f(t) \cos(n \omega t) \, dt $$
      $$ a_n = \frac{2}{T} \int_{0}^{T} f(t) \cos(n \omega t) \, dt $$
      $$ b_n = \frac{1}{\pi} \int_{0}^{T} f(t) \sin(n \omega t) \hspace{0.3em} \omega \, dt $$
      $$ b_n = \frac{\omega}{\pi} \int_{0}^{T} f(t) \sin(n \omega t) \, dt $$
      $$ b_n = \frac{2}{T} \int_{0}^{T} f(t) \sin(n \omega t) \, dt $$
      $$ \text{with } \begin{cases} T : \text{Period of the function } f(t) \\ \omega = \frac{2\pi}{T} : \text{Pulsation } \end{cases} $$

      Why is \(a_0\) isolated?

      Why isolate this \(a_0\) coefficient instead of naturally including it in the summation at \(n = 0\)?

      $$f(t) = \sum_{n = 0}^{+ \infty} a_n \cos(n \omega t) + \sum_{n = 0}^{+ \infty} b_n \sin(n \omega t) $$

      It comes down to geometry and average values. The coefficient \(a_0\) represents the DC component (or offset) of the signal, meaning its average value over a full period. Graphically, it is the baseline around which the signal oscillates.

      • The area under the curve (for \(n \geqslant 1\))

        For any oscillating harmonic (\(n \geqslant 1\)), the \(\cos(n\omega t)\) and \(\sin(n\omega t)\) functions spend equal time above and below the time axis. Over a full period, their average value is zero, but their mean square value (their energy) is evenly distributed. This geometrically yields a factor of \(\frac{T}{2}\) during integration.

        By inversion, this \(\frac{T}{2}\) factor generates the \(\frac{2}{T}\) coefficient found in front of the integrals for \(a_n\) and \(b_n\).

      • The zero-frequency case (for \(n = 0\))

        At zero frequency (\(n = 0\)), the sine term vanishes (\(\sin(0) = 0\)), but the cosine term becomes a pure constant: \(\cos(0) = 1\). It no longer oscillates. Integrating a constant of \(1\) over a period \(T\) simply yields:

        $$ \int_{0}^{T} 1 \, dt = T $$

        Consequently, the measured area is twice as large as that of an oscillating wave (\(T\) instead of \(\frac{T}{2}\)).

      • Conclusion

        If we blindly applied the general formula for \(a_n\) using the \(\frac{2}{T}\) factor to the \(n=0\) case, we would obtain a result that is twice too large compared to the actual average value.

        Isolating \(a_0\) with a \(\frac{1}{T}\) factor (or dividing the general formula by 2) is therefore essential to match the physical reality of the signal.

The exponential notation

If we take the previous function:

$$f(t) = a_0 + \sum_{n = 1}^{+ \infty} a_n \cos(n \omega t) + \sum_{n = 1}^{+ \infty} b_n \sin(n \omega t) $$

From Euler's trigonometric formulas , we have:

$$ \Biggl \{ \begin{gather*} 2 \cos(px) = e^{ipx} + e^{-ipx} \\ 2i \sin(px) = e^{ipx} - e^{-ipx} \end{gather*} \qquad \text{(Euler's trigonometric formulas)} $$

This series becomes:

$$f(t) = a_0 + \sum_{n = 1}^{+ \infty} \frac{a_n}{2} \times (e^{i n \omega t} + e^{-i n \omega t}) + \sum_{n = 1}^{+ \infty} \frac{b_n}{2i} (e^{i n \omega t} - e^{-i n \omega t}) $$

However, \(\frac{1}{i} = -i\). Therefore,

$$f(t) = a_0 + \sum_{n = 1}^{+ \infty} \frac{a_n}{2} \times (e^{i n \omega t} + e^{-i n \omega t}) - \sum_{n = 1}^{+ \infty} i \frac{b_n}{2} (e^{i n \omega t} - e^{-i n \omega t}) $$

Then, by grouping the terms:

$$f(t) = a_0 + \sum_{n = 1}^{+ \infty} \left( \frac{a_n - i \ b_n}{2} \right) e^{i n \omega t} + \sum_{n = 1}^{+ \infty} \left( \frac{a_n + i \ b_n}{2} \right) e^{-i n \omega t} $$

Now, if we apply a change of variable:

$$ c_n = \frac{a_n - i \ b_n}{2} $$

We observe that its conjugate \(\overline{c_n}\) is equal to:

$$ \overline{c_n} = \frac{a_n + i \ b_n}{2} $$

We thus have, by replacing the previous expression:

$$f(t) = a_0 + \sum_{n = 1}^{+ \infty} c_n \ e^{i n \omega t} + \sum_{n = 1}^{+ \infty} \overline{c_n} \ e^{-i n \omega t} $$

Let us now assume that \(c_n\), as a complex number, can be written as \(c_n = R e^{in\alpha}\), then we can write:

$$ \begin{cases} c_n = R e^{in\alpha} \\ \overline{c_n} = R e^{-in\alpha} \end{cases}$$

Then, we can write \(\overline{c_n}\) in the form:

$$ \overline{c_n} = c_{-n} $$
$$f(t) = a_0 + \sum_{n = 1}^{+ \infty} c_n \ e^{i n \omega t} + \sum_{n = 1}^{+ \infty} c_{-n} \ e^{-i n \omega t} $$

We can now invert the indices in the second sum so that the sums become symmetrical:

$$f(t) = \sum_{- \infty}^{n = -1} c_{n} \ e^{i n \omega t} + a_0 + \sum_{n = 1}^{+ \infty} c_n \ e^{i n \omega t} $$

By observing that for \(n = 0\), the exponential cancels out and equals \(1\) (\(e^{i \cdot 0 \cdot \omega t} = 1\)), we can define the constant term as the coefficient \(c_0\) of our sequence:

$$ c_0 = a_0 = \frac{1}{T} \int_{0}^{T} f(t) \, dt $$

By injecting \(c_0\) and reorganizing the limits of the second sum using the change of index \(k = -n\), the three blocks of the equation connect perfectly:

$$f(t) = \sum_{n = -\infty}^{-1} c_n \ e^{i n \omega t} + c_0 + \sum_{n = 1}^{+ \infty} c_n \ e^{i n \omega t} $$

With all the pieces of the puzzle aligned from \(-\infty\) to \(+\infty\), we can condense everything into a single, unique summation:

$$f(t) = \sum_{-\infty}^{+\infty} c_n \ e^{in\omega t} $$
  1. Calculation of the coefficient \( c_n \)

    If we use the same method as before, but this time with the exponential, we start from the general function:

    $$f(t) = \sum_{-\infty}^{+\infty} c_n \ e^{in\omega t} $$

    For an \(m \in \mathbb{Z}\), we will this time multiply by the basis conjugate function \(e^{-i m\omega t}\):

    $$f(t) \ e^{-i m\omega t} = \sum_{-\infty}^{+\infty} c_n \ e^{in\omega t} \ e^{-i m\omega t} $$
    $$f(t) \ e^{-i m\omega t} = \sum_{-\infty}^{+\infty} c_n \ e^{i (n - m)\omega t} $$

    Then we integrate:

    $$ \int_0^T f(t) \ e^{-i m\omega t} \, dt = \int_0^T \sum_{-\infty}^{+\infty} c_n \ e^{i (n - m)\omega t} \, dt $$

    $$ \underline{\text{Case 1: When } (n \neq m)} $$
    $$ \int_0^T f(t) \ e^{-i m\omega t} \, dt = \int_0^T \sum_{-\infty}^{+\infty} c_n \ e^{i (n - m)\omega t} \, dt $$

    By linearity , we can swap the symbols \(\int\) and \(\sum\):

    $$ \int_0^T f(t) \ e^{-i m\omega t} \, dt = \sum_{-\infty}^{+\infty} \int_0^T c_n \ e^{i (n - m)\omega t} \, dt $$
    $$ \int_0^T f(t) \ e^{-i m\omega t} \, dt = \sum_{-\infty}^{+\infty} c_n \left[ \frac{e^{i (n - m)\omega t}}{i (n - m)\omega} \right]_0^T $$
    $$ \int_0^T f(t) \ e^{-i m\omega t} \, dt = \sum_{-\infty}^{+\infty} c_n \left( \frac{e^{i (n - m)\omega T}}{i (n - m)\omega} - \frac{e^{i (n - m)\omega \times 0}}{i (n - m)\omega} \right) $$

    However, \(\omega T = 2\pi\), therefore:

    $$ \int_0^T f(t) \ e^{-i m\omega t} \, dt = \sum_{-\infty}^{+\infty} c_n \left( \frac{e^{i (n - m) 2\pi }}{i (n - m)\omega} - \frac{1}{i (n - m)\omega} \right) $$
    $$ \int_0^T f(t) \ e^{-i m\omega t} \, dt = \sum_{-\infty}^{+\infty} c_n \left( \underbrace{\frac{1}{i (n - m)\omega} - \frac{1}{i (n - m)\omega}} _{=0} \right) $$
    $$ \int_0^T f(t) \ e^{-i m\omega t} \, dt = 0 $$

    $$ \underline{\text{Case 2: When } (n = m)} $$
    $$ \int_0^T f(t) \ e^{-i m\omega t} \, dt = \int_0^T c_n \ e^{i (n - m)\omega t} \, dt $$
    $$ \int_0^T f(t) \ e^{-i m\omega t} \, dt = c_n \int_0^T \ e^{i \times 0 \times \omega t} \, dt $$
    $$ \int_0^T f(t) \ e^{-i m\omega t} \, dt = c_n \int_0^T \, dt $$
    $$ \int_0^T f(t) \ e^{-i m\omega t} \, dt = c_n \ T $$

    And with this notation, we have a unique coefficient \(c_n\):

    $$ c_n = \frac{1}{T} \int_{0}^{T} f(t) e^{-in\omega t} \, dt $$
Scroll top Back to top