### ${\log _{\sqrt 5 }}\left[ {3 + \cos \left( {\frac{{3\pi }}{4} + x} \right) + \cos \left( {\frac{\pi }{4} + x} \right) + \cos \left( {\frac{\pi }{4} - x} \right) - \cos \left( {\frac{{3\pi }}{4} - x} \right)} \right]$

The range of the function $f(x) = {\log _{\sqrt 5 }}\left[ {3 + \cos \left( {\frac{{3\pi }}{4} + x} \right) + \cos \left( {\frac{\pi }{4} + x} \right) + \cos \left( {\frac{\pi }{4} - x} \right) - \cos \left( {\frac{{3\pi }}{4} - x} \right)} \right]$ is:

(A) $[ - 2,2]$
(B) $\left[ {\frac{1}{{\sqrt 5 }},\sqrt 5 } \right]$
(C) $(0,\sqrt 5 )$
(D) $[ 0,2]$

Solution

We have, $f(x) = {\log _{\sqrt 5 }}\left( {3 - 2\sin \frac{{3\pi }}{4}\sin x + 2\cos \frac{\pi }{4}\cos x} \right)$

$\Rightarrow f(x) = {\log _{\sqrt 5 }}\left[ {3 + \sqrt 2 (\cos x - \sin x)} \right]$

Now, $- \sqrt 2 \le \cos x - \sin x \le \sqrt 2$

$\therefore - 2 \le \sqrt 2 (\cos x - \sin x) \le 2$

$\therefore 1 \le 3 + \sqrt 2 (\cos x - \sin x) \le 5$

$\therefore{\log _{\sqrt 5 }}1 \le {\log _{\sqrt 5 }}[3 + \sqrt 2 (\cos x - \sin x)] \le {\log _{\sqrt 5 }}5$

$\Rightarrow 0 \le f(x) \le 2$