1. Pell Equations

And yes, before anyone says anything, I do know that they are wrongly attributed to Pell.

Anyway, I have a question about a particular form of them that is easier to solve. I've seen the solution, but there is one step that I don't really understand that I was hoping someone could explain to me.

Consider the following diophantine equation (with the usual constraints on alpha):

$a^2-\alpha b^2=1$

Let's say we have a particular solution, p and q, then want to find other solutions from this. You can raise one side to the $n^{th}$ and then factor to get:

$
(a+b\sqrt{\alpha})(a-b\sqrt{\alpha})=(p+q\sqrt{\alpha})^n(p-q\sqrt{\alpha})^n
$

So far so easy. Now comes the step I'm unclear about. You create the following two equalities:

$
a+b\sqrt{\alpha}=(p+q\sqrt{\alpha})^n
$

$
a-b\sqrt{\alpha}=(p-q\sqrt{\alpha})^n
$

From here it is easy to derive expressions for a and b in terms of p and q that are easy to work with, but I don't see why you can set these terms equal in this step in the first place. Is this just a matter of "let's try this and see if it works, and what do you know, we get some easy solutiosn, how lucky", in which case there may be other solutions being missed, or is there some logic to why this should be true and why you can set these terms equal like this, besides it looking nice and being "intuitive"?

Thanks.

2. Originally Posted by DMT
So far so easy. Now comes the step I'm unclear about. You create the following two equalities:

$
a+b\sqrt{\alpha}=(p+q\sqrt{\alpha})^n
$

$
a-b\sqrt{\alpha}=(p-q\sqrt{\alpha})^n
$

From here it is easy to derive expressions for a and b in terms of p and q that are easy to work with, but I don't see why you can set these terms equal in this step in the first place.

Think about what happens when you expand the powers on the RHS.

Every term will be of the form:

$A(\sqrt{\alpha})^k$,

where $A$ is an integer, and $k \in \{0,1,2,..,n\}$.

When $k$ is an even integer the term is an integer and when it is an odd
integer it is an integer times $\sqrt{\alpha}}$, so the RHSs can be writen in the form
$U+V\sqrt{\alpha}$ where $U$ and $V$ are integers. Also it is obvious that
the coefficients of $\sqrt{\alpha}$ have equal magnitudes but opposite signs
in the two equations.

RonL

3. Thanks, that makes perfect and obvious sense.