# Integral solution of two variable equation

Need to solve below question:

Find all solutions in integers $x$ and $y$ of the equation->> $xy + 5x -8y = 79$

Any hint is welcome.

It's $$xy+5x-8y-40=39$$ or $$(y+5)(x-8)=39,$$ and solve a number of systems: $$x-8=-39$$ and $$y+5=-1...$$
For $$x-8\in\{-39,-13,-3,-1,1,3,13,39\}$$ you'll get all integer solutions.
• @jiten Yes, of course! $x-8\in\{-39,-13,-3,-1,1,3,13,39\}$ and you'll get all integer solutions. – Michael Rozenberg Oct 25 '17 at 18:22
• @jiten proceeding this way is available: $$(y+5)(x-8)=39=d_1 \cdot d_2$$, $$\implies$$ $$\begin{cases}x=8+d_1 \\ y=-5+d_2\end{cases}$$ such that $$(d_1,d_2) \in \{(1,39),(39,1), (3,13),(13,3),(-1,-39), (-39,-1),(-3,-13),(-13,-3)\}$$So there should be 8 solutions total. It's worth noting that this situation lacks symmetry, so switching $d_1$ and $d_2$ will give different solutions, besides that, I don't know if all this adds any worthwhile clarity or not but just a small suggestion. – MaximusFastidiousIrreverence Oct 26 '17 at 14:50
• @jiten I wanted to express that the expressions arrived at will give different solutions for $x$ and $y$ if you were to switch the values of $d_1$ and $d_2$. Suppose instead we had that $$x=8 + d_1 + d_2$$. Then since we have the symmetric expression $d_1 + d_2$, switching the values won't change the result – MaximusFastidiousIrreverence Oct 31 '17 at 17:07