Let $R$ be a $\text{UFD},$ with field of fractions $F$ and let $f(X)=a_0+a_1X+...+a_nX^n \in R[X]$ such that $a_n \neq 0.$ Let $x\in F$ be a root of $f(X).$
Could anyone advise me on how to show $x=\dfrac{r}{s},$ for some $r,s \in R, s \neq 0$ satisfying $r|a_0,s|a_n$ in $R \ ?$
Hints will suffice, thank you.
Hints:
$$0=f\left(\frac rs\right)=a_n\left(\frac rs\right)^n+\ldots+a_1\left(\frac rs\right)+a_0\implies $$
$$a_nr^n=-a_{n-1}sr^{n-1}+\ldots+a_1rs^{n-1}+a_0s^n$$
Right side is divided by $\;s\;$ so also is left side, and we can assume the fraction $\;\frac rs\;$ is reduced, so...
Do now something similar to the above to prove that also $\;r\mid a_0\;$ ...