Let $I$ and $J$ be two ideals of a commutative ring $R$ with $1.$ Give a necessary and sufficient condition so that $R/IJ\cong R/I\times R/J.$ Prove your claim. Then decide whether the following ring isomorphisms are true or not: $\mathbb{Q}[x]/\langle x^2-1\rangle\cong \mathbb{Q}[x]/\langle x-1\rangle\times \mathbb{Q}[x]/\langle x+1\rangle,$ $\mathbb{Z}[x]/\langle x^2-1\rangle\cong \mathbb{Z}[x]/\langle x-1\rangle\times \mathbb{Z}[x]/\langle x+1\rangle.$
It has been a while since I took Abstract Algebra and I am preparing for the prelims. I am not sure how to tackle this one. Any help/suggestion/hint will be much obliged. This is what I have so far:
This is a simplified version of the chinese remainder theorem. The map $R\to R/I\times R/J$ defined by $r\mapsto (r+I,r+J)$ is a ring homomorphism with kernel $I\cap J.$ If the ideals $I$ and $J$ are comaximal, then this map is surjective and $I\cap J=I\cdot J$, so $R/(I\cdot J)=R/(I\cap J)\cong R/I\times R/J.$
My question is about the second part of the question, do I have to check whether: $\langle x-1\rangle$ and $\langle x+1\rangle$ are comaximal and $\mathbb{Q}[x]$ and/or $\mathbb{Z}[x]$ are ring homomorphisms? I believe that these ideals are comaximal in both cases but forget how to prove it.