  The spatial gradient expansion of the generating functional was recently
developed by Parry, Salopek, and Stewart to solve the Hamiltonian constraint in
Einstein-Hamilton-Jacobi theory for gravitationally interacting dust and scalar
fields. This expansion is used here to derive an order-by-order solution of the
Hamiltonian constraint for gravitationally interacting electromagnetic and
scalar fields. A conformal transformation and functional integral are used to
derive the generating functional up to the terms fourth order in spatial
gradients. The perturbations of a flat Friedmann-Robertson-Walker cosmology
with a scalar field, up to second order in spatial gradients, are given. The
application of this formalism is demonstrated in the specific example of an
exponential potential.
