EDIT: I know that there is a commonly known way of proving this, namely using the isomorphism theorem and the quotient $R[x]/(x)$ but I didn't get any feedback whatsoever on my proof, why is it valid/invalid? Can somebody please comment on that?
Let $R$ be a commutative unital ring.
The question is to prove that for an $x\in R$ we have "(x) is a maximal ideal" $\iff$ "$R$ is a field".
$(x)$ is the ideal generated by $x$ in $R[x]$, so $(x)=\{p_1x+...+p_nx^n\ :\ n\in\mathbb{N},\ p_i\in R\}$
My attempt:
If $R$ is not a field $\exists \tilde p_0\in R$ s.t. $\tilde p_0$ is not a unit.
Now if we look at (x), we have that since there is no constant element in $(x)\ \ $ $(x)\subsetneq\{k\tilde p_0+p_1x+...+p_nx^n\ :\ k,p_1,...,p_n\in R\}:=I\subsetneq R$ which is an ideal that is different from $R[x]$ because $k\tilde p_0$ can never be equal to $1$. So $(x)$ is not a maximal ideal.
for the other way:
If $(x)$ is not a maximal ideal, $\exists I\ne R$ s.t. $(x)\subsetneq I\triangleleft R[x]$ and because $I$ is a maximal ideal it cannot contain $1$ (otherwise we get $I$=$R[x]$) so the constant element of every element of $I$ has to be $\ne 1$ so there exists some element that stays $\ne 1$ no matter by what you multiply it $\implies R$ is not a field
I am not really sure about those reasonings so any comment is welcome.