Ta có: \(P=\sqrt{\left(1+x\right)^2}+\sqrt{\left(1-x\right)^2}\)
\(=\left|1+x\right|+\left|1-x\right|\)
\(=1+x+\left|1-x\right|\)
\(=\left[{}\begin{matrix}1+x+1-x\left(x\le1\right)\\1+x+x-1\left(x>1\right)\end{matrix}\right.\)
\(=\left[{}\begin{matrix}2\\2x\end{matrix}\right.\)