Ta có: \(P=\dfrac{4\sqrt{x}+3}{x+\sqrt{x}}+\dfrac{\sqrt{x}}{\sqrt{x}+1}\)
\(=\dfrac{4\sqrt{x}+3}{\sqrt{x}\left(\sqrt{x}+1\right)}+\dfrac{x}{\sqrt{x}\left(\sqrt{x}+1\right)}\)
\(=\dfrac{x+4\sqrt{x}+3}{\sqrt{x}\left(\sqrt{x}+1\right)}\)
\(=\dfrac{\left(\sqrt{x}+1\right)\left(\sqrt{x}+3\right)}{\sqrt{x}\left(\sqrt{x}+1\right)}\)
\(=\dfrac{\sqrt{x}+3}{\sqrt{x}}\)
Để P nguyên thì \(\sqrt{x}+3⋮\sqrt{x}\)
mà \(\sqrt{x}⋮\sqrt{x}\)
nên \(3⋮\sqrt{x}\)
\(\Leftrightarrow\sqrt{x}\inƯ\left(3\right)\)
\(\Leftrightarrow\sqrt{x}\in\left\{1;-1;3;-3\right\}\)
mà \(\sqrt{x}>0\forall x\) thỏa mãn ĐKXĐ
nên \(\sqrt{x}\in\left\{1;3\right\}\)
\(\Leftrightarrow x\in\left\{1;9\right\}\)
Kết hợp ĐKXĐ, ta được: \(x\in\left\{1;9\right\}\)
Vậy: Để P nguyên thì \(x\in\left\{1;9\right\}\)