We analyze the u-plane contribution to Donaldson invariants of a four-manifold X. For $b_2^+(X)>1$, this contribution vanishes, but for $b_2^+=1$, the Donaldson invariants must be written as the sum of a u-plane integral and an SW contribution. The u-plane integrals are quite intricate, but can be analyzed in great detail and even calculated. By analyzing the u-plane integrals, the relation of Donaldson theory to N=2 supersymmetric Yang-Mills theory can be described much more fully, the relation of Donaldson invariants to SW theory can be generalized to four-manifolds not of simple type, and interesting formulas can be obtained for the class numbers of imaginary quadratic fields. We also show how the results generalize to extensions of Donaldson theory obtained by including hypermultiplet matter fields.