Giải thích các bước giải:
$\begin{split}M&=-x+5\sqrt{x}-\dfrac{9}{\sqrt{x}}+2019\\&=-x+6\sqrt{x}-9 -(\sqrt{x}+\dfrac{9}{\sqrt{x}})+2028\\&=-(\sqrt{x}-3)^2-(\sqrt{x}+\dfrac{9}{\sqrt{x}})+2028\\&\le 0-2\sqrt{\sqrt{x}.\dfrac{9}{\sqrt{x}}}+2028=2022\end{split}$
$\rightarrow MaxM=2022\rightarrow x=9$