Ta có: \(\left|x-\frac{2}{3}\right|\ge x-\frac{2}{3}\)
\(B\ge x+\frac{1}{2}-x+\frac{2}{3}=\frac{7}{6}\)
Dấu "=" xảy ra khi: \(\hept{\begin{cases}x\ge\frac{2}{3}\\x\in R\end{cases}}\) Vậy...
Với \(x\ge\frac{2}{3}\Rightarrow\left|x-\frac{2}{3}\right|\ge0\Rightarrow\left|x-\frac{2}{3}\right|=x-\frac{2}{3}\), thay vào B ta có:
\(B=x+\frac{1}{2}-\left(x-\frac{2}{3}\right)=x+\frac{1}{2}-x+\frac{2}{3}=\frac{7}{6}\left(1\right)\)
Với \(x< \frac{2}{3}\Rightarrow x-\frac{2}{3}< 0\Rightarrow\left|x-\frac{2}{3}\right|=-x+\frac{2}{3}\), thay vào B ta có:
\(B=x+\frac{1}{2}-\left(-x+\frac{2}{3}\right)=x+\frac{1}{2}+x-\frac{2}{3}=2x-\frac{1}{6}\)
Vì \(x< \frac{2}{3}\Rightarrow2x< \frac{4}{3}\Rightarrow2x-\frac{1}{6}< \frac{4}{3}-\frac{1}{6}=\frac{7}{6}\left(2\right)\)
Từ (1) và (2) => \(B\le\frac{7}{6}\)
Vậy \(B_{max}=\frac{7}{6}\Leftrightarrow x\ge\frac{2}{3}\)