Ta có : \(\left|x-5\right|\le2\)
* TH1 : \(x-5\le2\)
\(\Rightarrow x\le7\) (1)
* TH2 : \(5-x\le2\)
\(\Rightarrow-x\le-3\)
\(\Rightarrow x\ge3\) ( 2 )
Từ (1) ; (2) \(\Rightarrow3\le x\le7\)
\(\Rightarrow x\in\left\{3;4;5;6;7\right\}\)
\(\left|x-5\right|\le2\Leftrightarrow\left|x-5\right|\in\left\{0;1;2\right\}\)
TH1:
\(\left|x-5\right|=0\Leftrightarrow x=5\)
TH2:
\(\left|x-5\right|=1\Leftrightarrow\left[{}\begin{matrix}x-5=1\\x-5=-1\end{matrix}\right.\Leftrightarrow\left[{}\begin{matrix}x=6\\x=4\end{matrix}\right.\)
TH3 :
\(\left|x-5\right|=2\Leftrightarrow\left[{}\begin{matrix}x-5=2\\x-5=-2\end{matrix}\right.\Leftrightarrow\left[{}\begin{matrix}x=7\\x=3\end{matrix}\right.\)
Vậy ta có 3 trường hợp như trên.