Giả sử: $x^2+17=y^2;y\in\mathbb{Z}$.
Khi đó ta có:
$y^2-x^2=17$
$\Leftrightarrow (y-x)(y+x)=17$
$\Leftrightarrow \left[\begin{array}{l}\left\{ \begin{array}{l}y-x=1\\y+x=17\end{array} \right.\\\left\{ \begin{array}{l}y-x=-1\\y+x=-17 \end{array} \right.\\\left\{ \begin{array}{l}y-x=17\\y+x=1 \end{array} \right.\\\left\{ \begin{array}{l}y-x=-17\\y+x=-1\end{array} \right. \end{array} \right.$
$\Leftrightarrow \left[\begin{array}{l}\left\{ \begin{array}{l}x=8\\y=9\end{array} \right.\\\left\{ \begin{array}{l} x=-8\\ y=-9 \end{array} \right.\\\left\{ \begin{array}{l} x=-8\\ y=9 \end{array} \right.\\\left\{ \begin{array}{l} x=8\\ y=-9 \end{array} \right.\end{array} \right.$
Vậy $x\in\{8;-8\}$.