# Thread: Infinitely many solutions to: x^2-dy^2=+/-1

1. ## Infinitely many solutions to: x^2-dy^2=+/-1

I need help understanding the following theorem.

Theorem. Suppose d is a positive integer. If there is one solution to the Fermt-Pell equation (1): $x^{2}-dy^{2}=1;\ x, y>0$, then there are infinitely many solutions. If there is one solution to the Fermat-Pell equation (2): $x^{2}-dy^{2}=-1;\ x, y>0$, then there are infinitely many solutions to both (1) and (2).

Proof.
Suppose there are integers a and b,
$a^{2}-db{2}=c; \ a,b>0$,
where c will shortly be chosen to be $\pm1$. Suppose further that for some $n\ge 1$ there are integers $x_{n}$ and $y_{n}$ such that
$x_{n}^{2}-dy_{n}^{2}=c^{n};\ x_{n},y_{n}>0$.
When n = 1 this is possible with $x_{1}=a$ and $y_{1} = b$. Set
[This is where I'm confused, how do they get these equations? I'm lost from here on.]
$x_{n+1}=ax_{n}+dby_{n}$,

$y_{n+1}=ay_{n}+bx_{n}$.
These values are legal since
$x_{n+1}^{2}-dy_{n+1}^{2}={\left( a^{2}x_{n}^{2}+2dabx_{n}y_{n}+d^{2}b^{2}y_{n}^{2}\ right) - d\left ( a^{2}y_{n}^{2}+2abx_{n}y_{n}+b^{2}x_{n}^{2}\right) }$

$={a^{2}x_{n}^{2}+d^{2}b^{2}y_{n}^{2}-da^{2}y_{n}^{2}-db^{2}x_{n}^{2}}$

$={\left( a^2-db^2\right)\left(x_{n}^{2}-dy_{n}^{2}\right)}$

$={c\cdot c^{n}}={c^{n+1}}$
and
$x_{n+1}={ax_{n}+dby_{n}>1\cdot x_{n}+d\cdot 0\cdot y_{n}}={x_{n}\left(>0\right)}$,

$y_{n+1}={ay_{n}+bx_{n}>1\cdot y_{n}+0\cdot x_{n}}={y_{n}\left(>0\right)}$.
[...] The rest of the proof follows, but I think I posted the relavent parts.

Thanks.

2. If $x_0,y_0>0$ solve $x^2 - dy^2 = 1$ and $x_1,y_1>0$ is a solution then $(x_0x_1 + dy_0y_1)^2 - d(x_0y_1+x_1y_0)^2=1$. Thus, $x_0x_1+dy_0y_1$ and $x_0y_1+x_1y_0$ is a solution. We can use this to generate infinitely many solutions.

3. Ah, I get it now, thank you very much!