\(B=\left|x-1\right|+\left|x-2\right|.\)
\(B=\left|x-1\right|+\left|2-x\right|.\)
Áp dụng BĐT: \(\left|a\right|+\left|b\right|\ge\left|a+b\right|.\)
\(\Rightarrow B\ge\left|x-1+2-x\right|.\)
\(\Rightarrow B\ge\left|\left(x-x\right)+\left(-1+2\right)\right|=\left|0+1\right|=1.\)
\(\Rightarrow B\ge3.\)
Dấu "=" xảy ra khi và chỉ khi: \(\left(1-x\right)\left(x-2\right)\ge0.\)
\(\Rightarrow2012\le x\le2013.\)
Vậy \(MIN_B=1\) khi \(\left[{}\begin{matrix}x=2012\\x=2013\end{matrix}\right..\)