Fourier Series Practice Problems

Last Updated : 26 Sep, 2025

Fourier series is a mathematical tool used to decompose periodic functions into a sum of simpler sine and cosine waves. Understanding how to solve Fourier series practice problems is crucial for anyone studying signal processing, differential equations, or any field involving periodic functions. This guide will walk you through various problems, explaining each step in detail to enhance your comprehension.

Practice Problems and Solutions

Problem 1: Find the Fourier series for f(x) = x on the interval [-π, π].

Solution:

Given

f(x) = x on -π, π

Since f(x) is an odd function

f(-x) =-f(x) , its Fourier series contains only sine terms.

Step 1: Calculate a0:

a_0 = \frac{1}{\pi} \int_{-\pi}^{\pi} x

dx = \frac{1}{\pi} \left[ \frac{x^2}{2} \right]_{-\pi}^{\pi}

= \frac{1}{\pi} \left( \frac{\pi^2}{2} - \frac{\pi^2}{2} \right) = 0

Step 2: Calculate an:

a_n = \frac{1}{\pi} \int_{-\pi}^{\pi} x \cos(nx)

dx = 0 (because the integrand is an odd function over symmetric limits, the integral is zero)

Step 3:

Calculate bn:

bn = \frac{1}{\pi} \int_{-\pi}^{\pi} x \sin(nx) ,

dx = \frac{1}{\pi} \left[ -\frac{x \cos(nx)}{n} + \frac{\sin(nx)}{n^2} \right]_{-\pi}^{\pi}

= \frac{2}{n} (-1)^{n+1}

Therefore, the Fourier series for f(x) is: f(x) = \sum_{n=1}^\infty \frac{2}{n} (-1)^{n+1} \sin(nx)

Problem 2: Find the Fourier series for f(x) = |x| on the interval [-π, π].

Solution:

Given f(x) = |x| on [-π, π] .

Since f(x) is an even function f(-x) = f(x)

its Fourier series contains only cosine terms.

Step 1: Calculate a0:

a_0 = \frac{1}{\pi} \int_{-\pi}^{\pi} |x| ,

dx = \frac{2}{\pi} \int_0^{\pi} x

dx = \frac{2}{\pi} \cdot \frac{\pi^2}{2} =\pi

Step 2: Calculate an:

a_n = \frac{1}{\pi} \int_{-\pi}^{\pi} |x| \cos(nx) ,

dx = \frac{2}{\pi} \int_0^{\pi} x \cos(nx)dx

Integration by parts gives

int_0^{\pi} x \cos(nx),

dx = \frac{1}{n^2} \left( (-1)^n - 1 \right)
Thus,a_n = \frac{2}{\pi n^2} \left( (-1)^n - 1 \right)))

Step 3: Calculate bn:

b_n = \frac{1}{\pi} \int_{-\pi}^{\pi} |x| \sin(nx)
dx = 0 (since the integrand is an odd function)

Therefore, the Fourier series is: f(x) = \frac{a_0}{2} + \sum_{n=1}^\infty a_n \cos(nx) = \frac{\pi}{2} - \frac{4}{\pi} \sum_{n=1}^\infty \frac{\cos\big((2n - 1)x\big)}{(2n - 1)^2}\\

Problem 3: Find the Fourier series for f(x) = x² on the interval [-π, π].

Solution:

Given f(x) = x2 on [-π, π]

Since f(x) is an even function f(-x) = f(x) , its Fourier series contains only cosine terms.

Step 1: Calculate a0 :

a_0 = \frac{1}{\pi} \int_{-\pi}^{\pi}

x^2 \, dx = \frac{2}{\pi} \int_0^{\pi} x^2

= \frac{2}{\pi} \cdot \frac{\pi^3}{3}
= \frac{2 \pi^2}{3}

Step 2: Calculate an:

a_n = \frac{1}{\pi} \int_{-\pi}^{\pi} x^2 \cos(nx)

dx = \frac{2}{\pi} \int_0^{\pi} x^2 \cos(nx)

Using integration by parts twice, the integral evaluates to:

\int_0^\pi x^2 \cos(nx)

dx = \frac{2\pi (-1)^n}{n^2} - \frac{2}{n^3} \sin(n\pi)

= \frac{2\pi (-1)^n}{n^2} {since \sin(n\pi) = 0)

Therefore, a_n = \frac{2}{\pi} \times \frac{2\pi (-1)^n}{n^2} = \frac{4 (-1)^n}{n^2}

Step 3: Calculate bn:

