Mathwords logoMathwords

Fourier Cosine Series — Definition, Formula & Examples

A Fourier Cosine Series represents a function as an infinite sum of cosine terms. It arises naturally when you expand an even function over a symmetric interval or apply a half-range expansion on [0,L][0, L].

Given a piecewise continuous function f(x)f(x) on [0,L][0, L], its Fourier Cosine Series is f(x)=a02+n=1ancos ⁣(nπxL)f(x) = \frac{a_0}{2} + \sum_{n=1}^{\infty} a_n \cos\!\left(\frac{n\pi x}{L}\right), where the coefficients an=2L0Lf(x)cos ⁣(nπxL)dxa_n = \frac{2}{L}\int_0^L f(x)\cos\!\left(\frac{n\pi x}{L}\right)dx for n=0,1,2,n = 0, 1, 2, \ldots This is equivalent to computing the full Fourier series of the even extension of ff to [L,L][-L, L].

Key Formula

f(x)=a02+n=1ancos ⁣(nπxL),an=2L0Lf(x)cos ⁣(nπxL)dxf(x) = \frac{a_0}{2} + \sum_{n=1}^{\infty} a_n \cos\!\left(\frac{n\pi x}{L}\right), \quad a_n = \frac{2}{L}\int_0^L f(x)\cos\!\left(\frac{n\pi x}{L}\right)dx
Where:
  • f(x)f(x) = The function being expanded
  • LL = The half-period (series is defined on [0, L])
  • ana_n = Fourier cosine coefficients for n = 0, 1, 2, ...
  • nn = Non-negative integer index of each harmonic

How It Works

To build a Fourier Cosine Series, you compute the coefficients ana_n by integrating the product of f(x)f(x) and cos(nπx/L)\cos(n\pi x/L) over [0,L][0, L]. The constant term a0/2a_0/2 captures the average value of the function. Each subsequent cosine term refines the approximation by adding higher-frequency detail. Because cosines are even functions, all sine coefficients vanish, simplifying the expansion. This series is particularly useful when boundary conditions require the derivative to vanish at the endpoints (Neumann conditions).

Worked Example

Problem: Find the Fourier Cosine Series of f(x) = x on [0, 2].
Step 1: Compute a₀: Use the coefficient formula with n = 0.
a0=2202xdx=[x22]02=2a_0 = \frac{2}{2}\int_0^2 x\,dx = \left[\frac{x^2}{2}\right]_0^2 = 2
Step 2: Compute aₙ for n ≥ 1: Integrate by parts with u = x and dv = cos(nπx/2) dx.
an=02xcos ⁣(nπx2)dx=2nπ[xsin ⁣(nπx2)]02+4n2π2[cos ⁣(nπx2)]02=4n2π2(cos(nπ)1)a_n = \int_0^2 x\cos\!\left(\frac{n\pi x}{2}\right)dx = \frac{2}{n\pi}\left[x\sin\!\left(\frac{n\pi x}{2}\right)\right]_0^2 + \frac{4}{n^2\pi^2}\left[\cos\!\left(\frac{n\pi x}{2}\right)\right]_0^2 = \frac{4}{n^2\pi^2}(\cos(n\pi)-1)
Step 3: Simplify: Since cos(nπ) = (−1)ⁿ, the coefficient is zero when n is even and −8/(n²π²) when n is odd.
an=4((1)n1)n2π2={0,n even8n2π2,n odda_n = \frac{4((- 1)^n - 1)}{n^2\pi^2} = \begin{cases} 0, & n \text{ even} \\ -\dfrac{8}{n^2\pi^2}, & n \text{ odd} \end{cases}
Answer: x=18π2k=01(2k+1)2cos ⁣((2k+1)πx2),0x2x = 1 - \frac{8}{\pi^2}\sum_{k=0}^{\infty} \frac{1}{(2k+1)^2}\cos\!\left(\frac{(2k+1)\pi x}{2}\right), \quad 0 \le x \le 2

Why It Matters

Fourier Cosine Series appear throughout differential equations when solving the heat equation or wave equation with insulated (Neumann) boundary conditions. Engineers and physicists use them in signal processing to decompose signals into frequency components when only cosine (even) symmetry is present.

Common Mistakes

Mistake: Forgetting the factor of 1/2 on the a₀ term and writing a₀ instead of a₀/2.
Correction: The constant term is always a₀/2. This ensures the coefficient formula a_n = (2/L)∫f(x)cos(nπx/L)dx works uniformly for all n ≥ 0, including n = 0.