\(y=x^3+\left(m^2+1\right)x+m^2-2\)
=>\(y'=3x^2+\left(m^2+1\right)\)
Đặt y'=0
=>\(3x^2+\left(m^2+1\right)=0\)
mà \(3x^2>=0\forall x;m^2+1>=1>0\forall m\)
nên \(x\in\varnothing\)
\(y\left(0\right)=0^3+\left(m^2+1\right)0+m^2-2=m^2-2\)
\(y\left(2\right)=2^3+2\left(m^2+1\right)+m^2-2=2m^2+2+m^2+6=3m^2+8\)
Để \(y_{min\left[0;2\right]}=2\) thì \(\left[{}\begin{matrix}m^2-2=2\\3m^2+8=2\end{matrix}\right.\Leftrightarrow\left[{}\begin{matrix}m^2=4\\3m^2=-6\left(loại\right)\end{matrix}\right.\)
=>\(m^2=4\)
=>\(\left[{}\begin{matrix}m=2\left(nhận\right)\\m=-2\left(loại\right)\end{matrix}\right.\)
Vậy: m=2