TH1: x \(\le\) 1 => \(\left\{{}\begin{matrix}\left|x-1\right|=1-x\\\left|x-2\right|=2-x\end{matrix}\right.\)
PT <=> 1 - x + 2 - x = 1
<=> x = 1 (chọn)
TH2: \(1< x< 2\) => \(\left\{{}\begin{matrix}\left|x-1\right|=x-1\\\left|x-2\right|=2-x\end{matrix}\right.\)
PT <=> x - 1 + 2 - x = 1
<=> x = \(\varnothing\)
TH3: x \(\ge2\) => \(\left\{{}\begin{matrix}\left|x-1\right|=x-1\\\left|x-2\right|=x-2\end{matrix}\right.\)
PT <=> x - 1 + x - 2 =1
<=> x = 2 (chọn)
KL: x = 1; x = 2
Ta có: \(\left|x-1\right|\ge0\forall x\)
\(\left|x-2\right|\ge0\forall x\)
Do đó: \(\left|x-1\right|+\left|x-2\right|\ge0\forall x\)
mà |x-1|+|x-2|=1
nên \(\left[{}\begin{matrix}\left\{{}\begin{matrix}\left|x-1\right|=1\\\left|x-2\right|=0\end{matrix}\right.\\\left\{{}\begin{matrix}\left|x-1\right|=0\\\left|x-2\right|=1\end{matrix}\right.\end{matrix}\right.\Leftrightarrow\left[{}\begin{matrix}\left\{{}\begin{matrix}x-1\in\left\{1;-1\right\}\\x-2=0\end{matrix}\right.\\\left\{{}\begin{matrix}x-1=0\\x-2\in\left\{1;-1\right\}\end{matrix}\right.\end{matrix}\right.\)
\(\Leftrightarrow\left[{}\begin{matrix}\left\{{}\begin{matrix}x\in\left\{2;0\right\}\\x=2\end{matrix}\right.\\\left\{{}\begin{matrix}x=1\\x\in\left\{3;1\right\}\end{matrix}\right.\end{matrix}\right.\Leftrightarrow\left[{}\begin{matrix}x=2\\x=1\end{matrix}\right.\)
Vậy: Tập nghiệm S={1;2}