The value of \(\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}}\displaystyle(\sin|x|-\cos|x|)\,dx\) is:
Answer & explanation
Correct answer: option 3
The correct answer is Option (3) → 0
Let \(f(x) = \sin|x| - \cos|x|\). Since \(|-x| = |x|\),
\(f(-x) = f(x)\)
so f is an even function, and
\( \displaystyle \int_{-a}^{a} f(x)\,dx = 2\int_{0}^{a} f(x)\,dx \)
For \(x \ge 0\), |x| = x:
\( \displaystyle I = 2\int_{0}^{\pi/2}(\sin x - \cos x)\,dx \)
\( \displaystyle = 2\Big[-\cos x - \sin x\Big]_{0}^{\pi/2} \)
\( \displaystyle = 2\Big[(-0 - 1) - (-1 - 0)\Big] \)
\(= 2(-1 + 1) = 0\)