If \(I=\int_{0}^{\pi}\displaystyle x\sin x\,dx\), then
Answer & explanation
Correct answer: option 4
The correct answer is Option (4) → \(I=\pi\)
By integration by parts, with x as the first function and sin x as the second:
\( \displaystyle \int x\sin x\,dx = x(-\cos x) - \int 1\times(-\cos x)\,dx \)
\(= -x\cos x + \sin x\)
Putting in the limits:
\( \displaystyle I = \Big[-x\cos x + \sin x\Big]_{0}^{\pi} \)
\(= (-\pi\cos\pi + \sin\pi) - (0 + 0)\)
\(= (-\pi)(-1) + 0 = \pi\)