Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'd love your help with finding all the integer solutions to the following equation:

$x^2 - 2y^2 =2 $. I want to use Pell's theorem so I changed the equation to $-\frac{1}{2}x^2+ y^2 =-1$, Can I use Pell's Theorem now? I got a private solution for $-\frac{1}{2}x^2+ y^2 =1$ $y=3, x=4$, so form Pell I get that $\alpha= (4+3\sqrt{2})^n$ for every integer $n$, and a private solution for $-\frac{1}{2}x^2+ y^2 =-1$ is $y=1, x=2$, so the total solution is $\alpha= (1+\sqrt{2}) \cdot (+/- (4+3\sqrt{2})^n)$. Are all these steps correct? and if not- how should I solve this one?

Thank you!

share|cite|improve this question
A private solution? Do you mean, a particular solution? – Gerry Myerson Jun 24 '12 at 7:39
Have you checked to see whether the answers you got actually work? – Gerry Myerson Jun 24 '12 at 7:40
i think x^2-2y^2 is equal to one have infinite solution – user71970 Apr 10 '13 at 20:50
up vote 4 down vote accepted

The standard way is to find one solution to $x^2-2y^2=2$, e.g., $x=2$, $y=1$, and find the fundamental solution to $x^2-2y^2=1$, which is $x=3$, $y=2$, and then go $(2+\sqrt2)(3+2\sqrt2)^n$, etc., etc.

share|cite|improve this answer
Thank you. what would the answer would be if the original equation was $x^2-2y^2=-2$ should I do the same and find fundamental for $x^2-2y^2=-1$ which is $(1+\sqrt{2})(3+2 \sqrt{2})^n$ and multiply it with a praticular solution for $x^2-2y^2=-2$? – Jozef Jun 24 '12 at 8:09
That would also give you solutions for $x^2-2y^2=2$. To solve $x^2-2y^2=-2$, you need a particular solution of $x^2-2y^2=-2$ with a solution of $x^2-2y^2=1$, or a particular solution of $x^2-2y^2=2$ with a solution of $x^2-2y^2=-1$. Think about how these solutions work, about the norms you get! – Gerry Myerson Jun 24 '12 at 9:18

Pell's Theorem is only valid for integer coefficients - so no.

share|cite|improve this answer

Another way is to note that $x$ has to be even. Hence if $x=2x_1$, we get that $$2x_1^2-y^2 = 1 \implies y^2 - 2x_1^2 = -1 \implies \left(y + \sqrt2 x_1\right)\left(y - \sqrt2 x_1\right) = -1$$ Now clearly, one solution is $(x_1,y) = (1,1)$. Raise both sides to any odd power, i.e., $$\left(y + \sqrt2 x_1\right)^{2n-1}\left(y - \sqrt2 x_1\right)^{2n-1} = (-1)^{2n-1} = -1$$ and note that $$\left(y + \sqrt2 x_1\right)^{2n-1} = Y_n(y,x_1) + \sqrt2 X_n(y,x_1)$$ $$\left(y - \sqrt2 x_1\right)^{2n-1} = Y_n(y,x_1) - \sqrt2 X_n(y,x_1)$$ which in turn gives us infinite other solutions since $$Y_n^2 -2 X_n^2 = -1$$

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.