Để \(f\left(x\right)=\left(ax+b\right)^2\)
\(\Leftrightarrow x^2-\left(2m+1\right)x+m^2+1=\left(ax+b\right)^2\)
\(\Leftrightarrow x^2-\left(2m+1\right)x+\left(m^2+1\right)=a^2x^2+2abx+b^2\)
Đồng nhất hệ số ta được :
\(\left\{{}\begin{matrix}a^2=1\\2ab=-\left(2m+1\right)\\b^2=m^2+1\end{matrix}\right.\Leftrightarrow\left\{{}\begin{matrix}a=\pm1\\2ab=-2m-1\\b^2=m^2+1\end{matrix}\right.\)
Với \(a=1\Rightarrow\left\{{}\begin{matrix}2b=-2m-1\\b^2=m^2+1\end{matrix}\right.\Leftrightarrow\left\{{}\begin{matrix}m=\dfrac{3}{4}\\b=-\dfrac{5}{4}\end{matrix}\right.\)
Với \(a=-1\Rightarrow\left\{{}\begin{matrix}-2b=-2m-1\\b^2=m^2+1\end{matrix}\right.\Leftrightarrow\left\{{}\begin{matrix}m=\dfrac{3}{4}\\b=\dfrac{5}{4}\end{matrix}\right.\)
Vậy \(m=\dfrac{3}{4}\)