Showing Grothendieck's Vanishing Theorem provides a strict bound The following result is due to Grothendieck:

If $X$ is a noetherian topological space of dimension $n$, then for all $i>n$ and all sheaves of abelian groups $\mathscr{F}$ on $X$, we have $H^i(X,\mathscr{F})=0$.

Exercise III.2.1 in Hartshorne is designed to show that the bound is strict.  I will restate the exercise here.

(a) Let $X=\mathbb{A}_k^1$ be the affine line over an infinite field $k$.  Let $P,Q$ be distinct closed points of $X$, and let $U=X-\{P,Q\}$.  Show that $H^1(X,\mathbb{Z}_U)\ne 0$.
(b) More generally, let $Y\subseteq X=\mathbb{A}_k^n$ be the union of $n+1$ hyperplanes in general position, and let $U=X- Y$.  Show that $H^n(X,\mathbb{Z}_U)\ne 0$.

Here, $\mathbb{Z}_U:=j_!(\mathbb{Z}|_{U})$ is the sheaf obtained by extending $\mathbb{Z}|_U$ by zero outside of $U$, where $j:U\to X$ is inclusion.  Similarly, for the inclusion $i:Y\to X$ where $Y := \{P, Q\}$, define $\mathbb{Z}_Y:=i_*(\mathbb{Z}|_Y)$.  I've been able to solve $(a)$ by making use of the exact sequence of sheaves on $X$
$$0\to\mathbb{Z}_U\to\mathbb{Z}\to\mathbb{Z}_Y\to 0$$
This gives rise to a long exact sequence in cohomology, from which we find $H^1(X,\mathbb{Z}_U)\ne 0$.
I'm having trouble with part $(b)$ and would appreciate some help.  I'm trying to proceed by induction, with the base case given by part $(a)$.  It seems to me that the inductive step should make use of the fact that if $Y=H_1\cup\ldots\cup H_{n+1}$ is the union of $n+1$ hyperplanes in general position in $\mathbb{A}_k^n$, then $Y-(H_2\cup\ldots\cup H_{n+1})$ is the complement of $n$ hyperplanes in general position in $H_1=\mathbb{A}_k^{n-1}$, but I can't seem to work it out.  Thanks in advance for any help.
 A: The simplest example showing that the bound in Grothendieck's theorem is sharp is given by projective space of dimension $n$ over a field $k$:$$H^n(\mathbb P^n_k,\mathcal O_{\mathbb P^n_k}(-n-1))\simeq k$$ (Hartshorne, III Theorem 5.1 (c), page 225)
A: I found this post while thinking about the problem, and I found a solution using induction and only facts from Hartshorne. However, the induction has to take into account the cohomologies of unions of less hyperplanes. I hope this answer helps whoever stops by also.
First of all, define the following spaces:

*

*$X^k_l$ is the union of $l$ hyperplanes in general position inside $\mathbb A^{k+1}$, for $1 \leq l \leq n+2$.

*$\Delta^n=X^n_{n+2}$ is the $n$-simplex.

*$\mathbb A^n_l=\mathbb A^n \setminus X^{n-1}_l$.

In the same way that algebraic topologist do it, I will use $\tilde{H}$ to denote reduced cohomology, i.e
$$
\tilde{H} \,^i(X, \mathbf Z)=\begin{cases}H^i(X, \mathbf Z) & \text{ if } i >0\\
\mathbb Z^{\text{number of connected components of }X\text{ minus }1} &\text{ if }i=0
\end{cases}
$$
This makes the arguments a bit messy and you would have to check a little bit some of my claims but it helps a lot with writing down the whole mess of results in a compact way.
I will also use a lot the following facts:

(1) If $Y \subset X$ is closed, then $H^*(X, \mathbf Z_Y) = H^*(Y, \mathbf Z)$ (this is a lemma in Hartshorne).


(2) If $U \subset Y \subset X$, where $U$ is open in $X$ and $Y$ is closed in $X$, then $H^*(X, \mathbf Z_U)=H^*(Y, \mathbf Z_U)$. This is because $\mathbf Z_U = i_* j_! \mathbf Z_U$, where $i:Y \to X$ and $j:U \to Y$, and using (1).


(3) If $X$ is an irreducible space $\mathbf Z$ is flasque, and therefore acyclic (this is again somewhere in Hartshorne).


(4) If $X$ is an irreducible space and $U$ a non-trivial open subset of it, $\mathbf Z_U$ has no global sections. This follows from the definition of $\mathbf Z_U$ as the sheaf associated to $V \mapsto \mathbf Z(V)$ if $V \subset U$ and $0$ otherwise.

