Integer solutions to $ x^2-y^2=33$

Suppose that $x=y+n$; then $x^2-y^2=y^2+2ny+n^2-y^2=2ny+n^2=n(2y+n)$. Thus, $n$ and $2y+n$ must be complementary factors of $33$: $1$ and $33$, or $3$ and $11$. The first pair gives you $2y+1=33$, so $y=16$ and $x=y+1=17$. The second gives you $2y+3=11$, so $y=4$ and $x=y+3=7$. As a check, $17^2-16^2=289-256=33=49-16=7^2-4^2$.

If you want negative integer solutions as well, you have also the pairs $-1$ and $-33$, and $-3$ and $-11$.


We have $x^2-y^2=33$ iff $(x-y)(x+y)=33$. So to solve our equation we find all ordered pairs $(u,v)$ such that $uv=33$. Then we set $x-y=u$ and $x+y=v$, and solve.

We get $x=\dfrac{v+u}{2}$ and $y=\dfrac{v-u}{2}$. Since $u$ and $v$ will be both odd, $u+v$ and $v-u$ will be even, so $x$ and $y$ will be integers.

The possibilities for $u$ are $-33,-11,-3,-1,1,3,11,33$. The corresponding possibilities for $v$ are $-1,-3,-11,-33,33,11,3,1$. There are $8$ solutions, but only two "really different" ones.

For example, let $u=3$ and $v=11$. Then $x=\dfrac{11+3}{2}=7$ and $y=\dfrac{11-3}{2}=4$.

Generalization: If $n$ is of the form $4k+2$, then $n$ is not the difference of two squares. If $n$ is odd, the representations of $n$ as a difference of two squares are found exactly like the $n=33$ case discussed above. If $n$ is of the form $4k$, we do much the same thing, but find all pairs $(u,v)$ such that $uv=n$ and $u$ and $v$ are even.


Hint $\ $ Like sums of squares, there is also a composition law for differences of squares, so

$\rm\quad \begin{eqnarray} 3\, &=&\, \color{#0A0}2^2-\color{#C00}1^2\\ 11\, &=&\, \color{blue}6^2-5^2\end{eqnarray}$ $\,\ \Rightarrow\,\ $ $\begin{eqnarray} 3\cdot 11\, &=&\, (\color{#0A0}2\cdot\color{blue}6+\color{#C00}1\cdot 5)^2-(\color{#0A0}2\cdot 5+\color{#C00}1\cdot\color{blue}6)^2\, =\, 17^2 - 16^2\\ &=&\, (\color{#0A0}2\cdot\color{blue}6-\color{#C00}1\cdot 5)^2-(\color{#0A0}2\cdot 5-\color{#C00}1\cdot\color{blue}6)^2\, =\, \ 7^2\ -\ 4^2 \end{eqnarray}$