  We present a set of coupled equations that relate the stellar, gaseous,
chemical, and radiation constituents of the universe averaged over the whole
galaxy population. Using as input the available data from quasar
absorption-line surveys, optical imaging and redshift surveys, and the COBE
DIRBE and FIRAS extragalactic infrared background measurements, we obtain
solutions for the cosmic histories of stars, interstellar gas, heavy elements,
dust, and radiation from stars and dust in galaxies. Our solutions reproduce
remarkably well a wide variety of observations that were not used as input,
including the integrated background light from galaxy counts, the optical and
near-infrared emissivities from galaxy surveys, the local infrared emissivities
from the IRAS survey, the mean abundance of heavy elements from surveys of
damped Lyman-alpha systems, and the global star formation rates from H$\alpha$
surveys and submillimeter observations. The solutions presented here suggest
that the process of galaxy formation appears to have undergone an early period
of substantial inflow to assemble interstellar gas at $z\gtrsim3$, a subsequent
period of intense star formation and chemical enrichment at $1\lesssim
z\lesssim3$, and a recent period of rapid decline in the gas content, star
formation rate, optical stellar emissivity, and infrared dust emission at
$z\lesssim1$. [abridged version]
