Tutorials › Measure Theory › Fourier Coefficients Of Standard Periodic Functions

Hilbert Space L^2 · Tutorial 598 of 798

Fourier Coefficients Of Standard Periodic Functions

Learn to calculate Fourier coefficients with the course’s normalization and use parity, symmetry, and periodicity to check each result.

Advanced 9 min read

What You'll Learn

  • Define complex Fourier coefficients for functions on the circle using normalized Lebesgue measure.
  • Convert between complex coefficients and the real sine-cosine coefficients.
  • Compute the coefficients of a constant and a periodic linear function.
  • Derive the exact coefficients of a square wave, including which frequencies vanish.
  • Use parity and periodicity to verify coefficient calculations.
  • Distinguish coefficient formulas from claims about pointwise convergence of Fourier series.

Fourier Coefficients on the Circle

Fourier coefficients record how much of each frequency is present in a periodic function. Their values depend on the normalization and sign convention, so we fix both before calculating. The examples below use the circle of length \(2\pi\), represented by \([-\pi,\pi)\), with endpoints identified. Values assigned at finitely many jump points do not change the coefficients, since those points have Lebesgue measure zero.

Let \(\mathbb T\) denote this circle, with its completed Lebesgue sigma-algebra and normalized measure \(\mu\), where \(\mu(E)=m(E)/(2\pi)\). Thus \(\mu(\mathbb T)=1\). A periodic function means a measurable function on \(\mathbb R\) whose values repeat with period \(2\pi\); we regard its restriction to \([-\pi,\pi)\) as a function on \(\mathbb T\). Unless specified otherwise, functions may be complex-valued and are understood up to equality \(\mu\)-a.e. The space \(L^2(\mathbb T,\mu)\) consists of measurable functions with finite integral of their squared absolute value. Since \(\mu\) is finite, every such function is integrable: Cauchy–Schwarz gives \(\int_{\mathbb T}|f|\,d\mu\leq \|f\|_2\).

Definition: For \(f\in L^2(\mathbb T,\mu)\) and \(n\in\mathbb Z\), its complex Fourier coefficient is $$ c_n(f)=\int_{\mathbb T}f(x)e^{-inx}\,d\mu(x) =\frac{1}{2\pi}\int_{-\pi}^{\pi}f(x)e^{-inx}\,dx. $$ For real-valued \(f\), the real Fourier coefficients are $$ a_n(f)=\frac{1}{\pi}\int_{-\pi}^{\pi}f(x)\cos(nx)\,dx\quad(n\geq 0), \qquad b_n(f)=\frac{1}{\pi}\int_{-\pi}^{\pi}f(x)\sin(nx)\,dx\quad(n\geq 1). $$ The corresponding formal real Fourier series is \(a_0/2+\sum_{n\geq1}(a_n\cos(nx)+b_n\sin(nx))\). Calling it formal here asserts no pointwise convergence.

The factor \(1/(2\pi)\) in \(c_n\), and the factor \(1/\pi\) in \(a_n,b_n\), come from the normalized measure and the norms of the trigonometric functions. For real \(f\), Euler’s identity \(e^{-inx}=\cos(nx)-i\sin(nx)\) gives, for \(n\geq1\),

$$ c_0=\frac{a_0}{2},\qquad c_n=\frac{a_n-i b_n}{2},\qquad c_{-n}=\frac{a_n+i b_n}{2}. $$

These relations are useful checks: a real-valued function has \(c_{-n}=\overline{c_n}\), and its sine and cosine coefficients are real.

Parity and Symmetry

Proposition: On \((\mathbb T,\mu)\), let \(f\) be a real-valued integrable function. If \(f\) is even a.e., then \(b_n(f)=0\) for every \(n\geq1\). If \(f\) is odd a.e., then \(a_0(f)=0\) and \(a_n(f)=0\) for every \(n\geq1\).

