Solve single equation with 2 unknowns?

118 Views Asked by At

I don't know how to solve this equation, really tried to Google it but Google foo is weak.

$$ \ m^{2} - n^{2} = 1 \\ (m-n)(m+n) = 1 \\ m-n = 1 \quad \& \quad m+n = 1 \\ ? $$

This is about as far as I can get. A reference to how to solve these problems would be great. Is this linear algebra or just basic algebra?

1

There are 1 best solutions below

0
On BEST ANSWER

Your third line is not quite correct. If you're looking for integer solutions, then $m-n$ and $m+n$ will both be integers, and if a product of two integers is $1$, then the two factors must either both be $1$ or both be $\textit{-1}$ (since those are the only integers with integer inverses).

Other than that, you were almost there. Let's suppose in the first case that $m-n=m+n=1$. Then $m=1+n$ and from the second equation, $2n+1=1$, so $n=0$ and $m=1$. You can plug this back into the original equation to check that it is indeed a solution.

The case $m-n=m+n=-1$ is similar.

Your problem is similar to Pell's equation, which covers equations of the form $x^2-ay^2=1$, but in the case of Pell's equation $a$ is assumed to be non-square, otherwise the problem is quite easy as you've just seen.