ĐKXĐ: \(x\ne\left\{0;1\right\}\)
Rút gọn được \(P=x-\sqrt{x}+1\)
\(\Rightarrow Q=\dfrac{2\sqrt{x}}{x-\sqrt{x}+1}\)
Do \(\left\{{}\begin{matrix}2\sqrt{x}\ge0\\x-\sqrt{x}+1=\left(\sqrt{x}-\dfrac{1}{2}\right)^2+\dfrac{3}{4}>0\end{matrix}\right.\) \(\Rightarrow Q\ge0\)
\(Q=\dfrac{2\sqrt{x}}{x-\sqrt{x}+1}=\dfrac{2\left(x-\sqrt{x}+1\right)-2x+4\sqrt{x}-2}{x-\sqrt{x}+1}=2-\dfrac{2\left(\sqrt{x}-1\right)^2}{x-\sqrt{x}+1}\le2\)
\(\Rightarrow0\le Q\le2\)
Mà \(Q\in Z\Rightarrow Q=\left\{0;1;2\right\}\)
\(\Rightarrow\left[{}\begin{matrix}\dfrac{2\sqrt{x}}{x-\sqrt{x}+1}=0\\\dfrac{2\sqrt{x}}{x-\sqrt{x}+1}=1\\\dfrac{2\sqrt{x}}{x-\sqrt{x}+1}=2\end{matrix}\right.\) \(\Rightarrow\left[{}\begin{matrix}2\sqrt{x}=0\\x-3\sqrt{x}+1=0\\x-2\sqrt{x}+1=0\end{matrix}\right.\)
\(\Rightarrow\left[{}\begin{matrix}\sqrt{x}=0\\\sqrt{x}=\dfrac{3+\sqrt{5}}{2}\\\sqrt{x}=\dfrac{3-\sqrt{5}}{2}\\\sqrt{x}=1\end{matrix}\right.\) \(\Rightarrow x=\left\{0;\dfrac{7+3\sqrt{5}}{2};\dfrac{7-3\sqrt{5}}{2};1\right\}\)