I am looking to understand algebraic de Rham cohomology a bit better, and I realized that I don't really understand something that should be quite elementary. Take for example $\mathbb{P}^1_{\mathbb{C}}$. We know that the algebraic de Rham Cohomology $\mathbb{H}^2(\mathbb{P}^1_{\mathbb{C}},\Omega^{\bullet}_{alg})$ should be one dimensional (for example since it is isomorphic to singular cohomology for this space). But could one possibly write down a representative for a cohomology class that generates it?
The definition of algebraic de Rham cohomology is quite abstract, with taking a resolution of the complex $\Omega^{\bullet}_{alg}$ etc. but I was wondering if in simple, but still non-affine, cases something explicit could be said about it? Perhaps another example could be $Q \subset \mathbb{P}^3_{\mathbb{C}}$ - a quadric of dimesion 2 in projective 3-space, which has non-trivial second cohomology as well. Any leads would be great.
For a sheaf $\mathcal{F}$ on $\mathbb{P}^1$ and an open $U$ in $\mathbb{P}^1$, write $\mathcal{F}_U$ for the sheaf that takes an open $V$ to $\mathcal{F}(U \cap V)$. (This is $\iota_* \mathcal{F}|_U$ in fancy language.)
Let $U = \mathbb{P}^1 \setminus \{\infty\}$ and $V= \mathbb{P}^1 \setminus \{0\}$. Then we get an acyclic resolution of the complex
$0 \to \mathcal{O} \to \ \Omega \to 0$
on $\mathbb{P}^1$ by taking the complex $$ 0 \to \mathcal{O}_U \oplus \mathcal{O}_V \to \mathcal{O}_{U \cap V} \oplus \Omega_U \oplus \Omega_V \to \Omega_{U \cap V} \to 0. $$ All the sheaves involved are acyclic because they're supported on affines. The maps are, respectively: $(f, g) \mapsto (f - g, df, dg)$ and $(\phi, \omega, \eta) \mapsto d\phi + \omega - \eta$.
(Three notes: one, a little abuse of notation in defining these maps, we've suppressed restrictions of a function or form from their domain to a smaller domain from the notation.
Two, every smooth projective curve can be covered by two affines, and the same resolution works for every smooth projective curve.
Three, it is reasonable to ask how you would ever think of this resolution. The point is that we've taken the Cech resolution of $\Omega$ and $\mathcal{O}$ separately, then taken the total complex of the associated double complex. See Kedlaya's article that I left in a comment for more detials, and a proof this always works.)
Let's say we're working in characteristic zero (the definitions make sense in characteristic $p$ but are not typically used since the cohomology theory doesn't satisfy Weil's axioms). Taking global sections and computing homology, we get $$ H^0(\mathbb{P}^1) = \{(f, g) \in \mathcal{O}(U) \oplus \mathcal{O}(V) \ | \ (f - g, df, dg) = (0, 0, 0)\}. $$ Since in characteristic zero $df = 0$ implies $f$ is constant, this shows $H^0$ is one-dimensional generated by $(\lambda, \lambda)$. (Same proof for any smooth projective curve.)
Now the interesting case, $$ H^1(\mathbb{P}^1) = \frac{ \{ (\phi, \omega, \eta) \in \mathcal{O}(U \cap V)\oplus \Omega(U)\oplus \Omega{O}(V)\ | \ d\phi = \omega - \eta\} } { \big\{(\phi, \omega, \eta): \phi \text{ can be written as a difference } f - g \text{ where} f \text{ extends to a function on } U \\ \ \ \ \ \text{ and } g \text{ extends to a function on } V \text{ and } df = \omega \text{ and } dg = \eta \big\}}. $$
This seems verbose but in fact is $0$, which you can see by letting $z$ be a uniformizer at $0$ and writing everything in terms of Laurent polynomials in $z$, then explicitly taking antiderivatives. The key is that you can't get any $dz/z$ terms as these are neither regular at $0$ or $\infty$, but you can antidifferentiate anything else.
Finally, $H^2(\mathbb{P}^1)$ identifies with forms supported on $\Omega_{U \cap V}$ mod exact forms, and mod the image of the restriction maps from $\Omega_U$ or $\Omega_V$. Again using Laurent polynomials, we see this space is generated by the image of $\frac{dz}{z}$.