\(P=\left|x-1\right|+\left|x-2017\right|+\left|x-2018\right|\)
\(P=\left|x-1\right|+\left|2018-x\right|+\left|x-2017\right|\)
\(P\ge\left|x-1+2018-x\right|+\left|x-2017\right|\)
\(P\ge2017+\left|x-2017\right|\)
Vì \( \left|x-2017\right|\ge0\forall x\in R\) nên \(P\ge2017\)
Dấu "=" xảy ra khi: \(\left\{{}\begin{matrix}x\ge1\\x=2017\\x\le2018\end{matrix}\right.\Leftrightarrow x=2017\)