An exercise in Fulton's Algebraic Curves I'm doing Fulton's Algebraic Curves [Ex 1.34]

Let $R$ be a UFD. $(a)$ Show that a monic polynomial of degree two or three in $R[X]$ is irreducible if and only if it has no roots in $R$. $(b)$ The polynomial $X^2 - a \in R[X]$ is irreducible if and only if $a$ is not a square in $R$.

But I think the require of $R$ a UFD is not necessary. I think we only need $R$ to be an integral domain (because it requires that the polynomial must be monic). Is my thought correct?
Thank you!
 A: We define the notion of irreducible elements only in integral domains, so, yes, $R$ should be an integral domain (though commutativity is not really used).
Apart from that, the proof goes through:
(a) Assume $f$ with $\deg f>1$ has a root $a$ in $R$. Using polynomial division (thanks to $X-a$ being monic) we have $f(X)=(X-a)g(X)+b$, find $b=f(a)=0$ and $\deg g>0$, hence $f(X)=(X-a)g(X)$ is the product of two nonunits, i.e. reducible.
On the other hand if monic $f$ can be written as product of two nonunits, $f=gh$, then the product of the leading terms equals the leading term $1$ of $f$. Hence after moving a unit constant factor around, both $g$ and $h$ can be assumed monic. As $g,h$ are nonunits they are not simply the constant $1$, so they both have positive degree and $\deg g+\deg h\le 3$ implies that at least one of $g,h$ is linear, i.e. of the form $X-a$ with $a\in R$, which implies that $f(a)=0$.
(b) Using (a), a root of $X^2-a$ is precisely the same as a witness that $a$ is a square.
