I'm trying to prove that $\langle x^2+1\rangle$ is a maximal ideal of $\Bbb R[x]$, but I have trouble. Let $I=\langle x^2+1\rangle$ and $R=\Bbb R[x]$. First, $I\neq R$. Second, let $J$ be any ideal of $R$ such that $I\subseteq J$. Suppose $J\neq I$, I want to claim that $J=R$.
Let $f(x)\in J\setminus I$. By division algorithm, we know that there exists $q(x),~r(x)\in R$ such that $f(x)=(x^2+1)q(x)+r(x)$ and $0\leq \deg r(x)\leq 1$. We let $r(x)=ax+b$.
I totally don't understand the rest part of my teacher's solution. Why did he consider such weird polynomial $a^2x^2-b^2$? And does there exist other solutions in this final part?