Proof. The integral of an integrable function on \([-\pi,\pi]\) is unchanged by the substitution \(x=-u\). If \(f\) is even, then \(f(x)\sin(nx)\) is odd a.e. Its integral over the symmetric interval is zero: substitution gives the integral equal to its own negative. Thus \(b_n(f)=0\). If \(f\) is odd, then \(f(x)\) and \(f(x)\cos(nx)\) are odd a.e., so the same substitution makes their integrals zero. These integrals, divided by \(\pi\), are respectively \(a_0(f)\) and \(a_n(f)\). The conclusions concern coefficients, so changing \(f\) on a null set has no effect. \(\square\)

Parity predicts which integrals vanish, but it does not determine the remaining coefficients. Those require calculation. The following examples show the normalizations and signs explicitly.

Worked Example: A Constant Function

Let \(f(x)=3\) for every \(x\in\mathbb T\). For \(n=0\),

$$ c_0=\frac{1}{2\pi}\int_{-\pi}^{\pi}3\,dx =\frac{1}{2\pi}\bigl(3(2\pi)\bigr)=3. $$

For an integer \(n\ne0\), integrate the exponential:

$$ c_n=\frac{3}{2\pi}\left[\frac{e^{-inx}}{-in}\right]_{-\pi}^{\pi} =\frac{3}{2\pi}\frac{e^{-in\pi}-e^{in\pi}}{-in}=0, $$

because \(e^{in\pi}=e^{-in\pi}=(-1)^n\). In real notation, \(a_0=(1/\pi)(3)(2\pi)=6\), while \(a_n=b_n=0\) for \(n\geq1\); the real series therefore has constant term \(a_0/2=3\). Check: \(c_0=a_0/2=3\), and every nonzero frequency vanishes, as required for a constant.

Worked Example: The Periodic Linear Function

Define \(f(x)=x\) for \(-\pi\leq x<\pi\), then extend it with period \(2\pi\). This is a bounded, real-valued function on \(\mathbb T\), and it is odd except for immaterial endpoint choices. The parity proposition gives \(a_0=0\) and \(a_n=0\) for \(n\geq1\). To calculate \(b_n\), use that \(x\sin(nx)\) is even:

$$ b_n=\frac{2}{\pi}\int_0^\pi x\sin(nx)\,dx. $$

Integration by parts, with \(u=x\) and \(dv=\sin(nx)\,dx\), gives

$$ \int_0^\pi x\sin(nx)\,dx =\left[-\frac{x\cos(nx)}{n}\right]_0^\pi +\frac{1}{n}\int_0^\pi\cos(nx)\,dx =-\frac{\pi(-1)^n}{n}. $$

The last integral is zero because \(\int_0^\pi\cos(nx)\,dx=[\sin(nx)/n]_0^\pi=0\). Consequently \(b_n=2(-1)^{n+1}/n\). The complex coefficients are \(c_0=0\) and, for every nonzero integer \(n\), \(c_n=i(-1)^n/n\), as follows either by direct integration or the real-to-complex relations. Check: at \(n=1\), \(b_1=2\) and \(c_1=-i\); at \(n=-1\), \(c_{-1}=i=\overline{c_1}\), consistent with \(f\) being real-valued.

Square Waves: Frequencies and Exact Values

A square wave is constant on intervals and jumps between its levels. Its coefficients can be found by integrating over those intervals. Symmetry often removes half the work: for an odd square wave all cosine coefficients vanish, and the sine integrals determine the rest.

Worked Example: The Odd Square Wave

Define \(s(x)=1\) for \(0<x<\pi\) and \(s(x)=-1\) for \(-\pi<x<0\), and extend periodically. Set its values at \(0\) and at the identified endpoint arbitrarily; this changes the function only on a null set. The function is real-valued and odd a.e., so \(a_0=0\) and \(a_n=0\). For \(n\geq1\), the product \(s(x)\sin(nx)\) is even, and on \((0,\pi)\) it equals \(\sin(nx)\). Therefore

$$ b_n=\frac{2}{\pi}\int_0^\pi\sin(nx)\,dx =\frac{2}{\pi}\left[\frac{1-\cos(n\pi)}{n}\right] =\frac{2(1-(-1)^n)}{\pi n}. $$

