# Equation Involving Ratios

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.

• This is probably unrelated but I thought I should comment that this is the formula ( in $\mathbb{C}$ of course) of the Mobius Transform. – Ryan Shesler Apr 29 at 1:27
• Suppose $0 = b + ax - dy - cxy.$ What is the locus of all points $(x,y)$ on the curve? – Somos Apr 29 at 1:33
• @Somos I don't know actually. Could you elaborate? – Quote Dave Apr 29 at 14:26
• @Somos What is the condition all the points meet? – Quote Dave Apr 29 at 20:52

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$$.

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)$$

• Are those the only solutions? – Quote Dave Apr 29 at 15:36
• Interesting, the only other solution is $(1,4)$, and both add up to $5$. – Quote Dave Apr 29 at 15:38
• And how did you get $(-17/7)$? – Quote Dave Apr 29 at 19:59
• @Quote Dave. For, variable [k= (3m-17)/(5m)], let [(3m-17)=(10m)] & we get [(x,k)=(3,2)] for m=(-17/7). – Sam Apr 30 at 9:41
• Ok now I understand, but why 3m-17=10m. Why not 3m-17=13m? – Quote Dave May 8 at 20:39