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

# Fourier series: x − x²

Mathematics III · Chapter 4: Fourier Series

- Asked in: 2072 Chaitra, 5 marks
- Video: [Fourier Series of (x-x^2): Full Calculation](https://www.youtube.com/watch?v=yMWKgKi0qDk) — Ayan Sarkar
- 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-x2-four
- Whole chapter: https://www.bctengineer.com/md/semester_3/mathematics_iii/chapter-4

## Question

Find a Fourier series to represent f(x) = x − x² from x = −π to x = π. Hence show that 1/1² − 1/2² + 1/3² − 1/4² + ... = π²/12.

## Short answer

For f(x)=x-x² on (-π,π): a₀ = -2π²/3, aₙ = 4(-1)^{n+1}/n², bₙ = 2(-1)^{n+1}/n. Series: -π²/3 + Σ[4(-1)^{n+1}cos nx/n² + 2(-1)^{n+1}sin nx/n]. Setting x=0 yields 1/1² - 1/2² + 1/3² - ... = π²/12.

## Answer

A function f(x) of period 2π on (−π, π) has the Fourier series f(x) = a₀/2 + Σ (aₙ cos nx + bₙ sin nx), with a₀ = (1/π)∫f dx, aₙ = (1/π)∫f cos nx dx, bₙ = (1/π)∫f sin nx dx (all over −π to π).

**Coefficients** for f(x) = x − x². Here x is odd and x² is even.

```text
a₀ = (1/π)∫(x − x²)dx = (1/π)(−2π³/3) = −2π²/3
aₙ = (1/π)∫(x − x²)cos nx dx = −(1/π)∫x² cos nx dx      (x cos nx is odd)
   = −(2/π)[x² sin nx/n + 2x cos nx/n² − 2 sin nx/n³]₀^π
   = −(2/π)(2π cos nπ/n²) = −4(−1)ⁿ/n² = 4(−1)ⁿ⁺¹/n²
bₙ = (1/π)∫(x − x²) sin nx dx = (1/π)∫x sin nx dx    (x² sin nx is odd)
   = (2/π)[−x cos nx/n + sin nx/n²]₀^π = −2cos nπ/n = 2(−1)ⁿ⁺¹/n
```

**Fourier series**

f(x) = −π²/3 + Σ (n=1 to ∞) [ 4(−1)ⁿ⁺¹ cos nx / n² + 2(−1)ⁿ⁺¹ sin nx / n ]

= −π²/3 + 4(cos x − cos 2x/2² + cos 3x/3² − …) + 2(sin x − sin 2x/2 + sin 3x/3 − …)

**Deduction.** f(x) = x − x² is continuous at x = 0 and f(0) = 0. Put x = 0 (all sine terms vanish):

0 = −π²/3 + 4(1/1² − 1/2² + 1/3² − 1/4² + …)

**Answer:** 1/1² − 1/2² + 1/3² − 1/4² + … = π²/12.

## Check yourself

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

1. a0 for x − x^2 on (−π, π) is:
   A. −2π^2/3
   B. 2π^2/3
   C. 0
   D. −π^2/3
   Answer: A. Only −x^2 contributes: −(1/π)(2π^3/3). (Key point: a0)

2. an equals:
   A. 4(−1)^n/n^2
   B. 4(−1)^(n+1)/n^2
   C. 2(−1)^(n+1)/n
   D. 0
   Answer: B. an = −(1/π)∫x^2 cos nx dx = −4(−1)^n/n^2. (Key point: an)

3. Why can we put x = 0?
   A. f jumps at 0
   B. cos terms vanish
   C. f is continuous at 0 with f(0) = 0 and sine terms vanish
   D. sin x = 1 at 0
   Answer: C. The series converges to f(0) = 0. (Key point: Deduction point)

4. Putting x = 0 gives 1/1^2 − 1/2^2 + 1/3^2 − ... =
   A. π^2/6
   B. π^2/8
   C. π^2/4
   D. π^2/12
   Answer: D. 0 = −π^2/3 + 4S so S = π^2/12. (Key point: Result)

## Related in Mathematics III

- [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 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: eˣ](https://www.bctengineer.com/question.md?key=semester_3%2Fmathematics_iii%3Afourier-series-e) — 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-two) — Mathematics III, chapter 4, asked 2×
- [Fourier series: 2x − x²](https://www.bctengineer.com/question.md?key=semester_3%2Fmathematics_iii%3Afourier-series-2x-x2-three) — Mathematics III, chapter 4, asked 2×
- [Fourier series: |x|](https://www.bctengineer.com/question.md?key=semester_3%2Fmathematics_iii%3Afourier-series-x) — 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
- [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×
- [Derive trigonometric Fourier series (CT)](https://www.bctengineer.com/question.md?key=semester_4%2Fsignals_and_systems%3Actfs-trigonometric-derivation) — Signals and Systems, chapter 2, asked 3×
