Let R be a commutative ring with unity. Show that the ideal generated by <x>={xf(x)|f(x) is a polynomial in R[x]} is a prime ideal in R[x] if and only if R is an integral domain.

For the forward direction I tried to use fact that an ideal N of R is prime if and only if R/N is an integral domain. But got stuck after that.

And I am completely clueless about the backwards direction. Sorry. Any help would be appreciated.