Lời giải:
Ta có:
\(P=\sqrt{x^2+x+1}+\sqrt{x^2-x+1}=\sqrt{\frac{3}{4}(x+1)^2+\frac{1}{4}(x-1)^2}+\sqrt{\frac{3}{4}(x-1)^2+\frac{1}{4}(x+1)^2}\)
\(=\sqrt{(\frac{\sqrt{3}}{2}x+\frac{\sqrt{3}}{2})^2+(\frac{1}{2}x-\frac{1}{2})^2}+\sqrt{(-\frac{\sqrt{3}}{2}x+\frac{\sqrt{3}}{2})^2+(-\frac{1}{2}x-\frac{1}{2})^2}\)
\(\geq \sqrt{(\frac{\sqrt{3}}{2}x+\frac{\sqrt{3}}{2}-\frac{\sqrt{3}}{2}x+\frac{\sqrt{3}}{2})^2+(\frac{1}{2}x-\frac{1}{2}-\frac{1}{2}x-\frac{1}{2})^2}\) (áp dụng BĐT Mincopsky)
\(\Leftrightarrow P\geq 2\)
Vậy $P_{\min}=2$. Dấu "=" xảy ra khi $x=0$