Example 5 Given that the graph of the quadratic function $f(x)$ opens downwards, and for any real number $x \in \mathbf{R}$, $f(2-x)=f(2+x)$ holds, solve the inequality $f\left[\log \frac{1}{\frac{1}{4}}\left(x^{2}+x+\frac{1}{2}\right)\right]<f\left[\log \frac{1}{\frac{1}{2}}\left(2 x^{2}-x+\frac{5}{8}\right)\right]$.
Solving: Since $x^{2}+x+\frac{1}{2}=\left(x+\frac{1}{2}\right)^{2}+\frac{1}{4} \geqslant \frac{1}{4}$,
thus $\log _{\frac{1}{2}}\left(x^{2}+x+\frac{1}{2}\right) \leqslant 2$;
Similarly, $\log _{\frac{1}{+}}\left(2 x^{2}-x+\frac{5}{8}\right) \leqslant 1$.
From $f(2-x)=f(2+x)$, we know the axis of symmetry of the parabola is $x=2$. Also, since the graph of $y=f(x)$ opens downwards, the function $f(x)$ is increasing when $x \leqslant 2$. The original inequality is transformed into $\log _{\frac{1}{7}}\left(x^{2}+x+\frac{1}{2}\right)<\log _{\frac{1}{2}}\left(2 x^{2}-x+\frac{5}{8}\right)$, which means $x^{2}+x+\frac{1}{2}<2 x^{2}-x+\frac{5}{8}$. Solving this, we get $1-\frac{\sqrt{14}}{4}<x<1+\frac{\sqrt{14}}{4}$.