4. The range of the function $y=x+\sqrt{x^{2}-3 x+2}$ is
4. $\left[1, \frac{3}{2}\right) \cup[2,+\infty)$.

The original problem is equivalent to the equation about $x$: $\left\{\begin{array}{l}x^{2}-3 x+2=(y-x)^{2} \\ y \geqslant x\end{array}\right.$ having a solution, which means $\left\{\begin{array}{l}x=\frac{y^{2}-2}{2 y-3} \\ x \leqslant y\end{array}\right.$ has a solution. Therefore, $\frac{y^{2}-2}{2 y-3} \leqslant$ $y, y \in\left[1, \frac{3}{2}\right) \cup[2,+\infty)$.