ĐKXĐ: x\(\ge0,x\ne1\)
a) \(P=\frac{3x+\sqrt{9x}-3}{x+\sqrt{x}-2}-\frac{\sqrt{x}+1}{\sqrt{x}+2}+\frac{\sqrt{x}-2}{1-\sqrt{x}}=\frac{3x+3\sqrt{x}-3}{x+\sqrt{x}-2}-\frac{\sqrt{x}+1}{\sqrt{x}+2}-\frac{\sqrt{x}-2}{\sqrt{x}-1}=\frac{3x+3\sqrt{x}-3}{\left(\sqrt{x}+2\right)\left(\sqrt{x}-1\right)}-\frac{\left(\sqrt{x}+1\right)\left(\sqrt{x}-1\right)}{\left(\sqrt{x}+2\right)\left(\sqrt{x}-1\right)}-\frac{\left(\sqrt{x}+2\right)\left(\sqrt{x}-2\right)}{\left(\sqrt{x}+2\right)\left(\sqrt{x}-1\right)}=\frac{3x+3\sqrt{x}-3-x+1-x+4}{\left(\sqrt{x}+2\right)\left(\sqrt{x}-1\right)}=\frac{x+3\sqrt{x}+2}{\left(\sqrt{x}+2\right)\left(\sqrt{x}-1\right)}=\frac{\left(\sqrt{x}+2\right)\left(\sqrt{x}+1\right)}{\left(\sqrt{x}+2\right)\left(\sqrt{x}-1\right)}=\frac{\sqrt{x}+1}{\sqrt{x}-1}\)
b) Ta có \(P=\frac{\sqrt{x}+1}{\sqrt{x}-1}=\frac{\sqrt{x}-1+2}{\sqrt{x}-1}=1+\frac{2}{\sqrt{x}-1}\)
Vậy để P có giá trị nguyên thì \(\sqrt{x}-1\inƯ\left(2\right)\in\left\{\pm1,\pm2\right\}\)
Vì \(\sqrt{x}-1\ge-1\)
Nên \(\left[{}\begin{matrix}\sqrt{x}-1=1\\\sqrt{x}-1=2\\\sqrt{x}-1=-1\end{matrix}\right.\)\(\Leftrightarrow\)\(\left[{}\begin{matrix}x=4\\x=9\\x=0\end{matrix}\right.\)
Vậy x=0,x=4,x=9 thì P có giá trị nguyên