Let $I$ and $J$ be ideals of a ring $R$. I want to know whether the ideal $(I+J)^2$ equals $I^2+IJ+JI+J^2$.
By taking elements and using the definition of product of two ideals $I$ and $J$ as the set consisting of all finite sums of the form $\sum_{t=1}^na_tb_t$ with $a_t\in I,b_t\in J$, one derives the fact that the ideal $(I+J)^2$ is a subset of the latter. But, I could not decide about the other direction. If the other subset relation does not hold, could one add further conditions as $I$ be idempotent, or something to get equality? Thanks for any help or suggestion!
Addition and multiplication of ideals satisfies the distributive property, so it follows straightforwardly that:
$$ (I+J)^2=(I+J)(I+J)=I(I+J)+J(I+J)=I^2+IJ+JI+J^2$$