0
$\begingroup$

How to find all integer solutions for the equation

$y = \frac{a+bx}{b-x}$, where a and b are known integer values?

P.S. x and y must be integer at the same time

$\endgroup$
5
  • 1
    $\begingroup$ $$y=-\frac{b(b-x)}{b-x}+\frac{a+b^2}{b-x}$$ $\endgroup$ May 18 '21 at 9:56
  • $\begingroup$ Connected: this question/answers $\endgroup$
    – Jean Marie
    May 18 '21 at 10:18
  • $\begingroup$ Clear denom's then complete the product as explained in the linked dupes. $\endgroup$ May 18 '21 at 10:19
  • 1
    $\begingroup$ I don't agree to close this question on the basis that it is the same as the two cited questions which are very different: here, we have a (special) parametric equation... $\endgroup$
    – Jean Marie
    May 18 '21 at 10:34
  • $\begingroup$ @JeanMarie Exactly the same method(s) apply here, e.g. complete the product, as I said. We already have hundreds of questions showing how to solve such Diophantine equations (e.g. the linked dupes). Nothing is novel here - see abstract duplicates $\endgroup$ May 19 '21 at 0:01
2
$\begingroup$

First multiply denominator to other side : $0 = yx + bx - by + a = (x-b)(y+b) + a + b^2$

$(x-b)(y+b) = -(a+b^2)$

Then all you need is to write RHS as multiplication of 2 integers: $-(a+b^2) = mn$ and then get 2 solutions $(m+b, n-b)$ and $(n+b, m-b)$ for all different $(m, n)$ pairs.

Corner case: $a = -b^2$, then all $(x,-b)$ is solution except $x=b$ since function is not defined at $x=b$

$\endgroup$
5
  • $\begingroup$ @JeanMarie we are doing $xy +bx - by - b^2 + a + b^2 = (x-b)(y+b) + a + b^2 = 0$ $\endgroup$
    – Snowball
    May 18 '21 at 10:26
  • $\begingroup$ You are right. Sorry. I erase my remark. $\endgroup$
    – Jean Marie
    May 18 '21 at 10:31
  • $\begingroup$ Deserved to be the answer to this problem! $\endgroup$
    – Snowflake
    May 18 '21 at 12:41
  • $\begingroup$ @Snowflake with your pseudo, are you completely objective towards Snowball :) ? $\endgroup$
    – Jean Marie
    May 18 '21 at 14:51
  • $\begingroup$ @JeanMarie I have never encountered this young man $\endgroup$
    – Snowflake
    May 18 '21 at 15:37

Not the answer you're looking for? Browse other questions tagged or ask your own question.