TITLE: Cohomology of complex projective plane
QUESTION [10 upvotes]: How can I compute Cohomology of complex projective plane $CP^2$?
Any magic like the one here?

REPLY [5 votes]: Let $f: \mathbb CP^n \to \mathbb R$ be given by:
$$[z_0, \dots, z_n] \mapsto \frac{|z_1|^2 + 2|z_2|^2 + \dots + n|z_n|^2}{|z_0|^2 + |z_1|^2 + \dots + |z_n|^2}$$
One can show that $f$ is a morse function with morse polynomal $P_f(t) = \sum_{k=0}^n t^{2k}$, which satisfies the gap condition and therefore $f$ is a perfect morse function. We conclude $H^k(\mathbb CP^n,\mathbb R) = \mathbb R$ for $k = 0,2,\dots,2n$ and $H^k(\mathbb CP^n,\mathbb R) = 0$ otherwise.