  We present a numerical method for solving the time-independent thermal
radiative transfer (TRT) equation or the neutron transport (NT) equation when
the opacity or cross-section varies rapidly in energy (frequency). The approach
is based on a rigorous homogenization of the TRT/NT equation in the energy
(frequency) variable. Discretization of the homogenized TRT/NT equation results
in a multigroup-type system, and can therefore be solved by standard methods.
  We demonstrate the accuracy and efficiency of the approach on three model
problems. First we consider the Elsasser band model with constant temperature
and a small line spacing. Second, we consider a neutron transport application
for fast neutrons incident on iron, where the characteristic resonance spacing
necessitates about 16,000 energy discretization parameters if Planck-weighted
cross sections are used. Third, we consider an atmospheric TRT problem with an
opacity corresponding to water vapor. For all three problems, we demonstrate
that we can achieve between 0.1 and 1 percent relative error in the solution,
and with several orders of magnitude fewer parameters than a standard
multigroup formulation with a comparable accuracy.
