<s>[INST] Ideals generated by two elements in $\mathbb{Z}[x]$ Consider the following ideal $(2+x,x^2+5)$ in $\mathbb{Z}[x]$. Then I showed that $(2+x,x^2+5)=(9,2+x)$.
But I am not able to do the same for ideals $(1-4x,x^2+5)$ and $(1+2x,x^2+5)$.
Is there some method?
EDIT: My goal is to show that these ideals can be written as $(c,ax+b)$ for some appropriate integers $a,b,c$.
Would be very grateful for help!
 [/INST] Note that $\langle 1-4x,x^2+5\rangle=\langle x+20,81\rangle$.  This is because
$$x^2+5=(x-20)\cdot(x+20)+5\cdot 81\,,$$
$$1-4x=(-4)\cdot (x+20)+1\cdot 81\,,$$
$$x+20=4\cdot(x^2+5)+x\cdot(1-4x)\,,$$
and
$$81=16\cdot(x^2+5)+(1+4x)\cdot(1-4x)\,.$$
Similarly, $\langle 1-2x,x^2+5\rangle=\langle x+10,21\rangle$.  This is because
$$x^2+5=(x-10)\cdot(x+10)+5\cdot 21\,,$$
$$1-2x=(-2)\cdot(x+10)+1\cdot 21\,,$$
$$x+10=2\cdot(x^2+5)+x\cdot(1-2x)\,,$$
and
$$21=4\cdot(x^2+5)+(1+2x)\cdot(1-2x)\,.$$
</s>