# Find all positive integer roots of : $5xy=19x+96y$

Find all positive integer roots of : $5xy=19x+96y$

I tried using decomposition technique but no success...,it seems suitable factorization of this equation is IMPOSSIBLE!!
Handy calculations show that it has as many as 6 answers.

• After rewriting it as $\dfrac{19}{y}+\dfrac{96}{x}=5$, observe that one of the fractions must be at least 5/2. If it is the first, then you have $y \leq 38/5$. Similarly in the other case, $x$ is bounded. – Aravind Jun 16 '16 at 14:15

As you suggested, let us try to factor this somehow. We have the following equivalent conditions: \begin{align*} 5xy-19x-96y&=0\\ 25xy-5\cdot19x-5\cdot96y&=0\\ (5x-96)(5y-19)&=19\cdot96 \end{align*} There is only finitely many possibilities how to write $96\cdot19=2^5\cdot3\cdot19$ as a product of integers.

Moreover, we only have to check the possibilities where one of the factors is congruent to $1$ and the other one congruent to $4$ modulo $5$. (Because we want these factors to be equal to $5x-96 \equiv 4 \pmod5$ and $5y-19\equiv1\pmod5$.)

By going through all possibilities (all divisors of this number) we should be able to find all possibilities for $x$ and $y$. (So we have to check $24$ divisors, but many of them will not fulfill the conditions modulo $5$.)

• Bravo: clever decomposition! How could you guess it's required to multiply equation by 5 to be decomposable? – Hamid Reza Ebrahimi Jun 16 '16 at 14:49
• In fact, what I tried did was $xy-\frac{19}5x-\frac{96}5y=0$ and then tried $(x-\frac{96}5)(y-\frac{19}5)$. But when I looked at what I had, this seemed more elegant. (From the form I had it was not difficult to see that I have to multiply it by something if I want to get rid of denominators and have only integer factors.) – Martin Sleziak Jun 16 '16 at 15:05
• Thank you so much for your detailed explanation,now I know a general technique for solving such equations! – Hamid Reza Ebrahimi Jun 16 '16 at 15:30
• @HamidRezaEbrahimi I explain the method more generally in my answer. You can fin much further discussion in the linked answers. – Bill Dubuque Jul 22 '16 at 16:10

We have $19x=(5x-96)y$, so $y=0\bmod19$ or $x=4\bmod19$.

If $y=19n$, then we have $\frac{96}{x}=5-\frac{1}{n}$. So $x\le24$, and $x(5n-1)=96n\ (*)$. Checking $n=1,2,3,4,5$ we find that $n=1$ works giving solution $(24,19)$. $n=2,3,4$ do not work. $n=5$ gives the solution $(20,95)$. If $n>5$ then since $5n-1,n$ are coprime we must have $5n-1|96$ and hence $5n-1=48,96$, neither of which work.

If $x=4\bmod19$, then $(5n-4)y=19n+4$. If $n=1$ we have $y=23$, giving the solution $(23,23)$. If $n\ge2$, then we have $5=\frac{96}{x}+\frac{19}{y}=\frac{1}{y}\left(\frac{96}{5n-4}+19\right)\le\frac{35}{y}$, so $y\le7$. If $y=7$, we get the solution $(42,7)$. If $y=6$ we get $11n=28$ which fails. If $y=5$ we get the solution $(80,5)$. If $y=4$ we get the solution $(384,4)$. If $y\le3$ we get $(19-5y)n=-4-4y$ which fails.

So in total we have the six solutions $(20,95),(23,23),(24,19),(42,7),(80,5),(384,4)$.

HINT:

Like Ross Millikan,

$y=\dfrac{19x}{5x-96}$

As $(5x-96,5)=1,$

$(5x-96)|19x\iff(5x-96)\mid5\cdot19x=19(5x-96)+19\cdot96\iff(5x-6)|19\cdot96$

whose divisors are $?$

As $y>0,$

$(i)$ either $x>0,5x-96>0\implies x>\dfrac{96}5=19.2$

$(ii)$ or $x<0,5x-96<0\implies x<0;$ but $x>0$

Can you take it from here?

• Did you lose a $9$ in the denominator of the first question? I think it should be $5x-96$ – Ross Millikan Jun 16 '16 at 15:53
• @RossMillikan, Agreed & adjusted – lab bhattacharjee Jun 16 '16 at 15:56

HINT.-You have $$5xy\equiv y\pmod{19}\Rightarrow 5x=1\pmod{19}\text{ discarding }\space y=0$$ It follows in $\mathbb N$ $$5x-19M=1$$ whose solutions is (since $(x,M)=(4,1)$ is solution) $$\begin{cases}x=4-19t\\M=5t+1\end{cases}$$ Hence $$5x=19(5t+1)+1\Rightarrow x=19t+4$$ Now trying with $t=1$ we test $x=23$ and for $t=2$ we test $x=42$ which are right and gives $$5\cdot23y=19\cdot23+96y\Rightarrow y=23\\5\cdot42y=19\cdot42+96y\Rightarrow y=7$$ so $$(x,y)=(23,23)\text{ and }(42,7)$$ are solutions, etc.

Try to solve it as a diophantine equation

${19x + 96y = D\\ \gcd ( 19, 96 ) = 1}$

${ \text {One possible solution of }\\ 19x + 96y = 1\\ \text{is} \ (\bar x, \bar y) = (-5, 1)\\ \text{thus all the solution of}\\ 19x + 96y = D\\ \text{are } (x,y) = (-5D - 96k, D + 19k) \text{ where } k \in \mathbb{Z}}$

${ \text{in our case } D = 5xy \text{ so }\\ \{ \begin{array}{1} x = -25xy -96k\\y = 5xy + 19k \end{array}\\ \text{namely}\\\{ \begin{array}{1} x(1+25y) \equiv 0 \pmod{96}\\y(1-5x) \equiv 0\pmod{19} \end{array}\\ \text{Then you can solve the system of congruences.} }$

• Ooh, and how would you do that? – Quote Dave May 3 '19 at 19:45

Write it as $y=\frac {19x}{5x-96}$ and $x=\frac{96y}{5y-19}$ We must have $x \ge 20, y \ge 4$. $x$ and $y$ move in opposite directions. Plugging in $x=20$ gives $y=95$, so $4 \le y \le 95$. One can make a spreadsheet to check all these. I find six solutions. This is more cases than factoring, but copy down makes it easy.

Hint $\$ Apply the AC-method to reduce to the monic case, which follows easily by $\rm\,\color{#0a0}{\text{completing a product,}}$ in a similar way to completing a square, i.e.

$$\begin{eqnarray} && \ \ \ a\ x\ y &+& b\ x&+&c\ y &=&\ \ d\\ \smash{\large \overset{\times\ a}\iff} && \ \ ax\,ay &+& b\,ax &+& c\,ay &\,=& ad\\ \iff && \ \ \ {X\ Y} &+& {b\,X} &+& {c\,Y} &=& ad,\quad X = ax,\ \ Y = ay\\ \iff && \color{#0a0}{(X\!+\!c)}\!\!&&\!\!\!\!\!\! \color{#0a0}{(Y\!+\!b)}&\color{#0a0}-& \color{#0a0}{bc} &=\,& ad,\quad {\rm by\ \ \color{#0a0}{completing\ the\ product}}\\ \iff && (ax\!+\!c)\!\!&&\!\!\!\!\!\!(ay\!+\!b)\!\! && &=& ad\!+\!bc \end{eqnarray}$$