Particle in magnetic field problem