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

# Fourier series: x − x²

Mathematics III · Chapter 4: Fourier Series

- Asked in: 2083 Baishakh, 5 marks; 2079 Baishakh, 5 marks; 2075 Asoj, 5 marks; 2072 Kartik, 5 marks; 2067 Asar (asked 5 times)
- 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
- Whole chapter: https://www.bctengineer.com/md/semester_3/mathematics_iii/chapter-4

## Question

Obtain the Fourier series to represent f(x) = x − x² from x = −π to x = π and hence deduce that π²/12 = 1/1² − 1/2² + 1/3² − 1/4² + ...

## Short answer

Fourier series on (-π,π): f(x) = -π^2/3 + Σ_{n=1}^∞ [4(-1)^(n+1)/n^2 cos nx + 2(-1)^(n+1)/n sin nx]. Evaluating at x=0 gives 0 = -π^2/3 + 4(1/1^2 - 1/2^2 +...), hence π^2/12 = 1/1^2 - 1/2^2 + 1/3^2 - ...

## Answer

f(x) = x − x² on (−π, π). Use ∫ x² cos nx dx and ∫ x sin nx dx over (−π, π), with cos nπ = (−1)ⁿ.

#### Coefficients
```text
a₀ = (1/π) ∫_{−π}^{π} (x − x²) dx = (1/π)(−2π³/3) = −2π²/3
aₙ = (1/π) ∫ (x − x²) cos nx dx = −(1/π)∫ x² cos nx dx = −4(−1)ⁿ/n²
bₙ = (1/π) ∫ (x − x²) sin nx dx = (1/π)∫ x sin nx dx = 2(−1)ⁿ⁺¹/n
```

(x cos nx and x² sin nx are odd, so they integrate to 0; ∫_{−π}^{π} x² cos nx dx = 4π(−1)ⁿ/n² and ∫_{−π}^{π} x sin nx dx = 2π(−1)ⁿ⁺¹/n.)

#### Series
```text
x − x² = −π²/3 + Σ_{n=1}^∞ [ 4(−1)ⁿ⁺¹/n² · cos nx + 2(−1)ⁿ⁺¹/n · sin nx ]
       = −π²/3 + 4cos x − cos 2x + (4/9)cos 3x − ...
         + 2 sin x − sin 2x + (2/3) sin 3x − ...
```

#### Deduction
The function is continuous at x = 0 and f(0) = 0, with sin 0 = 0 and cos 0 = 1:

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

**Hence π²/12 = 1/1² − 1/2² + 1/3² − 1/4² + ...** ∎

## Check yourself

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

1. In x - x^2, which part contributes to the cosine terms?
   A. x (odd)
   B. Both x and x^2
   C. -x^2 (even)
   D. Neither
   Answer: C. Even parts give cosine terms, odd parts sine terms. (Key point: Odd/even parts)

2. a0 =
   A. 2 pi^2/3
   B. -pi^2/3
   C. 0
   D. -2 pi^2/3
   Answer: D. (1/pi) integral of -x^2 = -2pi^2/3, so the constant is a0/2 = -pi^2/3. (Key point: Constant term)

3. bn =
   A. 2(-1)^(n+1)/n
   B. 2(-1)^n/n
   C. 4(-1)^(n+1)/n^2
   D. 0
   Answer: A. From integral of x sin nx. (Key point: Sine coefficients)

4. Putting x = 0 gives pi^2/12 = 1 - 1/4 + 1/9 - ... because
   A. 0 = pi^2/3 + 4[...]
   B. 0 = -pi^2/3 + 4[1 - 1/4 + 1/9 - ...]
   C. pi^2 = 4[...]
   D. f(0) = 1
   Answer: B. f(0) = 0, cos 0 = 1, sin 0 = 0; the series is continuous there. (Key point: Deduction)

## Close variants set in other exams

- [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×

## Related in Mathematics III

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

- [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 series of rising sawtooth −V0 to V0](https://www.bctengineer.com/question.md?key=semester_3%2Felectrical_circuit_theory%3Afourier-sawtooth-minus-v0-to-v0) — Electrical Circuit Theory, chapter 6
- [Fourier series of falling sawtooth V to 0](https://www.bctengineer.com/question.md?key=semester_3%2Felectrical_circuit_theory%3Afourier-falling-sawtooth-v-to-0) — Electrical Circuit Theory, chapter 6
- [Fourier series of ramp wave 0 to 20](https://www.bctengineer.com/question.md?key=semester_3%2Felectrical_circuit_theory%3Afourier-ramp-0-to-20-period) — Electrical Circuit Theory, chapter 6
