\(B=\sqrt{\dfrac{x+6}{x+1}}=\sqrt{\dfrac{x+1+5}{x+1}}=\sqrt{1+\dfrac{5}{x+1}}\) (Đk \(x>-1\) )
Để \(\dfrac{5}{x+1}\in Z\) khi \(\left(x+1\right)\inƯ\left(5\right)=\left\{-5;-1;1;5\right\}\)
\(\Leftrightarrow\left\{{}\begin{matrix}x+1=5\\x+1=1\end{matrix}\right.\Leftrightarrow\left\{{}\begin{matrix}x=4\\x=0\end{matrix}\right.\)
Để B nguyên khi \(\dfrac{5}{x+1}=n^2-1\) \(\left(n\in N\right)\)
Trường hợp x=0 \(\Leftrightarrow5=n^2-1\Leftrightarrow n^2=6\Leftrightarrow n=\pm\sqrt{6}\left(loại\right)\)
Trường hợp x=4 \(\Leftrightarrow1=n^2-1\Leftrightarrow n^2=2\Leftrightarrow n=\pm\sqrt{2}\left(loại\right)\)
vậy \(S=\varnothing\)