  Numerical modeling of electromagnetic waves is an important tool for
understanding the interaction of light and matter, and lies at the core of
computational electromagnetics. Traditional approaches to injecting and
evolving electromagnetic waves, however, can be prohibitively expensive and
complex for emerging problems of interest and can restrict the comparisons that
can be made between simulation and theory. As an alternative, we demonstrate
that electromagnetic waves can be incorporated analytically by decomposing the
physics equations into analytic and computational parts. In particle-in-cell
simulation of laser--plasma interaction, for example, treating the laser pulse
analytically enables direct examination of the validity of approximate
solutions to Maxwell's equations including Laguerre--Gaussian beams, allows
lower-dimensional simulations to capture 3-D--like focusing, and facilitates
the modeling of novel space--time structured laser pulses such as the flying
focus. The flexibility and new routes to computational savings introduced by
this analytic pulse technique are expected to enable new simulation directions
and significantly reduce computational cost in existing areas.
