A general theory is developed for studying changes of a wave train governed by non-linear partial differential equations. The technique is to average over the local oscillations in the medium and so obtain differential equations for the variations in amplitude, wave number, etc. It corresponds to the Krylov-Bogoliubov averaging technique for the ordinary differential equations of non-linear vibrations. The equations obtained in this way are hyperbolic and can be handled by the usual theory of quasi-linear hyperbolic systems, involving the theory of characteristics and shock waves. In this case the 'shocks' are abrupt changes in the amplitude, wave number, etc. They do not involve dissipation, but it turns out that frequency plays the role corresponding to entropy in ordinary gas dynamic shocks. It is not clear whether these shocks will really occur in practice. However, they have a number of interesting properties and seem to be relevant to the discussion of so-called collisionless shocks in plasma dynamics. The main applications envisaged are to water waves and plasma dynamics, and the theory is developed using typical equations from these areas. If the original equations are linear, this theory predicts the usual description of dispersive waves in terms of group velocity, so it may be considered as an extension of the group velocity concept to non-linear problems. Mathematically, the theory may be considered as an extension of some of the methods and ideas for the non-linear ordinary differential equations of vibration theory to partial differential equations.