Diophantine equations are equations that are solved in integer numbers. We can solve some diophantine equations by considering the equation as quadratic and using the quadratic formula.
If the equation is given as
$$ ax^2+bx+c$$
then the Quadratic Formula states that its solutions can be found as
$$ x = \frac{-b\pm \sqrt{b^2-4ac}}{2a} $$
Problem (Moscow City, 1941)
Solve the equation in integer numbers
$$ x+y = x^2 – xy + y^2 $$
Solution
Answer: $(x,y) \in \{ (0,0),(1,1),(1,2),(2,2)\}$.
Let us rewrite the equation as
$$ x^2 – xy – x + y^2 – y = 0 $$
$$ x^2 – x(y+1) + y^2 – y = 0 $$
and consider it as quadratic in terms of $x$. Then using the quadratic formula we have
$$ x = \frac{(y+1) \pm \sqrt{(y+1)^2-4(y^2-y)}}{2} = \frac{(y+1) \pm \sqrt{-3y^2+6y+1)}}{2} $$
Check out our courses!
Learn moreTherefore $x$ is a real number if $-3y^2+6y+1 \geq 0$. The only integers that satisfy this inequality are $y=0,1,2$. Substituting the values of $y$ we obtain the following values of $x$:
Case 1 : if $y=0$, then $x=0$
Case 2 : if $y=1$, then $x=1$
Case 3 : if $y=2$, then $x=1,2$