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

# Fourier series: x sin x

Mathematics III · Chapter 4: Fourier Series

- Asked in: 2080 Bhadra, 4+1 marks
- Video: [Expand f(x)=xsinx as a Fourier Series in (0,2π) Example 2 exercise 4.1 explained by Yogeshwar Sir](https://www.youtube.com/watch?v=LlsXAC5greQ) — Anant Academy of Mathematics
- 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-sin-x-two
- Whole chapter: https://www.bctengineer.com/md/semester_3/mathematics_iii/chapter-4

## Question

Find the Fourier series of the function f(x) = x sin x in −π ≤ x ≤ π. Also deduce that 1/(1·3) − 1/(3·5) + 1/(5·7) − ... = (π − 2)/4.

## Short answer

f is even, a0=2, a1=−1/2. For n≥2, a_n = 2(−1)^(n+1)/(n²−1). Series: x sin x = 1 − (1/2)cos x + Σ_{n=2}∞ [2(−1)^(n+1)/(n²−1)] cos nx. Setting x=π/2 yields 1/(1·3) − 1/(3·5) + … = (π−2)/4.

## Answer

f(x) = x sin x is even on (−π, π) (x odd × sin x odd), so bₙ = 0.

#### Coefficients
```text
a₀ = (2/π) ∫₀^π x sin x dx = (2/π)[−x cos x + sin x]₀^π = (2/π)(π) = 2
```

For n = 1:

```text
a₁ = (2/π) ∫₀^π x sin x cos x dx = (1/π) ∫₀^π x sin 2x dx
   = (1/π)[−x cos 2x/2 + sin 2x/4]₀^π = (1/π)(−π/2) = −1/2
```

For n ≥ 2, use 2 sin x cos nx = sin(n+1)x − sin(n−1)x and ∫₀^π x sin mx dx = π(−1)^(m+1)/m:

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

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

#### Deduction
Put x = π/2. Then f(π/2) = (π/2)(1) = π/2, cos(π/2) = 0, and cos(nπ/2) = 0 for odd n. For even n = 2m, cos(mπ) = (−1)^m and the coefficient is 2(−1)^(2m+1)/(4m² − 1) = −2/(4m² − 1):

```text
π/2 = 1 + 2 Σ_{m=1}^∞ (−1)^(m+1) / (4m² − 1)
π/2 − 1 = 2 [ 1/(1·3) − 1/(3·5) + 1/(5·7) − ... ]     (4m² − 1 = (2m − 1)(2m + 1))
```

**Hence 1/(1·3) − 1/(3·5) + 1/(5·7) − ... = (π − 2)/4.** ∎

## Check yourself

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

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

2. x sin x =
   A. 1 + (1/2) cos x + ...
   B. 2 - (1/2) cos x + ...
   C. 1 - cos x + ...
   D. 1 - (1/2) cos x + 2 sum (-1)^(n+1) cos nx/(n^2-1), n>=2
   Answer: D. a0/2 = 1, a1 = -1/2. (Key point: Series)

3. The deduction uses
   A. x = pi/2
   B. x = 0
   C. x = pi
   D. x = pi/4
   Answer: A. cos(pi/2)=0 and odd n terms vanish. (Key point: Point)

4. pi/2 - 1 = 2[1/(1.3) - 1/(3.5) + ...] gives
   A. (pi - 2)/2
   B. (pi - 2)/4
   C. (pi + 2)/4
   D. pi/4
   Answer: B. Divide by 2: (pi/2 - 1)/2. (Key point: Result)

## Close variants set in other exams

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

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

## Related in other subjects

- [Exponential Fourier series of A sin ω₀n](https://www.bctengineer.com/question.md?key=semester_4%2Fsignals_and_systems%3Aexponential-fs-sine) — Signals and Systems, chapter 2
- [Laurent series of sin z / z⁶](https://www.bctengineer.com/question.md?key=semester_4%2Fapplied_mathematics%3Alaurent-sinz-over-z6) — Applied Mathematics, chapter 1
- [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×
