## Quadratic Diophantine Equations With xy Terms

We can solve Diophantine equations with mixed
$x-y$
terms by completing the square and transforming variables.
Example: Solve
$x^2+2xy-2y^2=1$
.
Completing the square gives
$(x+y)^2-3y^2=1$
. Let
$z=x+y$
then
$z^2-3y^2=1$
.
Convergents of the continued fraction representing
$\sqrt{3}= [ 1, \lt 1,2 \gt ]$
are
$\frac{1}{1}$

$1+ \frac{1}{1}=2$

$1+\frac{1}{1+ \frac{1}{2}}=\frac{5}{3}$

$1+\frac{1}{1+ \frac{1}{2+\frac{1}{1}}}=\frac{7}{4}$

$1+\frac{1}{1+ \frac{1}{2+\frac{1}{1+\frac{1}{2}}}}=\frac{19}{11}$

$1+\frac{1}{1+ \frac{1}{2+\frac{1}{1+\frac{1}{2+\frac{1}{1}}}}}=\frac{26}{15}$

Solutions are given by then convergent for the penultimate element of the cycle part of the continued fraction - 1. These are the convergents
$\frac{2}{1}, \; \frac{7}{4}, \; \frac{26}{15}$
.
$\frac{2}{1} z=x+y=2, \; y=1 \rightarrow x=1, \; y=1$

$\frac{7}{4} z=x+y=7, \; y=4 \rightarrow x=3, \; y=4$

$\frac{26}{15} z=x+y=26, \; y=15 \rightarrow x=11, \; y=15$