---
title: "Fourier series: |x|"
subject: "Mathematics III"
chapter: 4
key: "semester_3/mathematics_iii:fourier-series-x"
source: https://www.bctengineer.com/q/semester_3/mathematics_iii/fourier-series-x
site: BCT Engineering
---

# Fourier series: |x|

Mathematics III · Chapter 4: Fourier Series

- Asked in: 2082 Baishakh, 4+1 marks; 2081 Baishakh, 4+1 marks; 2068 Chaitra, 5 marks (asked 3 times)
- Video: [How to Compute a FOURIER SERIES // Formulas & Full Example](https://www.youtube.com/watch?v=ijQaTAT3kOg) — Dr. Trefor Bazett
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_3/mathematics_iii/fourier-series-x
- Whole chapter: https://www.bctengineer.com/md/semester_3/mathematics_iii/chapter-4

## Question

Find the Fourier series of the function f(x) = |x| for −π ≤ x ≤ π and hence deduce that π²/8 = 1/1² + 1/3² + 1/5² + ...

## Short answer

Since |x| is even, b_n=0. a_0 = pi, a_n = -4/(pi n^2) for odd n, 0 for even n. This gives |x| = pi/2 - (4/pi)[cos x/1^2 + cos 3x/3^2 + ...]. Setting x=0 yields pi^2/8 = 1/1^2 + 1/3^2 + 1/5^2 + ...

## Answer

f(x) = |x| on (−π, π) is an even function, so bₙ = 0.

#### Coefficients
```text
a₀ = (2/π) ∫₀^π x dx = (2/π)(π²/2) = π
aₙ = (2/π) ∫₀^π x cos nx dx
   = (2/π) [ x sin nx/n + cos nx/n² ]₀^π
   = (2/(πn²)) [ (−1)ⁿ − 1 ]
```

So aₙ = 0 for even n, and aₙ = −4/(πn²) for odd n.

#### Series
```text
|x| = π/2 − (4/π) [ cos x/1² + cos 3x/3² + cos 5x/5² + ... ]
```

#### Deduction
|x| is continuous at x = 0 with f(0) = 0:

```text
0 = π/2 − (4/π) [ 1/1² + 1/3² + 1/5² + ... ]
```

**Hence π²/8 = 1/1² + 1/3² + 1/5² + ...** ∎

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. |x| is even, so
   A. an = 0
   B. bn = 0
   C. a0 = 0
   D. only sine terms
   Answer: B. Even function. (Key point: Symmetry)

2. a0 =
   A. pi/2
   B. 2 pi
   C. pi
   D. 0
   Answer: C. (2/pi)(pi^2/2). (Key point: a0)

3. an is
   A. 4/(pi n^2) for odd n
   B. -4/(pi n^2) for all n
   C. 0 for odd n
   D. -4/(pi n^2) for odd n, 0 for even n
   Answer: D. (2/(pi n^2))((-1)^n - 1). (Key point: an)

4. Putting x = 0 gives pi^2/8 = 1 + 1/9 + 1/25 + ... because
   A. 0 = pi/2 - (4/pi)[1 + 1/9 + 1/25 + ...]
   B. 0 = pi/2 + (4/pi)[...]
   C. pi = (4/pi)[...]
   D. |0| = 1
   Answer: A. |x| is continuous at 0. (Key point: Deduction)

## Close variants set in other exams

- [Fourier series: x²](https://www.bctengineer.com/question.md?key=semester_3%2Fmathematics_iii%3Afourier-series-x2) — Mathematics III, chapter 4, asked 9×
- [Fourier series: x sin x](https://www.bctengineer.com/question.md?key=semester_3%2Fmathematics_iii%3Afourier-series-x-sin-x-two) — Mathematics III, chapter 4, asked 7×

## Related in Mathematics III

- [Fourier series of a function](https://www.bctengineer.com/question.md?key=semester_3%2Fmathematics_iii%3Afourier-series-of-a-function) — Mathematics III, chapter 4, asked 6×
- [Fourier series: x − x²](https://www.bctengineer.com/question.md?key=semester_3%2Fmathematics_iii%3Afourier-series-x-x2) — Mathematics III, chapter 4, asked 6×
- [Fourier series: x²](https://www.bctengineer.com/question.md?key=semester_3%2Fmathematics_iii%3Afourier-series-x2-two) — Mathematics III, chapter 4, asked 2×
- [Fourier series: x − x²](https://www.bctengineer.com/question.md?key=semester_3%2Fmathematics_iii%3Afourier-series-x-x2-four) — Mathematics III, chapter 4
- [Fourier series: x³](https://www.bctengineer.com/question.md?key=semester_3%2Fmathematics_iii%3Afourier-series-x3) — Mathematics III, chapter 4, asked 6×
- [Fourier series: eˣ](https://www.bctengineer.com/question.md?key=semester_3%2Fmathematics_iii%3Afourier-series-e) — Mathematics III, chapter 4, asked 6×

## Related in other subjects

- [Line voltage Fourier series: triplen harmonics absent](https://www.bctengineer.com/question.md?key=semester_7%2Fpower_electronics%3Asquare-wave-inverter-triplen-absent) — Power Electronics, chapter 5
- [Fourier transform vs Fourier series](https://www.bctengineer.com/question.md?key=semester_4%2Fapplied_mathematics%3Afourier-transform-vs-series) — Applied Mathematics, chapter 4
- [Derive exponential Fourier series (CT)](https://www.bctengineer.com/question.md?key=semester_4%2Fsignals_and_systems%3Actfs-exponential-derivation) — Signals and Systems, chapter 2, asked 15×
- [Derive the discrete-time Fourier series](https://www.bctengineer.com/question.md?key=semester_4%2Fsignals_and_systems%3Adtfs-derivation) — Signals and Systems, chapter 2, asked 15×
