Luciano Muratore

Fourier Expansion of cosine

April 10, 2026 · Luciano Muratore

Following our discussion on the Z-transform and system stability, we return to the continuous domain to perform a detailed derivation of a specific Fourier expansion. This analysis demonstrates how parity and trigonometric identities simplify the process of representing periodic functions.

1. Objective

Given α∈R∖Z\alpha \in \mathbb{R} \setminus \mathbb{Z}, we consider the 2π2\pi-periodic function:

f(x)=cos⁡(αx)f(x) = \cos(\alpha x)

Our goal is to compute its real Fourier series representation:

f(x)=a02+∑n=1∞ancos⁡(nx)+∑n=1∞bnsin⁡(nx)f(x) = \frac{a_{0}}{2} + \sum_{n=1}^{\infty} a_{n} \cos(nx) + \sum_{n=1}^{\infty} b_{n} \sin(nx)

2. The Fourier Coefficients

The coefficients for a 2π2\pi-periodic function are defined by the following integrals:

  • Cosine coefficients: an=1π∫−ππcos⁡(αx)cos⁡(nx)dxa_{n} = \frac{1}{\pi} \int_{-\pi}^{\pi} \cos(\alpha x) \cos(nx) dx
  • Sine coefficients: bn=1π∫−ππcos⁡(αx)sin⁡(nx)dxb_{n} = \frac{1}{\pi} \int_{-\pi}^{\pi} \cos(\alpha x) \sin(nx) dx
  • DC Component: a0=1π∫−ππcos⁡(αx)dxa_{0} = \frac{1}{\pi} \int_{-\pi}^{\pi} \cos(\alpha x) dx

3. Computation of bnb_{n}

By applying a parity argument, we can immediately simplify our work:

  • cos⁡(αx)\cos(\alpha x) is an even function.
  • sin⁡(nx)\sin(nx) is an odd function.
  • The product of an even and an odd function is odd.

Mathematical Property ∫−ππg(x)dx=0\int_{-\pi}^{\pi} g(x) dx = 0 if gg is odd.

Consequently, we conclude that bn=0b_{n} = 0 for all n≥1n \ge 1.

4. Computation of a0a_{0}

Evaluating the integral for the constant term:

a0=1π∫−ππcos⁡(αx)dx=1π[sin⁡(αx)α]−ππ=sin⁡(απ)−sin⁡(−απ)απa_{0} = \frac{1}{\pi} \int_{-\pi}^{\pi} \cos(\alpha x) dx = \frac{1}{\pi} \left[ \frac{\sin(\alpha x)}{\alpha} \right]_{-\pi}^{\pi} = \frac{\sin(\alpha \pi) - \sin(-\alpha \pi)}{\alpha \pi}

Since sin⁡(−u)=−sin⁡(u)\sin(-u) = -\sin(u), we obtain:

a0=2sin⁡(απ)απa_{0} = \frac{2 \sin(\alpha \pi)}{\alpha \pi}

5. Computation of ana_{n}

To solve for ana_n, we utilize the following Key Identity:

Trigonometric Product-to-Sum cos⁡Acos⁡B=12(cos⁡(A−B)+cos⁡(A+B))\cos A \cos B = \frac{1}{2}(\cos(A-B) + \cos(A+B))

Applying this with A=αxA = \alpha x and B=nxB = nx:

cos⁡(αx)cos⁡(nx)=12(cos⁡((α−n)x)+cos⁡((α+n)x))\cos(\alpha x) \cos(nx) = \frac{1}{2}(\cos((\alpha - n)x) + \cos((\alpha + n)x))

The integral becomes:

an=12π∫−ππ(cos⁡((α−n)x)+cos⁡((α+n)x))dxa_{n} = \frac{1}{2\pi} \int_{-\pi}^{\pi} (\cos((\alpha - n)x) + \cos((\alpha + n)x)) dx

Recall that ∫−ππcos⁡(kx)dx=2sin⁡(kπ)k\int_{-\pi}^{\pi} \cos(kx) dx = \frac{2 \sin(k\pi)}{k} for k≠0k \neq 0. Applying this to both terms:

an=12π(2sin⁡((α−n)π)α−n+2sin⁡((α+n)π)α+n)a_{n} = \frac{1}{2\pi} \left( \frac{2 \sin((\alpha - n)\pi)}{\alpha - n} + \frac{2 \sin((\alpha + n)\pi)}{\alpha + n} \right)

6. Simplifying sin⁡((α±n)π)\sin((\alpha \pm n)\pi)

Using the identity sin⁡(u±v)=sin⁡ucos⁡v±cos⁡usin⁡v\sin(u \pm v) = \sin u \cos v \pm \cos u \sin v:

sin⁡((α±n)π)=sin⁡(απ)cos⁡(nπ)±cos⁡(απ)sin⁡(nπ)\sin((\alpha \pm n)\pi) = \sin(\alpha\pi) \cos(n\pi) \pm \cos(\alpha\pi) \sin(n\pi)

Since sin⁡(nπ)=0\sin(n\pi) = 0 and cos⁡(nπ)=(−1)n\cos(n\pi) = (-1)^n, we have:

sin⁡((α±n)π)=(−1)nsin⁡(απ)\sin((\alpha \pm n)\pi) = (-1)^{n} \sin(\alpha \pi)

Substituting this back into the expression for ana_n:

an=(−1)nsin⁡(απ)π(1α−n+1α+n)a_{n} = \frac{(-1)^n \sin(\alpha \pi)}{\pi} \left( \frac{1}{\alpha - n} + \frac{1}{\alpha + n} \right)

Combining the terms (1α−n+1α+n)=α+n+α−nα2−n2=2αα2−n2(\frac{1}{\alpha - n} + \frac{1}{\alpha + n}) = \frac{\alpha + n + \alpha - n}{\alpha^2 - n^2} = \frac{2\alpha}{\alpha^2 - n^2}, we arrive at the final result:

an=2α(−1)nsin⁡(απ)π(α2−n2)a_{n} = \frac{2 \alpha (-1)^{n} \sin(\alpha \pi)}{\pi (\alpha^{2} - n^{2})}

7. Final Fourier Series Expansion

The full expansion of cos⁡(αx)\cos(\alpha x) for α∉Z\alpha \notin \mathbb{Z} is:

cos⁡(αx)=sin⁡(απ)απ+∑n=1∞2α(−1)nsin⁡(απ)π(α2−n2)cos⁡(nx)\cos(\alpha x) = \frac{\sin(\alpha \pi)}{\alpha \pi} + \sum_{n=1}^{\infty} \frac{2 \alpha (-1)^{n} \sin(\alpha \pi)}{\pi (\alpha^{2} - n^{2})} \cos(nx)

This series converges to the periodic extension of cos⁡(αx)\cos(\alpha x) and illustrates how non-integer frequencies are “distributed” across the integer harmonics of the Fourier basis.