Question:Suppose $E$ is a commutative ring, polymonials $f\left(x\right),g\left(x\right),h\left(x\right)\in E\left[x\right]$.$f$ is monic. $D$ is a subring of $E$ and $D$ is an integral domain. Now if we have $g\left(x\right)=f\left(x\right)h\left(x\right)$ in $E$,and $g\left(x\right),f\left(x\right) \in D\left[x\right]$, can we conclude that $h\left(x\right)\in D\left[x\right]$?
My try: If $E$ is also an domain, since $f$ is monic, we can do division algorithm on $D$, say $g=fq+r,deg\left(r\right)\lt deg\left(f\right),q,r\in D\left[x\right]$.We then have $g=fq+r=fh$. As a result, we get $r=f\left(h-q\right)$.If $E$ is integral domain, we can conclude that $h=q$,that is $h\in D\left[x\right]$.
However, I do not know whether $h \in D\left[x\right]$ or not when E may not be an integral domain.Can anyone help me? Thanks