# Computing H^2(X, T_X(-\log D))

Let $X\subset \mathbb P^3$ be a smooth variety and $D \subset X$ be an effective, reduced, irreducible divisor. My question is the following.

If I know the defining equations of $X$ and $D$ then is there any software that can compute $H^2(X, T_X(-\log D))$?

Computing cohomology of the logarithmic tangent sheaf $T_X(-\log D)$ is a usually easier once you know the cohomology of the sheaves $T_X, \quad T_X(-D)$ and $N_D$, the normal bundle of $D$ in $X$. To get $H^i(X,T_X(-\log D))$ one can use the exact sequences $$0 \to T_X(-D) \to T_X(-\log D) \to T_D \to 0$$or $$0 \to T_X(-\log D) \to TX\to N_{D}\to 0.$$These sequences make sense even when $D$ is singular (see Sernesi's book on deformation theory). These sheaves and their cohomology groups can be handeled in, say, Macaulay2, if you have the explicit equations.
EDIT: Let me try to explain the above in more detail: If one is in the lucky position that some of the cohomology groups of, say $N_D$, vanish (e.g., a line $L$ on a cubic surface has $h^0(L,N_L)=h^1(L,N_L)=0$, you can calculate the cohomology almost immediately. In the general case, you will have to write down the maps and calculate the cohomology using say, Cech cohomology. Macaulay2 have built-in routines for this, see for example Francesco Polizzi's answer to this question.
• The best reference for computing in M2 is Eisenbud/Sturmfels book on Macaulay2, I think you'll find this online. As for this question, you can define $T_X$ and $N_D$ as sheafification of modules in Macaulay2, see Polizzi's answer (and Eisenbud/Sturmfels). Similarily, you can define the map between them, $T_X \to N_D$ and let $T_X(-\log D)$ as the kernel of this map. This gives you a concrete presentation of $F=T_X(-\log D)$ and you can compute $h^2$ using 'HH^2(F)'. Feb 18, 2011 at 7:39