Unique Integer solution of a non-linear equation

578 Views Asked by At

How to find the integer solution of the equation

$$\frac{m^2 + 2mn + n^2 -3m -n+2}{2}=2$$

I know that there is a unique solution

3

There are 3 best solutions below

0
On BEST ANSWER

In fact there are infinitely many integer solutions, though only one in positive integers.

Write $s=m+n,d=m-n$ then your problem can be rewritten as $$ d=(s-1)^2-3 $$ We can choose any value for $s$ and get a solution, e.g. $$ (m,n) = (-1,1),(-1,2),(0,2),(2,1),(5,-1),(9,-4),\ldots $$ If we want to constrain $m>0,n>0$ then that gives us the constraints $$ s>0, \quad d\le s-2, \quad d\ge 2-s $$ which leaves only one solution.

4
On

By inspection, $m=2$, $n=1$.

Remark: For more information, look for the Cantor Pairing Function. There are explicit expressions for the two "unpairing" functions that recover the first and second coordinates from the result when the pairing function has been applied to $(m,n)$.

0
On

equation:

$\frac{m^2+2mn+n^2-3m-n+2}{2}=2$

Has the solutions:

$n=2-\frac{k(k\mp1)}{2}$

$m=\frac{k(k\pm1)}{2}-1$

$k$ - any integer.