# Replace a generator of an ideal in the polynomial ring over the integers

$f$ and $g$ generate an ideal I $\subset \mathbb{Z}[x]$ show that we can replace the generators with two new generators such that one of them has zero constant term.

I know $f,g-hf$ also generate the ideal where h is any element of $\mathbb{Z}[x]$. I also know if it exists the remaining constant term must be the gcd of the original constant terms and I know the gcd can be written as a linear combination of these original terms.

Lets call the constant terms F and G. Then zF+wG=gcd(F,G). Maybe I can use this to write my new generators somehow?

-

You can apply the Euclidean algorithm to the constant terms. If you apply the same operations that the algorithm applies to the constant terms to the polynomials, you're applying your rule $(f,g)\to(f,g-hf)$ in each step, and you end up with a constant term zero since the Euclidean algorithm ends up with zero.
HINT $\$ Let $\rm\:0 \le f_0 \le g_0\:$ be the constant terms of generators $\rm\:(f,g) = I\:$ with $\rm\:f_0+g_0\:$ minimal. Then necessarily $\rm\:f_0 = 0\:,\:$ for otherwise $\rm\ (f, g-f\:) = I\:$ produces a smaller pair of constant terms. Note that this is essentially Euclidean descent on the constant terms.