22. How many pairs of integers $(x, y)$ satisfy the equation $\sqrt{x-\sqrt{x+23}}=2 \sqrt{2}-y$ ?
A 0
B 1
C 4
D 8
E infinitely many
Solution
Suppose that $(x, y)$ is a pair of integers that satisfies the equation given in the question. That is, suppose that $x$ and $y$ are integers such that
$$
\sqrt{x-\sqrt{x+23}}=2 \sqrt{2}-y .
$$

Squaring both sides of equation (1), we obtain
$$
x-\sqrt{x+23}=8-4 \sqrt{2} y+y^{2} .
$$

We can rewrite equation (2) as
$$
\sqrt{x+23}=4 \sqrt{2} y-\left(8+y^{2}-x\right) .
$$

Since $x$ and $y$ are integers, $8+y^{2}-x$ is an integer. For convenience we put $z=8+y^{2}-x$. Then equation (3) becomes
$$
\sqrt{x+23}=4 \sqrt{2} y-z \text {. }
$$

By squaring both sides of equation (4), we obtain
$$
x+23=32 y^{2}-8 \sqrt{2} y z+z^{2} .
$$

Equation (5) may be rearranged to give
$$
8 \sqrt{2} y z=32 y^{2}+z^{2}-x-23 .
$$

Now, if $y z \neq 0$, equation (6) implies that
$$
\sqrt{2}=\frac{32 y^{2}+z^{2}-x-23}{8 y z} .
$$

Because $x, y$ and $z$ are integers, equation (7) implies that $\sqrt{2}$ is rational. Since $\sqrt{2}$ is irrational (see Problem 22.1), we deduce that $y z=0$. It follows that $y=0$ or $z=0$.
Suppose first that $y=0$. It then follows from equation (2) that
$$
x-\sqrt{x+23}=8 .
$$

We leave it as an exercise for the reader to show that equation (8) does not have an integer solution (see Problem 22.2).

Now suppose that $z=0$. Then
$$
8+y^{2}-x=0 .
$$

It now follows from equations (3) and (9) that
$$
\sqrt{x+23}=4 \sqrt{2} y \text {. }
$$

Squaring both sides of equation (10), we obtain $x+23=32 y^{2}$ and hence
$$
x=32 y^{2}-23 \text {. }
$$

We now use equation (11) to substitute $32 y^{2}-23$ for $x$ in equation (9). In this way we obtain
$$
8+y^{2}-\left(32 y^{2}-23\right)=0 .
$$

Equation (12) may be rearranged to give
$$
31\left(1-y^{2}\right)=0 \text {. }
$$

Hence, $1-y^{2}=0$. Therefore, $y=-1$ or $y=1$. In either case, it follows from the equation (11) that $x=9$.

It seems that we have found two pairs of integers $(9,-1)$ and $(9,1)$ that satisfy equation (1). However, we obtained these solutions by squaring both sides of equations (1), (4) and (10).
Squaring both sides of an equation is an operation that runs the risk of introducing spurious solutions. Therefore we need to check whether or not $(9,-1)$ and $(9,1)$ are solutions of the original equation.

We leave it to the reader (see Problem 22.3) to check that $(9,1)$ is a solution of equation (1), but $(9,-1)$ is not a solution.
It follows that there is just one pair of integers $(x, y)$, namely $(9,1)$, that satisfies the equation $\sqrt{x-\sqrt{x+23}}=2 \sqrt{2}-y$.

For INVESTIGATION
22.1 The solution above uses the fact that $\sqrt{2}$ is not a rational number. This means that there do not exist integers $p$ and $q$ such that
$$
\sqrt{2}=\frac{p}{q} .
$$

Find a proof of this fact. That is, find a proof in a book or on the internet, or ask your teacher.
22.2 Show that the equation
$$
x-\sqrt{x+23}=8
$$
does not have an integer solution.
[Hint: rewrite this equation as $x-8=\sqrt{x+23}$. Square both sides of this equation. Then consider the solutions of the quadratic equation that you obtain.]
22.3 Show that $x=9, y=1$ is a solution of the equation $\sqrt{x-\sqrt{x+23}}=2 \sqrt{2}-y$, but $x=9, y=-1$ is not a solution.