Proving that the cohomology ring of $\mathbb{R}P^n$ is isomorphic to $\mathbb{Z}_{2}[x]/(x)^{n+1}$

We have to prove that $H^{*}(\mathbb{R}P^n, \mathbb{Z}_2) \simeq \mathbb{Z}_{2}[x]/(x)^{n+1}$ as ring. So we have to find an isomorphism $$ \phi: \mathbb{Z}_{2}[x]/(x)^{n+1} \rightarrow H^{*}(\mathbb{R}P^n, \mathbb{Z}_2) $$ We can send $x$ in a sub-manifold of $\mathbb{R}P^n$ of codimention $1$ in $H_{*}(\mathbb{R}P^n, \mathbb{Z}_2)$ (? $\mathbb{R}P^{n-1}$, why isn't it a $0$-class in homology?). How can we build this isomorphism? And why can we use duality among $H^{*}$ and $H_{*}$ (if $n$ is odd $\mathbb{R}P^n$ isn't oriented)?


Here is a quick way to get what you want:

Note that $\mathbb{R}P^{n-1}\hookrightarrow\mathbb{R}P^n$ induces isomorphisms on $H_i(-;\mathbb{Z}_2)$ for $i\le n-1$.
Now $x$ generates $H_1(\mathbb{R}P^n;\mathbb{Z}_2)$ and we want to show that $H^*(\mathbb{R}P^n;\mathbb{Z}_2)\cong\mathbb{Z}_2[x]/(x^{n+1})$, so by induction we only need to show that $x\cup x^{n-1}\ne 0$.

Now just plug-n-chug through Poincare-duality with cup/cap products: $[\mathbb{R}P^n]\cap(x\cup x^{n-1})=([\mathbb{R}P^n]\cap x)\cap x^{n-1}=1$, where this last equality is because $[\mathbb{R}P^n]\cap x$ is a generator of $H_{n-1}(\mathbb{R}P^n;\mathbb{Z}_2)$! Thus $x^n\ne 0$.