Take the LES from the SES $0 \to \mathbf Z_{\mathbb A^n_l} \to \mathbf Z \to \mathbf Z_{ X^{n-1}_l}\to 0$. This reads as follows:
$$
0 \to \underbrace{H^0(\mathbb A^n , \mathbf Z_{\mathbb A^n_l})}_{=0 \text{ by }(4)} \to \underbrace{H^0(\mathbb A^n , \mathbf Z)}_{=\mathbb Z} \stackrel{\alpha}{\to} \underbrace{H^0(X^{n-1}_l, \mathbf Z)}_{=\mathbb Z \text{ unless } (n,l)=(1,2)} \to 
$$
$$
\hspace{8pt} \to H^1(\mathbb A^n , \mathbf Z_{\mathbb A^n_l}) \to \underbrace{H^1(\mathbf A^n , \mathbb Z)}_{=0 \text{ by }(3)} \to H^1(X^{n-1}_l, \mathbf Z) \to 
$$
$$
\hspace{8pt} \to H^2(\mathbf A^n , \mathbb Z_{\mathbb A^n_l}) \to \underbrace{H^2(\mathbb A^n , \mathbf Z)}_{=0 \text{ by }(3)} \to H^2(X^{n-1}_l, \mathbf Z) \to 
$$
$$
\vdots 
$$
$$
\hspace{8pt} \to H^i(\mathbb A^n , \mathbf Z_{\mathbb A^n_l}) \to \underbrace{H^i(\mathbb A^n , \mathbf Z)}_{=0 \text{ by }(3)} \to H^i(X^{n-1}_l, \mathbf Z) \to 
$$
$$
\hspace{31pt} \to H^{i+1}(\mathbb A^n , \mathbf Z_{\mathbb A^n_l}) \to \underbrace{H^{i+1}(\mathbb A^n , \mathbf Z)}_{=0 \text{ by }(3)} \to H^{i+1}(X^{n-1}_l, \mathbf Z) \to 
$$
And $\alpha$ is an isomorphism except when $(n,l)=(1,2)$, where it is the diagonal $\mathbb Z \to \mathbb Z^2$. In any case, working a little bit one can summarise all the isomorphisms that appear as:
\begin{equation}\tag{5}
H^i(\mathbb A^n , \mathbf Z_{\mathbb A^n_l}) = \tilde{H}\, ^{i-1}(X^{n-1}_l, \mathbf Z)
\end{equation}
The original problem is therefore reduced to the calculation of $H^n(X^{n}_{n+2}, \mathbf Z)= H^n(\Delta^n, \mathbf Z)$. However, one needs to know the full cohomologies of all the $X^n_l$ to do the induction, and not only the one of $\Delta^k$ for smaller $k$.
The picture I had in mind is that, if you have some hyperplanes, choose one and intersect the others with it you get an affine space minus some hyperplanes of 1 dimension less.

Lemma: If $l\leq n+1$, $\tilde{H}\,^i(X^n_l, \mathbf Z)=0$ for all $i$.

Proof: It is done by induction in $l$ and $n$, where $n=1$ is clear. For higher $n$, if $l=1$ then $X^n_l=\mathbb A^n$ and the claim is clear from $(3)$.
If $l>1$, let $H$ be one of the hyperplanes and let $Y$ be the union of the other $l-1$ of them. $Y$ is a closed subset of $X^n_l$, so we have a SES
$$
0 \to \mathbf Z_{X^n_l\setminus Y} \to \mathbf Z \to \mathbf Z_Y \to 0
$$
Note that $Y \cong X^n_{l-1}$, and $X^n_l \cap Y$ sits inside $H \cong \mathbb A^{n}$ as $X^{n-1}_{l-1}$. Using a combination of $(4)$ and $(5)$, we obtain that
$$
H^i(X^n_l, \mathbf Z_{X^n_l\setminus Y}) \cong H^i(\mathbb A^n , \mathbf Z_{\mathbb A^n_{l-1}}) \cong \tilde{H}\,^i(X^{n-1}_{l-1}, \mathbf Z)=0
$$
where the last equality is the induction hypothesis in $n$. Therefore, the LES looks from the previous SES gives isomorphisms
$$
\tilde{H}\,^i(X^n_l, \mathbf Z) \to \tilde{H}\,^i(X^{n}_{l-1}, \mathbf Z)
$$
and the latter one is $0$ by the induction hypothesis on $l$. $\square$
Now we can prove the main result, which is:

Theorem: $\tilde{H}\,^i(\Delta^n, \mathbf Z)=\begin{cases} \mathbb Z & \text{ if }i=n \\ 0 & \text{ otherwise}\end{cases}$

