We investigate the evolution of the interaction of the magnetoplasmon resonance with the harmonics of the cyclotron resonance as the confinement of an electron gas in a quantum wire increasingly deviates from the parabolic case. The occurrence of the Bernstein modes is observed in a time-dependent Hartree model of a two-dimensional electron gas in a single quantum wire.