Find all rational points on $x^2 + y^2 = 17$ So yes, this was asked before but I'm stuck on a specific step.
So to solve this, I tried to find the the intersection between the line $y=m(x-1)+4$ (we have $(1, 4)$ as a rational point on the circle) and $x^2 + y^2 = 17$. So simply substitution, $x^2  + (m(x-1)+ 4)^2 = 17 \implies m^2(x-1)^2 + 8m(x-1) + x^2 - 1 = 0$. 
Now I want to find the roots to get all the rational points but I'm not sure how one would get the roots of this equation. Stuck on the algebra. Would appreciate help.

It comes out better if you do
$$  (x,y) = (1,4) + t(p,q)  $$
with integers $p,q$ and $\gcd(p,q) = 1.$
$$  x = 1 + tp, \; \;  y = 4 + t q \; . $$
$$ 17 = x^2 + y^2 = 1 + 2 p t + p^2 t^2 + 16 + 8 q t + q^2 t^2 \; , $$
$$ 17 = 17 + (2p + 8 q) t + (p^2 + q^2 ) t^2 \; ,  $$
$$ 0 = (2p + 8 q) t + (p^2 + q^2 ) t^2  \; . $$
Next, we see that $t=0$ is a waste, and divide through by $t \neq 0$
$$ 0 = (2p + 8 q)  + (p^2 + q^2 ) t  \; , $$
$$ (p^2 + q^2 ) t = - (2p + 8 q) \; ,  $$
$$  t = - \frac{2p + 8 q}{p^2 + q^2}  \; \; .$$
Then $$  x = 1 + tp, \; \;  y = 4 + t q \;  $$
gives
$$  x =  \frac{p^2 + q^2 -2p^2 - 8 pq}{p^2 + q^2} = \frac{-p^2 - 8pq + q^2 }{p^2 + q^2}  \; \; ,$$
$$  y =  \frac{4p^2 + 4q^2 -2pq - 8 q^2}{p^2 + q^2} = \frac{4p^2 - 2pq -4 q^2 }{p^2 + q^2}  \; \; .$$
Note that both binary quadratic forms $-p^2 - 8pq + q^2 \; , \; \;  4p^2 - 2pq -4 q^2  \; \;$ have discriminant $68 = 4 \cdot 17.$
