\(a,đkxđ:x\ge0\)
\(\Leftrightarrow\) \(P=\frac{\left(\sqrt{x}-2\right)\left(x+2\sqrt{x}+4\right)}{x+2\sqrt{x}+4}+3\left(1-\sqrt{x}\right)\Leftrightarrow P=\sqrt{x}-2+3-3\sqrt{x}=1-2\sqrt{x}\)
b, \(Q=\frac{2\left(1-2\sqrt{x}\right)}{1-1+2\sqrt{x}}=\frac{1-2\sqrt{x}}{\sqrt{x}}\)
Để Q nhận giá trị nguyên thì \(\left(1-2\sqrt{x}\right)⋮\sqrt{x}\)
Ta có : \(\frac{1-2\sqrt{x}}{\sqrt{x}}=-2+\frac{1}{\sqrt{x}}\)\(\Rightarrow\sqrt{x}\inƯ\left(1\right)=\left\{\pm1\right\}\)
Do \(\sqrt{x}\ge0\Rightarrow\sqrt{x}=1\Rightarrow x=1\)