M = |(x - 2020)(x2 - 16)| + 2x(x - 4) + 8(4 - x ) + 2021
= |(x - 2020)(x2 - 16)| + 2x(x - 4) - 8(x - 4 ) + 2021
= |(x - 2020)(x2 - 16)| + (x - 4)(2x - 8) + 2021
= |(x - 2020)(x2 - 16)| + 2(x - 4)2 + 2021
Lại có \(\hept{\begin{cases}\left|\left(x-2020\right)\left(x^2-16\right)\right|\ge0\forall x\\2\left(x-4\right)^2\ge0\forall x\end{cases}}\)
=> |(x - 2020)(x2 - 16) + 2(x - 4)2 + 2021 \(\ge2021\forall x\)
Dấu "=" xảy ra <=> \(\hept{\begin{cases}\left(x-2020\right)\left(x^2-16\right)=0\\2\left(x-4\right)^2=0\end{cases}}\)
Khi (x - 2020)(x2 - 16) = 0
=> \(\orbr{\begin{cases}x-2020=0\\x^2-16=0\end{cases}}\Rightarrow\orbr{\begin{cases}x=2020\\x=\pm4\end{cases}}\)(1)
Khi 2(x - 4)2 = 0
=> x - 4 = 0
=> x = 4 (2)
Từ (1) (2) => x = 4
Vậy Min M = 2021 <=> x = 4