b_n = \frac{1}{\pi} \int_{-\pi}^{\pi} x^2 \sin(nx)

dx = 0 (because x2sin(nx) is an odd function over [- П, П] )

Therefore, the Fourier series is f(x) = \frac{a_0}{2} + \sum_{n=1}^\infty a_n \cos(nx) = \frac{\pi^2}{3} + 4 \sum_{n=1}^\infty \frac{(-1)^n}{n^2} \cos(nx)

Problem 4: Find the Fourier series for f(x) = x³ on the interval [-π, π].

Solution:

Step 1: Determine a₀

a₀ = (1/π) ∫ x³ dx from -π to π = 0

Step 2: Determine aₙ

aₙ = (1/π) ∫ x³ cos(nx) dx from -π to π

= (6/n²) (-1)ⁿ⁺¹ - (6π/n³) (-1)ⁿ = 0

Step 3: Determine bₙ

bₙ = (1/π) ∫ x³ sin(nx) dx from -π to π
= -6π²/n³ + 24/n³

Therefore, the Fourier series is:

f(x) = Σ ((6/n²) (-1)ⁿ⁺¹ + (-6π²/n³ + 24/n³) sin(nx)

Problem 5: Find the Fourier series for f(x) = x on the interval [0, 2π].

Solution:

The given function f(x) = x on [0, 2П] is an odd function if extended periodically with period.:

Step 1: Calculate a0:

a0 = \frac{1}{\pi} \int_{0}^{2\pi} x \, dx = \frac{1}{\pi} \left[ \frac{x^2}{2} \right]_0^{2\pi} = 2\pi

Step 2: Calculate an:

a_n = \frac{1}{\pi} \int_{0}^{2\pi} x \cos(nx) \, dx = 0, \quad \text{for all } n

Step 3: Calculate bn:

b_n = \frac{1}{\pi} \int_{0}^{2\pi} x \sin(nx) \, dx = -\frac{2}{n}

Therefore, the Fourier series is:

f(x) = \frac{a_0}{2} + \sum_{n=1}^{\infty} b_n \sin(nx)

= \pi - \sum_{n=1}^{\infty} \frac{2}{n} \sin(nx)

Problem 6: Find the Fourier series for f(x) = |sin(x)| on the interval [-π, π].

Solution:

f(x)=∣sinx∣, −π ≤ x ≤ π.

Since ∣sin⁡x∣ is even, the Fourier series contains only cosine terms:

f(x) = \frac{a_0}{2} + \sum_{n=1}^\infty a_n \cos(nx)

Step 1: Constant term a0:

a_0 = \frac{1}{\pi} \int_{-\pi}^{\pi} |\sin x| \, dx= \frac{2}{\pi} \int_0^{\pi} \sin x \, dx= \frac{2}{\pi} \cdot 2= \frac{4}{\pi}

\frac{a_0}{2} = \frac{2}{\pi}

Step 2: Cosine coefficients an

a_n = \frac{2}{\pi} \int_0^{\pi} \sin x \cos(nx)\, dx

a_n = \frac{1}{\pi} \int_0^{\pi} \Big( \sin((n+1)x) + \sin((1-n)x) \Big) dx

\int_0^{\pi} \sin(kx)\, dx = \frac{1 - \cos(k\pi)}{k}
a_n = \frac{1}{\pi} \left( \frac{1 - \cos((n+1)\pi)}{n+1} + \frac{1 - \cos((1-n)\pi)}{1-n} \right)

Simplify using:

a_n = \frac{2}{\pi} \cdot \frac{1 + (-1)^n}{1 - n^2}

|\sin x| = \frac{2}{\pi} - \frac{4}{\pi} \sum_{m=1}^\infty \frac{\cos(2mx)}{4m^2 - 1}, \quad -\pi \le x \le \pi

Unsolved Practice Problems on Fourier Series

Problem 1: Find the Fourier series for f(x) = sin(x) on the interval [-π, π].

Problem 2: Find the Fourier series for f(x) = x² - π² on the interval [-π, π].

Problem 3: Find the Fourier series for f(x) = 1 for 0 ≤ x < π and f(x) = -1 for π ≤ x < 2π.

Problem 4: Find the Fourier series for f(x) = ex on the interval [-π, π].

Problem 5: Find the Fourier series for f(x) = cos⁡2(x) on the interval [−π, π].

Problem 6: Find the Fourier series for f(x) = x4 on the interval [−π, π].

Comment
Article Tags:

Explore