I am trying to do the following exercise:
Let $K$ be a field. Calculate the spectrum of the following rings
(1) $K[X] / \langle X^2 \rangle$
(2) $K[X]/ \langle X^2(X+1) \rangle$
For the first ring, I think that the only elements are $\langle X^2 \rangle$, $X+\langle X^2 \rangle$ and $1+\langle X^2 \rangle=K[X] / \langle X^2 \rangle$ so there are three possible ideals: $\langle \overline{0}\rangle$,$\langle \overline{x}\rangle$ and the entire quotient ring, which equals to the ideal generated by $\overline{1}$. Since $K[x]/ \langle x^2 \rangle$ is not an integral domain (for example $\overline {x}$ is not equal to $\overline {0}$ but $\overline{x}\overline{x}=\overline{0}$), then $\langle \overline{0} \rangle$ is not a prime ideal.
Now suppose we have $\overline{f}\overline{g} \in \langle \overline{x}\rangle$, then $fg-xh=x^2p$ for some $h$ and $p$ in $K[x]$. I don't know what to do next, I am not sure if $\langle \overline{x}\rangle$ is a prime ideal or not.
As for the other second ring, I think the elements in it are $\overline{0},\overline{1},\overline{x}$ and $\overline{x^2}$ and since $\overline{x^2}=\overline{x}\overline{x}$, the only ideals are $\langle \overline{0} \rangle, \langle \overline{x} \rangle, \langle \overline{x^2} \rangle$ and $\langle \overline{1}\rangle= K[X]/ \langle X^2(X+1) \rangle$. Since this ring is not an integral domain (the product $\overline{x^2}(\overline{x+1})=\overline{0}$ but $\overline{x^2},\overline{x+1} \neq \overline{0}$) then $\langle \overline{0} \rangle$ is not a prime ideal. I don't know what to do for the other two proper ideals.
I would appreciate some help to decide whether the remaining ideals are prime and to formally show that the elements I've mentioned for each ring are all the elements in each of them. Thanks in advance.
The prime ideals of $R/I$ are of the form $P/I$ with $P\subset R$ a prime ideal containing $I$.
In your examples one should take into account that $R=K[X]$ is a principal ideal domain, so its prime ideals are generated by irreducible polynomials.
Now let $P=(f)$ be a prime ideal in $R$ containing $I=(X^2)$. Then $f\mid X^2$ and since $f$ is irreducible we get $P=(X)$, so $(X)/(X^2)$ is the only prime ideal.
In the second case one has to find the irreducible polynomials $f$ such that $f\mid X^2(X+1)$. Can you continue from here?