The cross section of an infinitesimally small ray tube (ray pencil) expands or contracts as rays propagate. The square root of the cross-section ratio between two points on a ray is defined as the divergence factor DF. In a homogeneous medium, rays are straight lines. Consequently, (DF)2 is simply equal to the ratio of Gaussian curvatures of the wave fronts. In an inhomogeneous medium, rays are curved, the DF becomes more complex. In this paper we derive several integral expressions for calculating DF and the related formulas that govern the field and energy variations along a ray.