The value of \(\int_{0}^{\frac{\pi}{2}}\displaystyle x\cos x\,dx\) is
Answer & explanation
Correct answer: option 4
The correct answer is Option (4) → \(\displaystyle\frac{\pi}{2}-1\)
By integration by parts, taking x as the first function and \(\cos x\) as the second,
\( \displaystyle \int x\cos x\,dx = x\sin x - \int \sin x\,dx \)
\( = x\sin x + \cos x\)
Putting in the limits:
\( \displaystyle \left[x\sin x + \cos x\right]_{0}^{\pi/2} = \left(\frac{\pi}{2}\cdot 1 + 0\right) - (0 + 1) \)
\( \displaystyle = \frac{\pi}{2} - 1 \)
Why the other options are incorrect
Option (1) \(\displaystyle\frac{\pi}{2}\) — Incorrect. It leaves out the value of \(\cos x\) at the lower limit, \(\cos 0 = 1\).
Option (2) \(\displaystyle\frac{\pi}{2}+1\) — Incorrect. The value at the lower limit is added instead of subtracted.
Option (3) \(1-\displaystyle\frac{\pi}{2}\) — Incorrect. It has the wrong sign; the integrand \(x\cos x\) is positive on \((0, \pi/2)\), so the value must be positive.