\(D=\dfrac{\sqrt{x}-x-7}{\sqrt{x}+1}=\dfrac{\left(\sqrt{x}+1\right)-\left(\sqrt{x}-1\right)\left(\sqrt{x}+1\right)-9}{\sqrt{x}+1}=1-\sqrt{x}+1-\dfrac{9}{\sqrt{x}+1}\)
\(=3-\left[\left(\sqrt{x}+1\right)+\dfrac{9}{\sqrt{x}+1}\right]\)\(\le3-2\sqrt{\left(\sqrt{x}+1\right).\dfrac{9}{\sqrt{x}+1}}\) ( BĐT AM-GM)
\(\Leftrightarrow D\le-3\)
Dấu "=" xảy ra khi \(\sqrt{x}+1=\dfrac{9}{\sqrt{x}+1}\Leftrightarrow x=4\)
Vậy \(max_D=-3\)