Lemma 30.2.3. Let $f : X \to S$ be a morphism of schemes. Let $\mathcal{F}$ be a quasi-coherent $\mathcal{O}_ X$-module. If $f$ is affine then $R^ if_*\mathcal{F} = 0$ for all $i > 0$.

Proof. According to Cohomology, Lemma 20.7.3 the sheaf $R^ if_*\mathcal{F}$ is the sheaf associated to the presheaf $V \mapsto H^ i(f^{-1}(V), \mathcal{F}|_{f^{-1}(V)})$. By assumption, whenever $V$ is affine we have that $f^{-1}(V)$ is affine, see Morphisms, Definition 29.11.1. By Lemma 30.2.2 we conclude that $H^ i(f^{-1}(V), \mathcal{F}|_{f^{-1}(V)}) = 0$ whenever $V$ is affine. Since $S$ has a basis consisting of affine opens we win. $\square$

In your comment you can use Markdown and LaTeX style mathematics (enclose it like $\pi$). A preview option is available if you wish to see how it works out (just click on the eye in the toolbar).