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

# Fourier series: |x|

Mathematics III · Chapter 4: Fourier Series

- Asked in: 2073 Shrawan, 5 marks
- 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-two
- Whole chapter: https://www.bctengineer.com/md/semester_3/mathematics_iii/chapter-4

## Question

Find the Fourier series representation of f(x) = |x| in [−π, π].

## Short answer

|x| is even, so bₙ=0. a₀=π, and aₙ=0 for even n, -4/(πn²) for odd n. The Fourier series is |x| = π/2 - (4/π)(cos x + cos 3x/3² + cos 5x/5² + ...), -π≤x≤π.

## 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² + ... ]
```

## Check yourself

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

1. For |x| on [−π, π], bn = 0 because:
   A. |x| is even
   B. |x| is odd
   C. |x| is periodic
   D. a0 = 0
   Answer: A. Even function means only cosine terms. (Key point: Symmetry)

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

3. an is:
   A. (2/(πn^2))[(−1)^n + 1]
   B. 2(−1)^n/n
   C. (2/(πn^2))[(−1)^n − 1]
   D. 0
   Answer: C. Integration by parts gives cos nπ − 1 over n^2. (Key point: an)

4. The series is:
   A. π/2 + (4/π)[cos x + cos 3x/9 + ...]
   B. π − (4/π)[cos 2x + cos 4x/4 + ...]
   C. π/2 − (4/π)[sin x + sin 3x/9 + ...]
   D. π/2 − (4/π)[cos x/1^2 + cos 3x/3^2 + ...]
   Answer: D. Only odd n survive. (Key point: Series)

## Close variants set in other exams

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

## Related in Mathematics III

- [Fourier integral representation](https://www.bctengineer.com/question.md?key=semester_3%2Fmathematics_iii%3Afourier-integral-representation) — Mathematics III, chapter 4, asked 2×
- [Fourier integral representation](https://www.bctengineer.com/question.md?key=semester_3%2Fmathematics_iii%3Afourier-integral-representation-two) — Mathematics III, chapter 4, asked 2×
- [Fourier integral representation](https://www.bctengineer.com/question.md?key=semester_3%2Fmathematics_iii%3Afourier-integral-representation-three) — Mathematics III, chapter 4
- [Fourier integral representation](https://www.bctengineer.com/question.md?key=semester_3%2Fmathematics_iii%3Afourier-integral-representation-four) — Mathematics III, chapter 4
- [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 other subjects

- [Fourier series of half-wave rectified sine](https://www.bctengineer.com/question.md?key=semester_5%2Fdata_communication%3Afs-half-wave-rectified) — Data Communication, chapter 3
- [Fourier series of full-wave rectified sine](https://www.bctengineer.com/question.md?key=semester_5%2Fdata_communication%3Afs-full-wave-rectified) — Data Communication, chapter 3
- [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×
