# Solve this non-linear diophantine equation?

How do you go about systematically solving a Diophantine equation of this form :

$217x^2 + 496y^2 = 15872$ ?

I found that $\gcd(217, 496) = 31$ and reduced that equation to

$7x^2 + 16y^2 = 512$

but then I got stuck there. I want to solve this using the modular arithmetic method, so a solution that takes such an approach will be highly appreciated.

Since $512=7\times 73+1$, we have$$2y^2\equiv 1\pmod 7\Rightarrow y\equiv 2,5\pmod 7.$$

Also, we have $$512-16y^2=7x^2\ge0\Rightarrow y^2\le 32\Rightarrow |y|\le 5.$$

These imply that $y=\pm2,\pm 5.$ Hence, the answer is the followings (any double sign) : $$(x,y)=(\pm8,\pm2),(\pm4,\pm 5).$$

• I follow your response effortlessly. I appreciate this. Oct 4, 2014 at 10:52
• @2good4this: You are welcome. Oct 4, 2014 at 10:54

Since $7x^2=512-16y^2$ RHS is divisible by $16$ so is the LHS so we have that $x=4k$ for some $k\in\mathbb{N}$. $$16(7k^2+y^2)=512\\7k^2+y^2=32$$ Now clearly $k\leq2$ so plugging in $k=2$ gives $y^2=4$,plugging in $k=1$ we have that $y^2=25$ and plugging in $k=0$ doesn't give a rational solution $x=4k$ so $(x,y)=(\pm4,\pm5),(\pm8,\pm2)$

• If we take one pair (x,y) from the set of solutions you have found, such as (x,y) = (16,5), and plug this into the LHS of the original equation, that is $7(16^2)$ + $16(5^2)$, we obtain 2192 which is not equal to 512. Having found y = ±5, ±2, couldn't we then use the original equation to compute the corresponding values of x? That would give x = ±4, ±8. Oct 4, 2014 at 10:41
• @2good4this You're right my mistake Oct 4, 2014 at 11:20
• No problem, thank you for the response. Oct 4, 2014 at 11:23