At the moment I am working on a problem that asks me to prove that the set $(2,x):= 2\mathbb Z[X]+X \mathbb Z[X]$ is an ideal, but not a principal ideal. Proving that it is an ideal is pretty easy, but I am not sure whether my way of showing it is not principal is completely correct.
What I did was assume $(2,x)$ is principal, then there is $A:=\sum_{i=0}^na_iX^i\in\mathbb Z[X]$ such that $A\mathbb Z[X]=(2,x)$ then I chose the polynomials $2,x\in(2,x)$, then $A$ must be a common factor of both. The only common factor is obviously $1$ so $(2,x)=1\mathbb Z[X]$ which is obviously false, therefore $(2,x)$ cannot be principal.
Would this approach be correct or did miss something? Help would be greatly appreciated!