Lời giải:
$x-1\vdots x^2+1(1)$
$\Rightarrow x(x-1)\vdots x^2+1$
$\Leftrightarrow x^2+1-(x+1)\vdots x^2+1$
$\Leftrightarrow x+1\vdots x^2+1(2)$
Lấy $(2)-(1)$ suy ra $2\vdots x^2+1$
$\Rightarrow x^2+1\in\left\{1,2\right\}$ (do $x^2+1>0$)
$\Rightarrow x^2\in\left\{0;1\right\}\Rightarrow x\in\left\{0;\pm 1\right\}$