\(B=\frac{\sqrt{x}-2+4}{\sqrt{x}-2}=1+\frac{4}{\sqrt{x}-2}\)
Để \(B\in Z\) thì \(\frac{4}{\sqrt{x}-2}=n\in Z\)
\(\Leftrightarrow\sqrt{x}=\frac{2n+4}{n}\ge0\) (1)
Giải (1) ta được \(\left[{}\begin{matrix}n>0\\n\le-2\end{matrix}\right.\)
Vậy \(x=\frac{\left(2n+4\right)^2}{n^2}\) với \(n\in Z,n\ne\left\{0;-1\right\}\)
\(B=\frac{\sqrt{x}+2}{\sqrt{x}-2}=\frac{\sqrt{x}-2+4}{\sqrt{x}-2}=1+\frac{4}{\sqrt{x}-2}\)
Để \(B\in Z\Rightarrow\frac{4}{\sqrt{x}-2}\in Z\Rightarrow\sqrt{x}-2\inƯ\left(4\right)\)
\(\Rightarrow x\left\{0;1;9;16;36\right\}\)