If \(n\) is even, \((-1)^n=1\), so \(b_n=0\). If \(n\) is odd, \((-1)^n=-1\), so \(b_n=4/(\pi n)\). Thus \(c_0=0\), and for nonzero integers \(n\), \(c_n=-i(1-(-1)^n)/(\pi n)\). Check: \(b_1=2(1-(-1))/\pi=4/\pi\), \(b_2=2(1-1)/(2\pi)=0\), and \(b_3=2(1-(-1))/(3\pi)=4/(3\pi)\). The formula gives \(c_{-1}=i\,2/\pi=\overline{c_1}\), as it must for a real-valued function.

Proposition: If \(f\in L^2(\mathbb T,\mu)\) is complex-valued and \(g(x)=f(x-\alpha)\), with the argument interpreted periodically, then \(c_n(g)=e^{-in\alpha}c_n(f)\) for every integer \(n\). In particular, translating a periodic function changes the phase of each coefficient but not its absolute value.

Proof. The translated function is measurable and integrable because translation on the circle preserves Lebesgue measure. In the coefficient integral, substitute \(u=x-\alpha\). The integrand \(f(u)e^{-inu}\) is \(2\pi\)-periodic for integer \(n\), so its integral over any interval of length \(2\pi\) equals its integral over \([-\pi,\pi]\). Hence

$$ c_n(g)=\frac{1}{2\pi}\int_{-\pi}^{\pi}f(x-\alpha)e^{-inx}\,dx =e^{-in\alpha}\frac{1}{2\pi}\int_{-\pi-\alpha}^{\pi-\alpha}f(u)e^{-inu}\,du =e^{-in\alpha}c_n(f). $$

Since \(|e^{-in\alpha}|=1\), taking absolute values gives \(|c_n(g)|=|c_n(f)|\). \(\square\)

Common Errors and What the Coefficients Do Not Say

A frequent error is to use \(1/(2\pi)\) in the real sine coefficient. For the odd square wave, this incorrect calculation would give \((1/\pi)\int_0^\pi\sin x\,dx=2/\pi\) for \(b_1\), because it has both omitted the equal contribution from the negative half-interval and used the wrong real-coefficient normalization. The correct calculation is \(b_1=(1/\pi)\int_{-\pi}^{\pi}s(x)\sin x\,dx=(2/\pi)\int_0^\pi\sin x\,dx=4/\pi\). The complex coefficient is half the corresponding real sine coefficient in magnitude: \(c_1=-i b_1/2=-2i/\pi\). These are related quantities, not competing answers.

Another useful check is to ask which parity the integrand has before integrating. For an even function, \(f(x)\sin(nx)\) is odd, so its integral vanishes; for an odd function, both \(f(x)\) and \(f(x)\cos(nx)\) are odd. Applying the wrong parity rule can incorrectly remove nonzero coefficients.

Fourier coefficients are inner products with the trigonometric system, using the normalized measure fixed above. Their formulas alone do not establish pointwise convergence of the associated Fourier series, especially at jump discontinuities. The examples give exact coefficients; questions about \(L^2\) convergence and pointwise behavior are separate. Likewise, values assigned at finitely many points do not affect the coefficients, because integrals are unchanged by modifications on null sets.

Check Your Understanding

Use the stated normalization throughout, and distinguish real coefficients from complex coefficients.

  1. For the constant function \(f(x)=-2\) on \(\mathbb T\), find \(c_n\) for every integer \(n\), and find \(a_0\).
  2. For the periodic extension of \(f(x)=x\) on \([-\pi,\pi)\), compute \(b_2\) and \(c_{-2}\).
  3. For the odd square wave \(s\), compute \(b_4\) and \(b_5\). Explain which one vanishes and why.
  4. Explain why changing a square wave’s value at \(x=0\) cannot change any Fourier coefficient.
  5. If \(g(x)=s(x-\alpha)\), express \(c_n(g)\) in terms of \(c_n(s)\), and state what happens to the absolute value of each coefficient.