ĐK: \(x\ge0,x\ne1\)
\(M=\left(\dfrac{\sqrt{x}-2}{x-1}-\dfrac{\sqrt{x}+2}{x+2\sqrt{x}+1}\right).\dfrac{\left(x-1\right)^2}{2}=\left[\dfrac{\sqrt{x}-2}{\left(\sqrt{x}-1\right)\left(\sqrt{x}+1\right)}-\dfrac{\sqrt{x}+2}{\left(\sqrt{x}+1\right)^2}\right].\dfrac{\left(x-1\right)^2}{2}=\left[\dfrac{\left(\sqrt{x}-2\right)\left(\sqrt{x}+1\right)}{\left(\sqrt{x}-1\right)\left(\sqrt{x}+1\right)^2}-\dfrac{\left(\sqrt{x}+2\right)\left(\sqrt{x}-1\right)}{\left(\sqrt{x}-1\right)\left(\sqrt{x}+1\right)^2}\right].\dfrac{\left(\sqrt{x}-1\right)^2\left(\sqrt{x}+1\right)^2}{2}=\left[\dfrac{x-\sqrt{x}-2}{\left(\sqrt{x}-1\right)\left(\sqrt{x}+1\right)^2}-\dfrac{x+\sqrt{x}-2}{\left(\sqrt{x}-1\right)\left(\sqrt{x}+1\right)^2}\right].\dfrac{\left(\sqrt{x}-1\right)^2\left(\sqrt{x}+1\right)^2}{2}=\dfrac{x-\sqrt{x}-2-x-\sqrt{x}+2}{\left(\sqrt{x}-1\right)\left(\sqrt{x}+1\right)^2}.\dfrac{\left(\sqrt{x}-1\right)^2\left(\sqrt{x}+1\right)^2}{2}=\dfrac{-2\sqrt{x}\left(\sqrt{x}-1\right)^2\left(\sqrt{x}+1\right)^2}{\left(\sqrt{x}-1\right)\left(\sqrt{x}+1\right)^2.2}=-\sqrt{x}\left(\sqrt{x}-1\right)=-x+\sqrt{x}=\sqrt{x}-x\)
Ta có \(M=\sqrt{x}-x=\sqrt{x}\left(1-\sqrt{x}\right)\)
Ta có \(\sqrt{x}\ge0\)
Vậy để M có GTLN thì \(1-\sqrt{x}\) có GTLN
Mà ta có \(\sqrt{x}\ge0\Leftrightarrow-\sqrt{x}\le0\Leftrightarrow1-\sqrt{x}\le1\)
\(\Leftrightarrow\sqrt{x}\left(1-\sqrt{x}\right)\le1\)
Dấu '=' xảy ra khi x=0
Vậy GTLN của M là 1