\(A=\left|x-1\right|+\left|x-2\right|+...+\left|x-2015\right|\)
\(=\left|x-1\right|+\left|x-2015\right|+\left|x-2\right|+\left|x-2014\right|+...+\left|x-1007\right|+\left|x-1009\right|+\left|x-1008\right|\)
\(=\left|x-1\right|+\left|2015-x\right|+\left|x-2\right|+\left|2014-x\right|+...+\left|x-1007\right|+\left|1009-x\right|+\left|x-1008\right|\)
Ta có : \(\left|x\right|+\left|y\right|\ge\left|x+y\right|;"="\Leftrightarrow xy\ge0\)
\(\Rightarrow A=\left|x-1\right|+\left|2015-x\right|+\left|x-2\right|+\left|2014-x\right|+...+\left|x-1007\right|+\left|1009-x\right|+\left|x-1008\right|\)\(\ge\left|x-1+2015-x\right|+\left|x-2+2014-x\right|+...+\left|x-1007+1009-x\right|+\left|x-1008\right|\)
Lại do \(\left|x-1008\right|\ge0;"="\Leftrightarrow x=1008\)
\(\Rightarrow A\ge2014+2012+...+2=\frac{\left(2014+2\right)\left(\frac{2014-2}{2}+1\right)}{2}=\text{1015056}\)
Dấu "=" xảy ra \(\Leftrightarrow\hept{\begin{cases}\left(x-1\right)\left(2015-x\right)\ge0\\...\\\left(x-1007\right)\left(1009-x\right)\ge0\end{cases}}\)và \(x=2018\)
\(\Leftrightarrow\hept{\begin{cases}1\le x\le2015\\...\\1007\le x\le1009\end{cases};x=1008}\)\(\Leftrightarrow x=1008\)
Vậy Max \(A=\text{1015056}\)tại \(x=1008\)
Câu kết luận là min A nhé -.-
T^T
Chả bao giờ làm dc bài nào hoàn chỉnh :)