The evolution of an ensemble of charged particles is given by the Vlasov equation with a prescribed electromagnetic field. We choose a steady uniform magnetic field and a perpendicular electric field that oscillates in space and time. We solve the Vlasov equation with both a Fourier–Hermite spectral method and a particle simulation. The aim is to compare the effectiveness of the two approaches in the description of the ion energization in a geophysical context. We validate both solutions with an analytic result for a spatially homogeneous oscillating electric field. We show that the convergence of the Hermite polynomial expansion is greatly improved with the appropriate velocity scaling. The relationship between particle dynamics and the features of the velocity distribution function is discussed. We show that the energization of the ion distribution is related to stochastic heating arising from the chaotic dynamics associated with the equations of motion for the particles in the given fields