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t{x}-1}\in\mathbb{Z}\Leftrightarrow \frac{2}{\sqrt{x}-1}\in\mathbb{Z}\)
\(\Leftrightarrow 2\vdots \sqrt{x}-1\Rightarrow \sqrt{x}-1\in\left\{\pm 1; \pm 2\right\}\)
\(\Rightarrow \sqrt{x}\in\left\{0; 2; 3\right\}\)
\(\Rightarrow x\in\left\{0; 4;9\right\}\)
Vì $x\neq 0$ nên \(x\in \left\{4; 9\right\}\)
c)
\(P=\sqrt{x}\Leftrightarrow \frac{\sqrt{x}+1}{\sqrt{x}-1}=\sqrt{x}\)
\(\Rightarrow \sqrt{x}+1=x-\sqrt{x}\Leftrightarrow x-2\sqrt{x}-1=0\)
\(\Rightarrow x=3+2\sqrt{2}\)