"Find every equation of the line that passes through the point $(5,13)$ and passes both axis at non-negative, whole values."
Here's my attempt:
Finding first two equations, with $k=\pm1$ is fairly simple. After that, plugging in the $x=5$ and $y=13$ in the equation yields $b=13-5k$. Since the line passes the $y$ axis at $(0,b)$, $b$ has to be whole. That means $13-5k$ has to be whole, $\implies 5k \in Z$.
Only non-negative value of $k$ that passes through the $x$ axis at non-negative value is $k=1$, so for every other line $k<0$. For lines with $k<0$, $b>13$ and value of $x >=6$. $$kx+b=0$$ $$x=\frac{-b}{k}$$ $$\frac{5k-13}{k} \geq 6 $$ $$ k \leq -13 \implies b\leq 78$$
I'm not sure how to proceed from here on, I could just check for each value of $b \in (13,78]$ but that doesn't seem very efficient.
What am I missing? Is my way of doing this correct? Or is there a better way? And if my attempt is correct, how do I proceed?
Best Answer
$$y-13= m(x-5)$$
We can't have $m=0$ or there is no $x$-intercept.
has $x$-intercept $-\frac{13}m+5$ and $y$-intercept $13-5m$.
We require $-\frac{13}m+5 \ge 0$ and $13-5m \ge 0$.
$$m(-13 +5m) \ge 0 \land m \le \frac{13}5 $$
$$m=\frac{13}{5} \lor m \le 0$$
Notice that $m$ can't be irrational and it can't be zero.
Suppose $m= \frac{p}{q}, \gcd(p,q)=1$, we need $p$ to divide $13$ and $q$ to divide $5$.
Hence $p\in \{-13, -1, 1, 13\}$ and $q \in \{-5,-1,1,5\}$.
Hence possible values of $m$ are $\frac{13}5, -13, \frac{-13}5, -1, \frac{-1}5$.