  We present a solution to Liouville's equation for an ensemble of charged
particles propagating in magnetic fields. The solution is presented using an
expansion in spherical harmonics of the phase space density, allowing a direct
interpretation of the distribution of arrival directions of cosmic rays. The
results are found for chosen conditions of variability and source
distributions. We show there are two conditions for an initially isotropic flux
of particles to remain isotropic while traveling through a magnetic field:
isotropy and homogeneity of the sources. In case isotropically-distributed
sources inject particles continuously in time, a transient magnetic induced
dipole will appear. This dipole will vanish if the system reaches a
steady-state. The formalism is used to analyze the data measured by the Pierre
Auger Observatory, contributing to the understanding of the dependence of the
dipole amplitude with energy and predicting the energy in which the quadrupole
signal should be measured.