Proof: Again, let $H$ be one of the hyperplanes and $Y$ be the union of the rest. From the LES associated to $0\to \mathbf Z_{\Delta^n\setminus Y} \to \mathbf Z \to \mathbf Z_Y \to 0$ we obtain
$$
H^{i-1}(Y, \mathbf Z) \to H^i(\Delta^n, \mathbf Z_{\Delta^n\setminus Y}) \to H^i(\Delta^n, \mathbf Z) \to H^i(Y, \mathbf Z)
$$
Again, $Y \cap H$ is $\Delta^{n-1}$ sitting inside $H \cong \mathbb A^{n}$, so by $(4)$ and $(5)$,
$$
H^i(\Delta^n , \mathbf Z_{\Delta^n \setminus Y}) = H^i(\mathbb A^n, \mathbf Z_{\mathbb A^n_{n+1}}) \cong \tilde{H}\,^{i-1}(\Delta^{n-1}, \mathbf Z).
$$
On the other hand, $Y \cong X^n_{n+1}$, so $\tilde{H}\,^i(Y, \mathbf Z)=0$. In this way we obtain isomorphisms
$$
\tilde{H}\,^i(\Delta^n, \mathbf Z) \cong \tilde{H}^{i-1}(\Delta^{n-1}, \mathbf Z)
$$
that prove the claim by induction in $n$.$\square$
A: This isn't the inductive proof you were looking for, but hopefully it's illuminating.
First recall the following theorem about Čech resolutions for locally finite closed covers:
Theorem [Godement, II, Thm. 5.2.1]. Let $X$ be a topological space, $\mathscr{F}$ a sheaf of abelian groups on $X$, and $\mathfrak{M} = (M_i)_{ \in I}$ a locally finite closed cover of $X$. Then, the complex $\mathscr{C}^\bullet(\mathfrak{M},\mathscr{F})$ as defined in [Hartshorne, p. 220] is a resolution for $\mathscr{F}$.
In our case, write $Y = \bigcup_{i=0}^n H_i$ where the $H_i$ are hyperplanes in general position; this is a finite closed cover of $Y$. Letting $\mathscr{F} = \mathbf{Z}\rvert_Y$ in the theorem above, and then pushing forward along the inclusion $i\colon Y \to X$, we have a resolution
$$
  0 \longrightarrow \mathbf{Z}_Y \longrightarrow \bigoplus_i \mathbf{Z}_{H_i} \longrightarrow \bigoplus_{i<j} \mathbf{Z}_{H_i \cap H_j} \longrightarrow \cdots \longrightarrow \bigoplus_{i_1<i_2<\cdots<i_n} \mathbf{Z}_{H_{i_1} \cap H_{i_2} \cap \cdots \cap H_{i_n}} \longrightarrow 0
$$
of $\mathbf{Z}_Y$ on $X$, since $\bigcap_{i=0}^n H_i = \emptyset$ by the hypothesis that the $H_i$ are in general position. This is also a flasque resolution since each intersection $H_{i_1} \cap H_{i_2} \cap \cdots \cap H_{i_\ell}$ is irreducible, and since direct images of flasque sheaves are flasque.
Now note that after taking global sections in the resolution above, we obtain the chain complex for the simplicial homology of $S^{n-1}$ (here we use that the hyperplanes intersect in the "expected" way, and so the hyperplanes must be chosen generally). This implies $H^{n-1}(X,\mathbf{Z}_Y) = H_0(S^{n-1},\mathbf{Z}) = \mathbf{Z}$ if $n > 1$ and $\mathbf{Z}^2$ if $n = 1$. Now using the long exact sequence on cohomology from your short exact sequence
$$0 \longrightarrow \mathbf{Z}_U \longrightarrow \mathbf{Z} \longrightarrow \mathbf{Z}_Y \longrightarrow 0,$$
we have an exact sequence
$$\cdots \longrightarrow H^{n-1}(X,\mathbf{Z}) \longrightarrow H^{n-1}(Y,\mathbf{Z}) \longrightarrow H^n(X,\mathbf{Z}_U) \longrightarrow H^n(X,\mathbf{Z}) \longrightarrow \cdots.$$
Finally, if $n > 1$, then $H^{n-1}(X,\mathbf{Z}) = H^n(X,\mathbf{Z}) = 0$ since $\mathbf{Z}$ is flasque on $X$, and so we have that $H^n(X,\mathbf{Z}_U) = \mathbf{Z}$. If $n = 1$, then the exact sequence is
$$
  0 \longrightarrow \mathbf{Z} \longrightarrow \mathbf{Z}^2 \longrightarrow H^1(X,\mathbf{Z}_U) \longrightarrow 0
$$
and so and $H^1(X,\mathbf{Z}_U) = \mathbf{Z}$ if $n = 1$ as well.

