TITLE: Higher Ext's vanish over a PID
QUESTION [6 upvotes]: Let $R$ be a PID  and  $M$, $N$ be $R$-modules. I am trying to show that
  $$\forall n\ge 2~: \operatorname{Ext}_{R}^{n}(M,N)=0.$$

For example $\forall n\ge 2~: \operatorname{Ext}_{\mathbb Z}^{n}(M,N)=0$.
Here $\operatorname{Ext}^*_R$ is the derived functor of the functor of homomorphisms of $R$-modules $\operatorname{Hom}_R$. It's defined using projective/injective resolutions, and long exact sequences. On the other hand the definition of a PID involves ideals of the ring, and it's not immediately clear how to relate this condition to the definition of $\operatorname{Ext}$.

REPLY [5 votes]: Let $P_0 = \bigoplus_{m \in M} R_m$ be a direct sum of copies of $R$, one for each element of $M$ (the index is just here for bookkeeping reasons). This is a free $R$-module. This maps to $M$ through $\varepsilon : P_0 \to M$ by defining $\varepsilon_m : R_m \to M$, $x \mapsto x \cdot m$ and extending to the direct sum (coproduct).
The kernel $P_1 = \ker(P_0 \to M)$ is a submodule of the free module $P_0$, hence it is free as $R$ is a PID. Thus you get a free resolution (exact sequence):
$$0 \to P_1 \to P_0 \to M \to 0.$$
Then $\operatorname{Ext}^n(M,N)$ is the homology of the chain complex you get from the exact sequence above after applying $\operatorname{Hom}_R(-,N)$, but this chain complex is zero in degrees $n \ge 2$, hence $\operatorname{Ext}^n(M,N) = 0$ for $n \ge 2$.
If you don't know that and only know the long exact sequence for $\operatorname{Ext}$, use the fact that $\operatorname{Ext}^n_R(P,N) = 0$ for $n \ge 1$ and $P$ projective (pretty much by definition), and the fact that a free module is projective. The long exact sequence derived from the short one above becomes (where $n \ge 2$):
$$\dots \to \underbrace{\operatorname{Ext}^{n-1}_R(P_1,N)}_{= 0} \to \operatorname{Ext}^n_R(M,N) \to \underbrace{\operatorname{Ext}^n_R(P_0,N)}_{=0} \to \dots$$
and so $\operatorname{Ext}^n_R(M,N) = 0$.