Find all integer solutions for $x*y = 5x+5y$

290 Views Asked by At

For this equation $x*y = 5x + 5y$ find all possible pairs.

The way I did it was: $x=5y/(y-5)$

And for this I wrote a program to brute force a couple of solutions. If it helps, some possibilities are: [4,-20], [6, 30], [10, 10]

So my question is: What is a mathematically correct way to solve this problem?

2

There are 2 best solutions below

1
On BEST ANSWER

$$5x+5y-xy=0$$ $$5x+5y-xy-25=-25$$ $$x(5-y)-5(5-y)=-25$$ $$(x-5)(y-5)=25$$ 1) $x-5=1; y-5=25; \Rightarrow x=6; y=30$;

2) $x-5=-1; y-5=-25; \Rightarrow x=4; y=-20$;

3) $x-5=5; y-5=5; \Rightarrow x=10; y=10$

4) $x-5=-5; y-5=-5; \Rightarrow x=0; y=0$

5) $x-5=25; y-5=1; \Rightarrow x=30; y=6$

6) $x-5=-25; y-5=-1; \Rightarrow x=-20; y=4$

0
On

Your approach can be the beginning of a complete analysis. We can rewrite $\frac{5y}{y-5}$ as $$5+\frac{25}{y-5}.$$ So we get a solution precisely when $y-5$ divides $25$. The only divisors of $25$ are $\pm 1$, $\pm 5$, and $\pm 25$.