Since I wrote up a proof of the Theorem I cited above, I thought I might as well put it here for completeness, especially since the only English reference I could find assumes $X$ is $T_3$. First, we show the following analogue of the glueing axiom for locally finite closed covers.
Lemma [Godement, II, Thm. 1.3.1]. Let $\mathscr{F}$ be a sheaf on $X$ and suppose $\mathfrak{M}$ is a locally finite closed cover, and consider $\mathscr{F}$ as its espace étalé $\operatorname{Sp\acute{e}}(\mathscr{F}) \to X$. Suppose we are given continuous maps $s_i \colon M_i \to \operatorname{Sp\acute{e}}(\mathscr{F})$ such that $s_i\rvert_{M_i \cap M_j} = s_j\rvert_{M_i \cap M_j}$ for each $i,j$. Then, there exists a section $s\colon X \to \operatorname{Sp\acute{e}}(\mathscr{F})$ such that $s\rvert_{M_i} = s_i$ for all $i \in I$.
Proof.   It is clear that the $s_i$ glue to give a (unique) section $s\colon X \to \operatorname{Sp\acute{e}}(\mathscr{F})$ such that $s\rvert_{M_i} = s_i$; it suffices to show this section is continuous. For any point $x \in X$, since the cover $\mathfrak{M}$ is locally finite, there is an open set $U(x)$ that intersects only finitely many $M_i$; call these $M_{i_1},\ldots,M_{i_n}$. Now on $U(x)$, the $s_{i_1},\ldots,s_{i_n}$ glue to form a section $t \colon U(x) \to \operatorname{Sp\acute{e}}(\mathscr{F})$ by, e.g., [Munkres, Thm. 18.3]; since $s = t$ on $U(x)$, we see that $s$ is continuous since continuity is local. $\blacksquare$
Now we can prove the Theorem.
Proof of Theorem.  We define $\epsilon \colon \mathscr{F} \to \mathscr{C}^0$ by taking the product of the natural  maps $\mathscr{F} \to f_*(\mathscr{F}\rvert_{M_i})$ for $i \in I$. The map $\epsilon$ is injective: every point $x \in X$ lies in some $M_i$, there the map on stalks $\mathscr{F}_x \to (f_*(\mathscr{F}\rvert_{M_i}))_x$ is an isomorphism, and so $\epsilon$ is injective. Exactness at $\mathscr{C}^0$ follows from the Lemma. It therefore suffices to show exactness at $\mathscr{C}^n$ for each $n \ge 1$; it suffices to show exactness on stalks.
Let $x \in X$. For each $n \ge 1$, we define a map
$$
  k \colon \mathscr{C}^n(\mathfrak{M},\mathscr{F})_x \longrightarrow \mathscr{C}^{n-1}(\mathfrak{M},\mathscr{F})_x
$$
as follows. Given $\alpha_x \in \mathscr{C}^{n-1}(\mathfrak{M},\mathscr{F})_x$, it is represented by a section $\alpha \in \Gamma(U,\mathscr{C}^n(\mathfrak{M},\mathscr{F}))$ over a neighborhood $U$ of $x$; since $\mathfrak{M}$ is a locally finite cover, we can assume that $U$ intersects only finitely many $M_{j_1},\ldots,M_{j_n}$, and since they are closed, we can assume they all contain $x$ after possibly subtracting some $M_{j_\ell}$ off from $U(x)$. By replacing $\mathfrak{M}$ with $\mathfrak{M} \cap U$, we can assume $\mathfrak{M}$ is in fact finite. Now let $j \in \{j_1,\ldots,j_n\}$ be arbitrary; for any $p$-tuple $i_0 < \cdots < i_{p-1}$, we set
$$
  (\beta_{i_0,\ldots,i_{p-1}})_x = (\alpha_{j,i_0,\ldots,i_{p-1}})_x
$$
using the notational convention of Rem. III.4.0.1. Since there are only finitely many indexes $j$, we see by the Lemma that these $\beta$ glue to give a section $\beta_{i_0,\ldots,i_{p-1}} \in \mathscr{F}\rvert_{M_{i_0,\ldots,i_{p-1}}}(M_{i_0,\ldots,i_{p-1}})$ and hence we get an element $\beta \in \Gamma(U,\mathscr{C}^n(\mathfrak{M} \cap U,\mathscr{F}))$. Now we define $k$ above as $\alpha_x \mapsto \beta_x$. By the same argument as in Lem. III.4.2, $k$ is a homotopy operator for the complex $\mathscr{C}^\bullet_x$, that is, we have $(dk + kd)(\alpha_x) = \alpha_x$ for any germ $\alpha_x \in \mathscr{C}^p_x$, and so the identity map is homotopic to the zero map. Finally, it follows that the cohomology groups $h^p(\mathscr{C}^\bullet_x)$ of this complex are $0$ for $p \ge 1$. $\blacksquare$
