  We use the holomorphic anomaly equation to solve the gravitational
corrections to Seiberg-Witten theory and a two-cut matrix model, which is
related by the Dijkgraaf-Vafa conjecture to the topological B-model on a local
Calabi-Yau manifold. In both cases we construct propagators that give a
recursive solution in the genus modulo a holomorphic ambiguity. In the case of
Seiberg-Witten theory the gravitational corrections can be expressed in closed
form as quasimodular functions of Gamma(2). In the matrix model we fix the
holomorphic ambiguity up to genus two. The latter result establishes the
Dijkgraaf-Vafa conjecture at that genus and yields a new method for solving the
matrix model at fixed genus in closed form in terms of generalized
hypergeometric functions.
