I've been doing some reading about ideals and here is another question (to which I couldn't yet find or construct a counterexample).
Let $I, J$ be ideals in a ring $R$. Then $I\cup J$ is contained in $I+J$ but it may not be an ideal since it may not be closed under addition.
Can you give me a counterexample of ideals $I$ and $J$ in $R$ so that $I\cup J$ is not an ideal?
Note: $I\cup J\subseteq I+J$ since we can write $i \in I$ as $i+0\in I+J$ and similarly, we can write $j\in J$ as $0+j\subseteq I+ J$.
$ $ After reading so many great responses from this post, would this be a counter-example? Take $I=\left< 2\right>$ and $J=\left< x\right>$ in $R=\mathbb{Z}[x]$. Then $2\in I, x\in J$, but $2+x$ is not in either $I$ or $J$? After thinking about this counter-example, I don't think this is a good one: it only shows that $I\cup J$ is properly contained in $I+J$.
Thanks again for your time.