  Compact coherent x-ray sources have been the focus of extensive research
efforts over the past decades. As a result, several novel schemes like optical
and nano-undulators for generating x-ray emissions in "table-top" setups are
proposed, developed, and assessed. Despite the extensive efforts in the past
decades, there exists no operational FEL based on optical or electromagnetic
undulators. By combining the particle confinement capability of optical
cavities with wiggling motion inside an optical undulator, this paper proposes
a new concept for making a compact coherent x-ray source. The full-wave
solution of first-principle equations based on finite-difference time-domain
and particle-in-cell (FDTD/PIC) is performed to simulate inverse-Compton
scattering (ICS) off both free and confined electrons. It is shown that the
strong space-charge effect in a low-energy electron beam (5 MeV) is the main
obstacle in acquiring coherent gain through the ICS mechanism with a
10-micrometer laser. Subsequently, it is shown that by confining the electron
beam at the field nodes of an optical cavity, the space-charge effect is
compensated, and additionally, the ultrahigh charge density enables high
FEL-gain at confinement spots. The full-wave numerical simulations predict
enhancement of about three orders of magnitude in the radiation efficiency when
ICS is carried out with confined electrons compared to free electrons. These
theoretical results show promising potential as a new scheme for implementing a
compact coherent x-ray source.
