  We consider a problem of electron motion in different media and magnetic
field. It is shown that in case of nonmoving medium and constant homogenious
magnetic field the electron energies are quantized. We also discuss the general
problem of eigenvectors and eigenvalues of a given class of Hamiltonians. We
examine obtained exact solutions for the particular case of the electron motion
in a rotating neutron star with account for matter and magnetic field effects.
We argue that all of these considerations can be usefull for astrophysical
applications.
