TITLE: Algebraic groups without torsors
QUESTION [12 upvotes]: If $G$ is an algebraic group such that $H^1(S, G) = 0$ for all schemes $S$, must $G$ be the trivial group?
My original motivation for the question is the rationale I always give students for studying stacks:  when moduli problems involve nontrivial automorphisms, a fine moduli space cannot exist.  The reasoning is that if $X$ is an object of a moduli problem $M$ admitting an automorphism group $G$ then one gets an embedding of the classifying stack $\mathrm{B}G$ of $G$-torsors inside of $M$.  Two distinct $G$-torsors over a base $S$ give distinct maps to $\mathrm{B}G$ and hence to $M$ that are pointwise identical and constant, hence must be the same in any purported fine moduli space for $M$.  This argument requires a nontrivial $G$-torsor to work.
It is not difficult to show that a nontrivial $G$-torsor exists for any disconnected group, and there are many familiar examples for connected groups.  On the other hand, the analogous question for torsors on $C^\infty$ manifolds under Lie groups has a negative answer, since maps from $X$ to the Lie group $\mathbf R$ correspond to sections over $X$ of $C^\infty(X)$, and $H^1(X, C^\infty(X)) = 0$ because of partitions of unity.

REPLY [10 votes]: I am just posting my comment as an answer.  If you want to produce a nontrivial torsor, it suffices to produce a nontrivial torsor after base change to the algebraic closure of a residue field of the base scheme.  So now you can use the structure theory of algebraic groups.  For multiplicative groups, $\mathbb{A}^{n+1}\setminus\{0\} \to \mathbb{P}^n$ is a nontrivial torsor.  For additive groups, there is a nontrivial torsor over $\mathbb{A}^2\setminus\{0\}$.  For semisimple groups, the $G$-torsor induced over $\mathbb{P}^1$ by a nontrivial torsor for the maximal torus is nontrivial, cf. Grothendieck, et al.
Edit. At the request of Jonathan Wise, here are some references.
MR0087176 (19,315b) 
Grothendieck, A. 
Sur la classification des fibrés holomorphes sur la sphère de Riemann. (French) 
Amer. J. Math. 79 (1957), 121–138. 
53.3X 
MR0263826 (41 #8425) 
Harder, Günter 
Halbeinfache Gruppenschemata über vollständigen Kurven. (German) 
Invent. Math. 6 (1968), 107–149. 
14.50 
Jonathan Wise also asks how to deduce nontriviality of torsors from nontriviality for factor torsors.  Let $\phi:G\to L$ be a homomorphism of algebraic groups.  For every $G$-torsor $E_G$, the quotient of $E_G \times L$ by the "diagonal" action of $G$ is an $L$-torsor $E_L$.  If $E_G$ has a section, then so does $E_L$.  
First, consider the case that $\phi$ is a surjective (thus flat) homomorphism from a solvable group to a multiplicative group over an algebraically closed field.  By the structure theory of algebraic groups, there exists a closed subgroup $L'\subset G$ such that $\phi:L'\to L$ is an isogeny.  The group of $L$-torsors over $\mathbb{P}^1$ is a free Abelian group.  Up to multiplying the torsor by a suitably positive and divisible integer, it is induced from an $L'$-torsor.  For the inclusion homomorphism $L'\subset G$, there is an associated $G$-torsor $E_G$ whose $L$-torsor $E_L$ is a multiple of the original $L$-torsor over $\mathbb{P}^1$.  In particular, if the original $L$-torsor is nontrivial, then so is the $G$-torsor.  
Next, consider the case that $\phi:G\to L$ is a surjective (thus flat) homomorphism from $G$ to a reductive group whose kernel is solvable, over an algebraically closed field.  Let $T\subset L$ be a maximal torus.  Let $\phi^{-1}(T)\subset G$ be the inverse image.  By the previous case, after multiplying by a sufficiently positive and divisible integer, every nontrivial $T$-torsor over $\mathbb{P}^1$ lifts to a $\phi^{-1}(T)$-torsor, which then induces a $G$-torsor over $\mathbb{P}^1$.  By Grothendieck, if the original $T$-torsor is nontrivial, then so is the $L$-torsor associated to this $G$-torsor.  Thus the $G$-torsor is also nontrivial.
The only remaining case is when $G$ itself is a unipotent group over an algebraically closed field.  A bit more generally, assume that $G$ is any non-reductive group.  Let $G\hookrightarrow L$ be any closed embedding of $G$ into a reductive group.  Then $L/G$ is not affine by Matsushima-Richardson.  If the $G$-torsor $L$ over $L/G$ were split, then the affine variety $L$ would be isomorphic to $G\times (L/G)$, and this is not affine.  
Edit. I should also say, most of what I know about this I learned from the excellent articles of Johan Martens and Michael Thaddeus.  Their proof of the Grothendieck-Harder theorem is very clear and geometric.