Ta có: \(P=\frac{x^4+x^3+x+1}{x^4-x^3+2x^2-x+1}=\frac{x^3\left(x+1\right)+\left(x+1\right)}{x^4-x^3+x^2+x^2-x+1}=\frac{\left(x^3+1\right)\left(x+1\right)}{x^2\left(x^2-x+1\right)+\left(x^2-x+1\right)}\)
\(=\frac{\left(x+1\right)\left(x^2-x+1\right)\left(x+1\right)}{\left(x^2-x+1\right)\left(x^2+1\right)}=\frac{\left(x+1\right)^2\left(x^2-x+1\right)}{\left(x^2+1\right)\left(x^2-x+1\right)}\)
Vì \(\hept{\begin{cases}x^2+1\ge1>0\\x^2-x+1=\left(x-\frac{1}{2}\right)^2+\frac{3}{4}\ge\frac{3}{4}>0\end{cases}}\)
Nên mẫu số luôn luôn khác 0
Do đó: \(P=\frac{\left(x+1\right)^2\left(x^2-x+1\right)}{\left(x^2+1\right)\left(x^2-x+1\right)}=\frac{\left(x+1\right)^2}{x^2+1}\)
Vì \(\hept{\begin{cases}\left(x+1\right)^2\ge0\\x^2+1>0\end{cases}\left(\forall x\right)}\) nên \(P\ge0\left(\forall x\right)\)
\(P=\frac{x^4+x^2+x+1}{x^4-x^2+2x^2-x+1}=\frac{\left(x+1\right)^2\left(x^2-x+1\right)}{\left(x^2+1\right)\left(x^2-x+1\right)}\)
Do \(\left(x^2+1\right)\left(x^2-x+1\right)\ne0\)do đó không cần điều kiện của x
Vậy \(P=\frac{\left(x+1\right)^2\left(x^2-x+1\right)}{\left(x^2+1\right)\left(x^2-x+1\right)}=\frac{\left(x+1\right)^2}{x^2+1}\)
\(\hept{\begin{cases}\left(x+1\right)^2\ge0\forall x\\x^2+1>0\forall x\end{cases}\Rightarrow P\ge0\forall x}\)