  We study the structure of the phase diagram for systems consisting of 2- and
3- level particles dipolarly interacting with a 1-mode electromagnetic field,
inside a cavity, paying particular attention to the case of a finite number of
particles, and showing that the divergences that appear in other treatments are
a consequence of the mathematical approximations employed and can be avoided by
studying the system in an exact manner quantum-mechanically or via a
catastrophe formalism with variational trial states that satisfy the symmetries
of the appropriate Hamiltonians. These variational states give an excellent
approximation not only to the exact quantum phase space, but also to the energy
spectrum and the expectation values of the atomic and field operators.
Furthermore, they allow for analytic expressions in many of the cases studied.
We find the loci of the transitions in phase space from one phase to the other,
and the order of the quantum phase transitions are determined explicitly for
each of the configurations, with and without detuning. We also derive the
critical exponents for the various systems, and the phase structure at the
triple point present in the {\Xi}-configuration of 3-level systems is studied.
