Q.
Let $f(x)=\begin{vmatrix}
\sin ^{2} x & -2+\cos ^{2} x & \cos 2 x \\
2+\sin ^{2} x & \cos ^{2} x & \cos 2 x \\
\sin ^{2} x & \cos ^{2} x & 1+\cos 2 x
\end{vmatrix},$
$x \in[0, \pi]$ Then the maximum value of $f(x)$ is equal to
Solution: