Equation Involving Ratios

108 Views Asked by At

In some of my research, I found multiple equations of this form: $$\frac{ax+b}{cx+d}=k$$ where $a,b,c,d$ are all non-zero integers. Is there a way (that doesn't include factoring or checking within a range), if given the values of $a,b,c,d$ to determine what integer values of $x$ makes $k$ (the ratio) an integer as well? For example use $$a=-6,b=3,c=1,d=-6$$But I am more interested in a general algorithm/method.

2

There are 2 best solutions below

0
On BEST ANSWER

You really can't avoid factoring, I think.

You can rewrite the equation as $$ (cx+d)(cy-a) = bc-ad $$ Whenever $bc-ad$ has a divisor $A$ such that $A \equiv d \bmod c$ and $(bc-ad)/A \equiv -a \bmod c$, you get a solution with $x = (A-d)/c$ and $y = ((bc-ad)/A + a)/c$.

Conversely, if you have an solution $(x,y)$, then $cx+d$ and $cy-a$ are divisors of $bc-ad$. So any solution where neither $cx+d$ nor $cy-a$ is $\pm 1$ will give you a way to factor $bc-ad$.

5
On

Above equation shown below:

$\frac{ax+b}{cx+d}=k$ --------$(1)$

For, $(a,b,c,d)=(3,25,5,2)$ equation $(1)$ has solution shown below:

$x=[(-7m-2)/5]$

$k=[(3m-17)/5m]$

For, $m=(-17/7)$ we get:

$(x,k)=(3,2)$