4. The minimum value of the function $f(x)=\sqrt{x^{2}+4}+\sqrt{x^{2}-4 x+5}$ is $\qquad$ .
4. $\sqrt{13}$.

Notice,
$$
\begin{array}{l}
\sqrt{a^{2}+b^{2}}+\sqrt{c^{2}+d^{2}} \\
\geqslant \sqrt{(a+c)^{2}+(b+d)^{2}} .
\end{array}
$$

Then $f(x)=\sqrt{x^{2}+4}+\sqrt{x^{2}-4 x+5}$
$$
\begin{array}{l}
=\sqrt{x^{2}+2^{2}}+\sqrt{(2-x)^{2}+1^{2}} \\
\geqslant \sqrt{2^{2}+3^{2}}=\sqrt{13} .
\end{array}
$$