\(A=10x-x^2+2\)
\(A=-\left(x^2-10x-2\right)\)
\(A=-\left(x^2-2.x.5+25-25-2\right)\)
\(A=-\left(x^2-2.x.5+25-27\right)\)
\(A=-\left(x-5\right)^2+27\)
Vì \(-\left(x-5\right)^2\le0\) với mọi x
\(\Rightarrow-\left(x-5\right)^2+27\le27\)
\(\Rightarrow Amax=27\Leftrightarrow x=5\)