Let $X$ be a complex variety. By Poincare's lemma, its singular cohomology can be computed as hypercohomology of the holomorphic de Rham complex (viewing $X$ as a complex manifold)
$$\text{H}^\cdot(X,\mathbf{C})\ \simeq\ \text{H}^\cdot(X,\Omega^\bullet).$$
By GAGA the right side is the same as the hypercohomology of the complex of *algebraic* de Rham complex.


In any case, you can compute the hypercohomology $ \text{H}^\cdot(X,\Omega^\bullet)$ using Cech cohomology, in terms of an open cover $\{U\_\alpha\}$ of $X$. For instance, if $X$ has dimension $n$, a representative of $\text{H}^n(X,\Omega^\bullet)$ is a collection of $n$ forms
$$\omega\_{n,\alpha}\ \in\ \text{H}^0(U\_\alpha,\Omega^n)$$
which do not quite glue to a global $n$-form, but there are $n-1$ forms
$$\omega\_{n-1,\alpha,\beta}\ \in\ \text{H}^0(U\_\alpha\cap U\_\beta,\Omega^{n-1})$$
such that $d\omega\_{n-1,\alpha,\beta}=\omega\_\alpha-\omega\_\beta$ on the intersection. Similarly, there are $n-2$ forms $\omega\_{n-2,\alpha,\beta,\gamma}$ such that $d\omega\_{n-2,\alpha,\beta,\gamma}=\omega\_{n-1,\alpha,\beta}-\omega\_{n-1,\alpha,\gamma}+\omega\_{n-1,\beta,\gamma}$, and so on.


For example, on $X=\mathbf{P}^1$ with its standard cover by two affine lines, $\text{H}^2(\mathbf{P}^1)$ is generated by the meromorphic differential form
$$dx/x\ \in\ \text{H}^0(\mathbf{A}^1\_0\cap\mathbf{A}^1\_\infty, \Omega^1). $$




---


**Question:** Assume that $X$ is smooth and proper. We then know that an element of $\text{H}^\cdot(X,\mathbf{C}) \simeq \text{H}^\cdot(X,\Omega^\bullet)$ can be integrated. What does integration look like in terms of these hypercohomology classes?




---


Looking at the $\mathbf{P}^1$ example, one might guess that the answer has something interesting to do with residues.



Integrating hypercohomology classes
One way to see this is algebraically. Let $\omega\_X = \Omega^n\_X$. The map you seek to describe is
$$
\int\_X \colon \mathrm{H}^n(X,\omega\_X) \to \mathbb{C}
$$
Abstractly, it arises as the counit of the Serre duality adjunction
$$
\mathrm{H}^n(X,-) \dashv -\otimes \omega\_X
$$
By the compatibility between local and global duality, there is a commutative diagram
$\require{AMScd}$
\begin{CD}
\otimes\_P \mathrm{H}^n\_P(\omega\_X)@>can>> \mathrm{H}^n(X,\omega\_X)\\
@V \otimes\_P \mathrm{res}\_P V V @VV\int\_XV\\
\mathbb{C} @= \mathbb{C}
\end{CD}
and the maps $\mathrm{res}\_P$ that arise by local duality, are computed through higher dimensional residues. This is explained with great detail in J. Lipman's blue book:


*Dualizing sheaves, differentials and residues on algebraic varieties*. Astérisque, No. **117** (1984).


For the comparison between the algebraic and the analytic case and the $\frac{1}{(2 \pi i)^n}$ factor (up to a sign), see


Sastry & Tong, The Grothendieck Trace and the de Rham Integral, *Canad. Math. Bull.* Vol. **46** (3), 2003 pp. 429–440.


To make things more explicit, you may assume that your covering $\{U\_i\}\_{i \in I}$ is finite and each $U\_i$ is the complement of a certain section $f\_i$ of a line bundle. In this case a Czech cocycle is defined by a residual symbol
$$
\left[ \frac{ w } { f\_0 \dots f\_n } \right]
$$
with $w$ a meromorphic $n$-form. This is described on page 195 of


Hartshorne, *Residues and duality*. Lecture Notes in Mathematics, **20**, Springer-Verlag, 1966.


So the objective is to compute
$$
\int\_X \left[ \frac{ w } { f\_0 \dots f\_n } \right]
$$


The Czech-cocycle/symbol induces a certain element


$$
\left[ \frac{ w } { f\_0 \dots \hat{f\_i} \dots f\_n } \right]\_P
$$
in $\mathrm{H}^n\_P(\omega\_X)$ where $p\in U\_i$ so $(f\_i)\_P$ is invertible in $\mathcal{O}\_{X,P}$. This element is describable using a Koszul complex to compute $\mathrm{H}^n\_P(\omega\_X)$. Finally the computation of the integral is reduced to compute
$$
\mathrm{res}\_P \left[ \frac{ w } { f\_0 \dots \hat{f\_i} \dots f\_n } \right]\_P
$$.
This can be done explicitly, over the points $P$ that are *poles* of the differential form $w$. Locally at $P$
$$
w = \phi f\_0 \wedge \hat{f\_i} \wedge f\_n 
$$
with $\phi$ in the fraction field of $\mathcal{O}\_{X,P}$. Then,
$$
\mathrm{res}\_P \left[ \frac{ w } { f\_0 \dots \hat{f\_i} \dots f\_n } \right]\_P = a\_{(-1, \dots, -1)}
$$
where $a\_{(-1, \dots, -1)} \in \mathbb{C}$ denotes the corresponding coefficient in the Laurent expansion of $\phi$. This is described using the identification of $\widehat{\mathcal{O}}\_{X,P}$ with the power series ring $\mathbb{C}[[f\_0 \dots \hat{f\_i} \dots f\_n]]$.


