Đặt \(\sqrt{x-1}+\sqrt{3-x}=t\Rightarrow\sqrt{2}\le t\le2\)
\(t^2=2+2\sqrt{-x^2+4x-3}\)
Ta được:
\(y=t^2-4t+3\) với \(t\in\left[\sqrt{2};2\right]\)
\(-\frac{b}{2a}=2\in\left[\sqrt{2};2\right]\)
\(f\left(\sqrt{2}\right)=5-4\sqrt{2}\) ; \(f\left(2\right)=-1\Rightarrow\left\{{}\begin{matrix}M=5-4\sqrt{2}\\m=-1\end{matrix}\right.\)