Có\(\left\{{}\begin{matrix}\left|x-1\right|\ge x-1\\\left|x-2\right|\ge x-2\\\left|x-3\right|\le x-3\\\left|x-4\right|\le x-4\end{matrix}\right.\forall x\)
\(\Rightarrow A=\left|x-1\right|+\left|x-2\right|+\left|x-3\right|+\left|x-4\right|\ge\left(x-1\right)+\left(x-2\right)+\left(3-x\right)+\left(4-x\right)\)\(\Rightarrow A\ge4\)
Dấu "=" xảy ra khi\(\left\{{}\begin{matrix}x-1\ge0\\x-2\ge0\\x-3\le0\\x-4\le0\end{matrix}\right.\Rightarrow\left\{{}\begin{matrix}x\ge1\\x\ge2\\x\le3\\x\le4\end{matrix}\right.\Rightarrow2\le x\le4\)
Mà x\(\in Z\)\(\Rightarrow x=2;x=3\)
Vậy với x\(\in\left\{2;3\right\}\)thì A đạt giá trị nhỏ nhất là 4