Theory of linear and non-linear perturbations of betatron oscillations in alternating-gradient synchrotrons