I'm trying to solve the following problem:
Let $B$ be a UFD and $A := B[y]$ the polynomial ring. Let $f$ be a polynomial that has a term $by^i$ with $i > 0$ such that $b$ is not divisible by some prime element $p$ in $B$. Prove that the ideal $(f)$ is not maximal.
Since $b$ is not divisible by some prime element $p \in B$, $b$ must be a prime itself. So the problem is asking us to prove that a polynomial with coefficients in a UFD with a coefficient that is prime does not generate a maximal ideal.
I have tried proving that $(f)$ is not a prime ideal (hence not maximal), but that didn't work out. I also thought of showing that $(f)$ must be contained in some larger ideal that is not equal to $B[y]$, e.g. $(f) \subset (pf)$ for some prime $p \in B$, but I think there is equality there. So I haven't been able to find an ideal in which $(f)$ must be contained. I know that an ideal ideal $I$ in a commutative ring $R$ is maximal if $I \subset J$ implies $J=I$ or $J=R$.
Can you help?
Let $p$ be a prime such that $p\nmid b$. We have $(f)\subsetneq (p,f)$, and for proving that $(f)$ isn't maximal it's enough to show that $(p,f)\ne B[y]$. Assume the contrary: $(p,f)=B[y]$. Then $B[y]/(p,f)=0$. On the other side, $$B[y]/(p,f)\simeq \frac{B/(p)[y]}{(\bar f)},$$ where $\bar f$ is the image of $f$ in $B/(p)[y]$, and therefore $\bar f$ is invertible in $B/(p)[y]$, so $\deg\bar f=0$. (Note that $B/(y)$ is a field.) Since $p\nmid b$, we get that $y^i$ survives in $\bar f$, a contradiction.