Ta có: \(M=\frac{x^2+2x+3}{x^2+2}=\frac{2.\left(x^2+2\right)-\left(x^2-2x+1\right)}{x^2+2}\)
\(=\frac{2.\left(x^2+2\right)}{x^2+2}-\frac{x^2-2x+1}{x^2+2}=2-\frac{\left(x-1\right)^2}{x^2+2}\le2\)
Dấu "=" xảy ra khi \(x-1=0\Rightarrow x=1\)
Vậy Mmax = 2 khi x = 1