Cohomology of Hypersurface complement Suppose $Y$ is a smooth hypersurface in projective space $\mathbb{P}^n$, $X = \mathbb{P}^n - Y$ is the hypersurface complement. Is there a general method to compute cohomology of $X$? In particular, for small n, is there any examples or references?
 A: Griffiths (On the periods of certain rational integrals. I, II. Ann. of Math. 90 (1969), 460-495 & 90 (1969), 496–541.) gave a procedure to calculate the Hodge numbers of Y. Let $S=\mathbf{C}[x_0,\dots,x_n]$, let $f$ be an equation for $Y$ and $d$ be its degree. Let $J_f$ be the jacobian ideal of $f$, i.e., the ideal generated by the partial derivatives of $f$. Then
$$ h^{i,n-1-i}(Y)=\delta_{i,n-1-i}+\dim (S/J_f)_{id-n-1}.$$
The other Hodge numbers can be obtained from by hyperplane theorems: i.e., if $p+q\neq n-1$ then $h^{p,q}(Y)=1$ if and only if $0\leq p=q\leq n-1$ holds. All other Hodge numbers are zero.
Here, $\delta_{i,j}$ is the Kronecker delta, $S$ has a natural grading, $J_f$ is generated by homogeneous elements and therefore $S/J_f$ is a graded ring. $(S/J_f)_k$ means all elements of degree $k$.
The above formula can be generalized, see e.g., Steenbrink (Intersection form for quasi-homogeneous singularities. Compositio Math. 34 (1977), 211–223) for weighted projective spaces of Dimca (Betti numbers of hypersurfaces and defects of linear systems.
Duke Math. J. 60 (1990), 285–298) for hypersurfaces with isolated weighted homogeneous singularities.
A: This is very computable, using several methods. I assume you are over $\mathbb{C}$ and
that by cohomology
you mean singular cohomology, but other choices are also just as straight forward.
Let $P=\mathbb{P}^n$.
Then by the Gysin sequence
$$ \ldots H^i(P)\to H^i(X)\to H^{i-1}(Y)\to H^{i+1}(P)\ldots $$
you can basically reduce it to the computation of $H^i(P)$, which is standard, and
$H^i(Y)$. 
There are a number of explicit formulas for the latter. See, for example,
 http://www.math.purdue.edu/~dvb/preprints/book-chap17.pdf
Notes: The connecting map $H^{i-1}(Y)\to H^{i+1}(P)$ is the Gysin map, which is Poincaré dual
to the restriction $H^{2n-i-1}(P)\to H^{2n-i-1}(Y)$. Alternately, choose a tubular neighbourhood
$Y\subset T\subset P$ and 
identify 
$$H^{i-1}(Y)= H^{i-1}(T) = H^i(T,\partial T)=H^{i}(P,X)$$ 
by excision and the Thom isomorphism. Then this is the usual connecting map, and the
sequence is long exact sequence for the pair $(P,X)$. There other ways to understand
this as well.
