# Pell's equation

• Apr 24th 2010, 08:07 PM
davismj
Pell's equation
I have an equation of the form

$\displaystyle 2(2x-1)^2 -(2n-1)^2 = 1$

I know that this is a pell's equation, but I don't know what to do with it, since its not in the form.

$\displaystyle x^2 - dn^2 = 1$

• Apr 24th 2010, 09:03 PM
mr fantastic
Quote:

Originally Posted by davismj
I have an equation of the form

$\displaystyle 2(2x-1)^2 -(2n-1)^2 = 1$

I know that this is a pell's equation, but I don't know what to do with it, since its not in the form.

$\displaystyle x^2 - dn^2 = 1$

You have $\displaystyle u^2 - D v^2 = 1$ where $\displaystyle u = \sqrt{2} (2x - 1)$, $\displaystyle v = (2n-1)$ and $\displaystyle D = 1$.
• Apr 24th 2010, 09:21 PM
davismj
Quote:

Originally Posted by mr fantastic
You have $\displaystyle u^2 - D v^2 = 1$ where $\displaystyle u = \sqrt{2} (2x - 1)$, $\displaystyle v = (2n-1)$ and $\displaystyle D = 1$.

Thanks for the response.

Hmm. Still confused cause if I apply the algorithm, I get:

$\displaystyle (\sqrt{2}-1)^2 = 3 - 2\sqrt{2}$

which implies $\displaystyle u = -2\sqrt{2}$. But that is not a solution since u is positive. What am I doing wrong?
• Apr 24th 2010, 11:02 PM
chiph588@
Quote:

Originally Posted by davismj
I have an equation of the form

$\displaystyle 2(2x-1)^2 -(2n-1)^2 = 1$

I know that this is a pell's equation, but I don't know what to do with it, since its not in the form.

$\displaystyle x^2 - dn^2 = 1$

Let $\displaystyle a=2n-1$ and $\displaystyle b=2x-1$. We then have $\displaystyle a^2-2b^2=-1$

Thus $\displaystyle (a^2-2b^2)^2=(-1)^2=1 \implies (a^2-2b^2)^2-2(2ab)^2=1$.

But $\displaystyle 2b^2=a^2+1$, so we get $\displaystyle (2a^2+1)^2-2(2ab)^2=1$.

Summarizing, we see our original equation was transformed into Pell's equation.
• Apr 24th 2010, 11:05 PM
chiph588@
Quote:

Originally Posted by mr fantastic
You have $\displaystyle u^2 - D v^2 = 1$ where $\displaystyle u = \sqrt{2} (2x - 1)$, $\displaystyle v = (2n-1)$ and $\displaystyle D = 1$.

The $\displaystyle \sqrt2$ kind of scares me. Aren't we dealing with integers here?
• Apr 25th 2010, 05:06 PM
davismj
Quote:

Originally Posted by chiph588@
Let $\displaystyle a=2n-1$ and $\displaystyle b=2x-1$. We then have $\displaystyle a^2-2b^2=-1$

Thus $\displaystyle (a^2-2b^2)^2=(-1)^2=1 \implies (a^2-2b^2)^2-2(2ab)^2=1$.

I don't think I agree with this. This seems to be true iff 2(2ab)^2 = 0, yes?
• Apr 25th 2010, 05:10 PM
chiph588@
Quote:

Originally Posted by davismj
I don't think I agree with this. This seems to be true iff 2(2ab)^2 = 0, yes?

$\displaystyle (a^2-2b^2)^2=(-1)^2=1 \implies (a^2+2b^2)^2-2(2ab)^2=1$
$\displaystyle (a^2-2b^2)^2=(-1)^2=1 \implies (a^2+2b^2)^2-2(2ab)^2=1$