Để P nguyên thì \(2\sqrt{x}-1⋮\sqrt{x}+1\)
\(\Leftrightarrow-3⋮\sqrt{x}+1\)
\(\Leftrightarrow\sqrt{x}+1\in\left\{1;-1;3;-3\right\}\)
\(\Leftrightarrow\sqrt{x}+1\in\left\{1;3\right\}\)
\(\Leftrightarrow\sqrt{x}\in\left\{0;2\right\}\)
hay \(x\in\left\{0;4\right\}\)