ĐKXĐ: \(\left\{{}\begin{matrix}x>0\\x\ne1\end{matrix}\right.\)
Ta có: \(G=\left(\frac{\sqrt{x}-2}{x-1}-\frac{2+\sqrt{x}}{1+x+2\sqrt{x}}\right)\cdot\frac{\sqrt{x}+1}{\sqrt{x}}\)
\(=\left(\frac{\left(\sqrt{x}-2\right)\left(\sqrt{x}+1\right)}{\left(\sqrt{x}+1\right)^2\cdot\left(\sqrt{x}-1\right)}-\frac{\left(\sqrt{x}+2\right)\left(\sqrt{x}-1\right)}{\left(\sqrt{x}+1\right)^2\cdot\left(\sqrt{x}-1\right)}\right)\cdot\frac{\sqrt{x}+1}{\sqrt{x}}\)
\(=\frac{x-\sqrt{x}-2-\left(x+\sqrt{x}-2\right)}{\left(\sqrt{x}+1\right)^2\cdot\left(\sqrt{x}-1\right)}\cdot\frac{\sqrt{x}+1}{\sqrt{x}}\)
\(=\frac{x-\sqrt{x}-2-x-\sqrt{x}+2}{\sqrt{x}\left(\sqrt{x}+1\right)\left(\sqrt{x}-1\right)}\)
\(=\frac{-2\sqrt{x}}{\sqrt{x}\left(x-1\right)}\)
\(=\frac{-2}{x-1}=\frac{2}{1-x}\)
Để G nguyên thì \(2⋮1-x\)
\(\Leftrightarrow1-x\inƯ\left(2\right)\)
\(\Leftrightarrow1-x\in\left\{1;-1;2;-2\right\}\)
\(\Leftrightarrow-x\in\left\{0;-2;1;-3\right\}\)
\(\Leftrightarrow x\in\left\{0;2;-1;3\right\}\)
mà \(\left\{{}\begin{matrix}x>0\\x\ne1\end{matrix}\right.\)
nên \(x\in\left\{2;3\right\}\)
Vậy: để G nguyên thì \(x\in\left\{2;3\right\}\)