  Modern x-ray free-electron lasers (XFELs) produce x-ray pulses of exceptional
transverse coherence. This is due largely to the process of optical guiding by
which the radiation is both refractively guided by the bunched electron beam
and gain guided by the preferential amplification of on-axis radiation. These
effects may be summarized by an effective index of refraction, which has been
used in the past to study the transverse dynamics of the FEL process with
significant simplifications and approximations, but never fully
self-consistently. We present here a self-consistent method for studying high
gain FELs in the linear regime by approximating the FEL equations to
second-order in the lateral displacement from the nominal electron beam axis.
This is made possible by casting the FEL equations in the language of optical
fibers with an appropriately chosen refractive index. We demonstrate that this
approach is both fast and highly accurate, indicating that the most important
FEL dynamics are inherently second-order. In its full form our method can
capture the effects of transverse offsets in both the x-ray beam and the
electron beam, making it a versatile tool for studying non-ideal effects in
seeded FELs, regenerative amplifier XFELs, and even self-amplified spontaneous
emission (SASE) FELs.
