Example 1. Find the minimum value of the function $f(x)=\max \left\{x^{2}+1, \cos x, 2 x\right\} \quad(x \in R)$.
$$
\begin{array}{l} 
\text { Sol } \because\left(x^{2}+1\right)-\cos x \\
=x^{2}+(1-\cos x) \geqslant 0, \\
\left(x^{2}+1\right)-2 x=(x-1)^{2} \geqslant 0, \\
\therefore \quad x^{2}+1 \geqslant \cos x, x^{2}+1 \geqslant 2 x \\
\text { Therefore, } f(x)=\max \left\{x^{2}+1, \cos x, 2 x\right\} \\
=x^{2}+1 \geqslant 1,
\end{array}
$$

where the equality holds when $x=0$, hence the minimum value of $f(x)$ is 1.