Example 6 Find the range of the function $f(x)=2 x+\sqrt{x^{2}}-3 x+2$.

Translate the above text into English, please retain the original text's line breaks and format, and output the translation result directly. 

Example 6 Find the range of the function $f(x)=2 x+\sqrt{x^{2}}-3 x+2$.
Solution 1 Since $x^{2}-3 x+2=\left(x-\frac{3}{2}\right)^{2}-\frac{1}{4}$, we can make the substitution
$$
\sqrt{x^{2}-3 x+2}=\left|x-\frac{3}{2}\right|-t\left(0<t<\left|x-\frac{3}{2}\right|\right)
$$
When $0<u \leqslant 2$, substituting $v=-u+g(u, v)=-u+k$ into equation (1), we get $3 u^{2}+(6-$ $8 k) u+4 k^{2}-8=0$. By its discriminant
$\Delta=(6-8 k)^{2}-4 \cdot 3\left(4 k^{2}-8\right) \geqslant 0$, we find $k=g(u, v) \leqslant 3-\frac{\sqrt{3}}{2}$ (discard $k \geqslant 3+\frac{\sqrt{3}}{2}$, as it does not fit the problem's context). At this point, $g(u, v)_{\text {max }}=3-\frac{\sqrt{3}}{2}$.
Therefore, the range of $f(x)$ is $\left(-\infty, 3-\frac{\sqrt{3}}{2}\right] \cup[4,+\infty)$.