\(y=\left|x^2+x+2016\right|+\left|x^2+x-6\right|\\ =\left|\left(x^2+x\right)+2016\right|+\left|6-\left(x^2+x\right)\right|\)
Áp dụng bđt: \(\left|A\right|+\left|B\right|\ge\left|A+B\right|\) ta được:
\(y\ge\left|x^2+x+2016+6-x^2-x\right|=2022\)
Vậy min y là 2022 khi \(-3\le x\le2\)