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) → 4
Replacing x by −x does not change \(|x|\), so \(\sin|x| + \cos|x|\) is an even function, and \(\int_{-a}^{a} f(x)\,dx = 2\int_{0}^{a} f(x)\,dx\). For \(x \ge 0\), \(|x| = x\):
\(\displaystyle I = 2\int_{0}^{\frac{\pi}{2}} (\sin x + \cos x)\,dx\)
\(\displaystyle = 2\Big[-\cos x + \sin x\Big]_{0}^{\frac{\pi}{2}}\)
\(= 2\left[(0 + 1) - (-1 + 0)\right]\)
\(= 4\)