\(\sqrt{x^2-4x+5}=\sqrt{\left(x-2\right)^2+1}\ge1\)
Đặt \(\sqrt{x^2-4x+5}=a\Rightarrow a\ge1\)
\(M=2\left(x^2-4x+5\right)+\sqrt{x^2-4x+5}-4\)
\(M=2a^2+a-4=2a^2+3a-2a-3-1\)
\(M=a\left(2a+3\right)-\left(2a+3\right)-1\)
\(M=\left(a-1\right)\left(2a+3\right)-1\)
Do \(a\ge1\Rightarrow\left\{{}\begin{matrix}a-1\ge0\\2a+3>0\end{matrix}\right.\) \(\Rightarrow\left(a-1\right)\left(2a+3\right)\ge0\Rightarrow M\ge-1\)
\(\Rightarrow M_{min}=-1\) khi \(a=1\Leftrightarrow x=2\)