LES for relative cohomology via sheaves

I was unable to find a suitable answer for the following question:

Once one learns that singular cohomology is the same as cohomology with coefficients in locally constant sheaf, it is natural to try and understand the meaning of LES for relative cohomology $\rightarrow H^i(X,U) \rightarrow H^i(X) \rightarrow H^i(U) \rightarrow H^{i+1}(X,U)\rightarrow$

I am curious to what extent it can be interpreted in terms of sheaves on X using functors $j^*,j_*,j_!$?

It seems that there might be some subtleties if $X\setminus U$ is something like a closed subset in Zariski topology as opposed to "thick" closed subsets...

Suppose $j:U \to X$ is an open inclusion, and $i: Z \to X$ is the inclusion of the closed complement. Then we have a short exact sequence $$0 \to j_! \Bbb Z \to \Bbb Z \to i_* \Bbb Z \to 0.$$ I'm going to apply $Ext^*_X(-,{\cal F})$ to this and get a long exact sequence.
Note that $j_!$ is exact with exact right adjoint $j^*$, so that we have an isomorphism $$Ext^p_X(j_! \Bbb Z, {\cal F}) \cong Ext^p_U(\Bbb Z, j^* {\cal F}) = H^p(U, j^* {\cal F}).$$ Moreover, $Hom(i_* \Bbb Z, -)$ is the functor of "sections supported on Z" (a composite of $i^!$ with the global section functor), whose derived functors are called cohomology groups with support on Z and denoted $H^p_Z(X, {\cal F})$.
Therefore, the long exact sequence takes the form $$\cdots \to H^p_Z(X, {\cal F}) \to H^p(X,{\cal F}) \to H^p(U, j^*{\cal F}) \to \cdots$$ The link above will take you to the stacks project where you can find more comprehensive answers to your questions.
• Thank you! I believe it might be the best answer to my question. In the resulting LES can one tautologically replace $H^p_Z(X, \cal F)$ by something of sort $H^p(X, i_*Ri^!\cal F)$? I also wonder whether anything similar is true for the RHS term $H^p(U,j^*\cal F)$, again can we see it as a sheaf on X? – user71111 Apr 29 '15 at 1:12
• @user71111 Yes, the cohomology supported on $Z$ is the cohomology group you mention (because $\Bbb Z = i^* \Bbb Z$, and both $i^*$ and $i_*$ are exact). Similarly I think you can calculate $H^* (U,j^*{\cal F})$ by the cohomology of $X$ with coefficients in $(Rj_*) (j^* {\cal F})$ (because $j_*$ and $j^*$ have exact left adjoints $j^*$ and $j_!$ respectively). – Tyler Lawson Apr 29 '15 at 15:43