Nonlinear oscillations and the capture of particles by waves in a plasma