\(P=\frac{x^2+x+1}{x^2+2x+2}\Leftrightarrow Px^2+2x.P+2P=x^2+x+1\)
\(\Leftrightarrow\left(P-1\right)x^2+\left(2P-1\right)x+\left(2P-1\right)=0\)
Xét P = 1 thì x = -1
Xét P khác 1 thì \(\Delta=\left(2P-1\right)^2-4\left(P-1\right)\left(2P-1\right)\ge0\)
\(\Leftrightarrow-4P^2+8P-3\ge0\Leftrightarrow\frac{1}{2}\le P\le\frac{3}{2}\)