Let $D$ be a domain with its field of fractions $F$. Consider the following subring of $F[x]$: $$R:=\{f(x) \in F[x]: f(0)\in D\}$$
Let $f(x)$ be a non-constant polynomial in $R$. Show that if $f$ is irreducible in $R$ then it is irreducible in $F[x]$.
My attempt: Write $f(x) = a_0 +a_1x + \cdots + a_nx^n \in R$, with $f(0)=a_0 \in R$. My idea to proceed by induction on the degree $n$. The case for $n=0$ is clear. So suppose the hypothesis hold for up to $n-1$. Then the polynomial $f(x) - a_nx^n$ is irreducible in $F[x]$ as well. How do I use this fact to prove that $f(x)$ is also irreducible in $F[x]$ as well?
We can prove the contrapositive.
Let $f(x) \in R$ and assume $f(x)$ is reducible in $F[x]$. By the assumption, we can write $f(x) = g(x) h(x)$ where $g(x), h(x)$ are non-constant polynomials in $F[x]$ and without loss of generality we can assume $g(0) \neq 0$.
Let $p(x) = g(0) h(x)$ and $q(x) = g(0)^{-1} g(x)$. Clearly, both $p(x)$ and $q(x)$ are non-constant polynomials in $F[x]$, and also $$p(0) = g(0) h(0) = f(0) \in D$$ $$q(0) = g(0)^{-1} g(0) = 1 \in D$$ Since $f(x) = p(x) q(x)$, we have proved that $f(x)$ is reducible in $R$ as well.