Ta có:
\(B=\frac{\sqrt{x}+1}{\sqrt{x}-3}=\frac{\sqrt{x}-3+4}{\sqrt{x}-3}=1+\frac{4}{\sqrt{x}-3}\)
Để B nguyên thì:
\(\frac{4}{\sqrt{x}-3}\) nguyên.
\(\Leftrightarrow4⋮\sqrt{x}-3\)
\(\Rightarrow\sqrt{x}-3\inƯC\left(4\right).\)
\(\Rightarrow\sqrt{x}-3\in\left\{\pm1;\pm2;\pm4\right\}\)
Vì \(\sqrt{x}\ge0\) \(\forall x\)
\(\Rightarrow\sqrt{x}-3\ge-3\)
\(\Rightarrow\sqrt{x}-3\in\left\{1;-1;2;-2;4\right\}.\)
\(\Rightarrow\sqrt{x}\in\left\{4;2;5;1;7\right\}\)
\(\Rightarrow x\in\left\{2;\sqrt{2};\sqrt{5};\sqrt{1};\sqrt{7}\right\}.\)
Mà \(x\in Z.\)
\(\Rightarrow x=2\)
Vậy \(x=2\) thì \(B=\frac{\sqrt{x}+1}{\sqrt{x}-3}\) có giá trị nguyên.
Chúc bạn học tốt!