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

# Half range cosine series: πx − x²

Mathematics III · Chapter 4: Fourier Series

- Asked in: 2082 Baishakh, 5 marks
- Video: [Half Range Cosine Series | Fourier Series | Problem 1 | Engineering Math 1](https://www.youtube.com/watch?v=eLVg8n1yB6c) — Aryabhat Institute
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_3/mathematics_iii/half-range-cosine-series-x-x2
- Whole chapter: https://www.bctengineer.com/md/semester_3/mathematics_iii/chapter-4

## Question

Find the half range Fourier cosine series for f(x) = πx − x² in (0, π).

## Short answer

Half-range cosine series: f(x) = π²/6 − Σ_{m=1}∞ (cos 2mx)/m².

## Answer

Half-range cosine series on (0, π): f(x) = a₀/2 + Σ aₙ cos nx, with

```text
a₀ = (2/π) ∫₀^π f(x) dx,    aₙ = (2/π) ∫₀^π f(x) cos nx dx
```

For f(x) = πx − x²:

```text
a₀ = (2/π) [ πx²/2 − x³/3 ]₀^π = (2/π)(π³/6) = π²/3
```

For aₙ, integrate by parts twice:

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

(using ∫₀^π (π − 2x) sin nx dx = [−(π − 2x) cos nx/n]₀^π − (2/n)∫₀^π cos nx dx = π(1 + (−1)ⁿ)/n.)

```text
aₙ = (2/π) · [ −π (1 + (−1)ⁿ)/n² ] = −2 (1 + (−1)ⁿ)/n²
```

So aₙ = 0 for odd n and aₙ = −4/n² for even n = 2m, i.e. −1/m².

**Answer:**

```text
πx − x² = π²/6 − Σ_{m=1}^∞ cos 2mx / m²
        = π²/6 − cos 2x − (cos 4x)/4 − (cos 6x)/9 − ...,    0 < x < π
```

(Check at x = 0: 0 = π²/6 − Σ 1/m² = π²/6 − π²/6 ✓.)

## Check yourself

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

1. Half-range cosine on (0,pi): f = a0/2 + sum an cos nx with a0 =
   A. (1/pi) integral
   B. (2/pi) integral f cos
   C. integral f
   D. (2/pi) integral from 0 to pi f dx
   Answer: D. Half-range. (Key point: Formula)

2. a0 for pi x - x^2 =
   A. pi^2/3
   B. pi^2/6
   C. 2 pi^2/3
   D. pi^3/6
   Answer: A. (2/pi)(pi^3/6). (Key point: a0)

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

4. The series is
   A. pi^2/3 - sum cos 2mx/m^2
   B. pi^2/6 + sum cos 2mx/m^2
   C. pi^2/6 - sum cos 2mx/m^2
   D. pi^2/6 - sum cos mx/m^2
   Answer: C. Constant a0/2 = pi^2/6. (Key point: Series)

## Close variants set in other exams

- [Half range sine series: x − x²](https://www.bctengineer.com/question.md?key=semester_3%2Fmathematics_iii%3Ahalf-range-sine-series-x-x2-three) — Mathematics III, chapter 4, asked 11×
- [Half range cosine series: eˣ](https://www.bctengineer.com/question.md?key=semester_3%2Fmathematics_iii%3Ahalf-range-cosine-series-e) — Mathematics III, chapter 4, asked 3×

## Related in Mathematics III

- [Half range cosine series](https://www.bctengineer.com/question.md?key=semester_3%2Fmathematics_iii%3Ahalf-range-cosine-series) — Mathematics III, chapter 4, asked 3×
- [Half range cosine series: x sin x](https://www.bctengineer.com/question.md?key=semester_3%2Fmathematics_iii%3Ahalf-range-cosine-series-x-sin) — Mathematics III, chapter 4, asked 3×
- [Half range cosine series: x](https://www.bctengineer.com/question.md?key=semester_3%2Fmathematics_iii%3Ahalf-range-cosine-series-x) — Mathematics III, chapter 4, asked 3×
- [Half range cosine series: x](https://www.bctengineer.com/question.md?key=semester_3%2Fmathematics_iii%3Ahalf-range-cosine-series-x-two) — Mathematics III, chapter 4, asked 2×
- [Half range sine and cosine series: eˣ](https://www.bctengineer.com/question.md?key=semester_3%2Fmathematics_iii%3Ahalf-range-sine-and-cosine-series) — Mathematics III, chapter 4, asked 2×
- [Half range cosine series: sin(πx/l)](https://www.bctengineer.com/question.md?key=semester_3%2Fmathematics_iii%3Ahalf-range-cosine-series-sin-x) — Mathematics III, chapter 4

## 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 half-period ramp pulses](https://www.bctengineer.com/question.md?key=semester_3%2Felectrical_circuit_theory%3Afourier-ramp-half-period-vo) — Electrical Circuit Theory, chapter 6
- [Fourier cosine integral of e^{-kx}](https://www.bctengineer.com/question.md?key=semester_4%2Fapplied_mathematics%3Afourier-cosine-integral-e-kx) — Applied Mathematics, chapter 4, asked 2×
- [Cosine series up to n terms](https://www.bctengineer.com/question.md?key=semester_1%2Fcomputer_programming%3Acosine-series) — Computer Programming, chapter 5
