Suppose that $f(x)=2 \sin ^{2}(\log x)+\cos \left(\log x^{2}\right)-5$ for each $x>0$. What is the value of $f(\pi)$ ?
Using a logarithm rule, we have that $\log x^{2}=2 \log x$, so

$$
f(x)=2 \sin ^{2}(\log x)+\cos (2 \log x)-5 .
$$

Using the trigonometric identity $\cos 2 x=\cos ^{2} x-\sin ^{2} x$, we get

$$
f(x)=2 \sin ^{2}(\log x)+\cos ^{2}(\log x)-\sin ^{2}(\log x)-5
$$

which simplifies to

$$
f(x)=\sin ^{2}(\log x)+\cos ^{2}(\log x)-5
$$

Finally, using the fact that $\sin ^{2} u+\cos ^{2} u=1$ for any real number $u$, we have

$$
f(x)=1-5=-4
$$

and this holds for all $x>0$. Therefore, $f(\pi)=-4$.

ANSWER: -4