This paper presents the application of the differential equation approach to solving the second-order coupled-mode equations in inhomogeneous ocean environments. The model incorporates sound velocity profile points to construct depth-dependent, piecewise linear, ocean and bottom environments along a range grid. Modal solutions are evaluated in terms of Airy functions. The formalism to evaluate analytically the mode-coupling coefficients is presented. Comparisons to conventional expressions of the coefficients are made. The integro-differential form of the coupled equations is solved using an approach developed in nuclear theory that incorporates the Lanczos method [Knobles, J. Acoust. Soc. Am. 96, 1741-1747 (1994)]. Demonstration of the practicality of this approach is made by applying the results in actual calculations with realistic ocean environments. The formalism to evaluate analytically the mode-coupling coefficients is presented. Several benchmark examples were examined in order to validate the model and are discussed, including propagation over a hill, benchmark wedge problems, and a range-varying sound speed profile benchmark. The importance of this model is also demonstrated by the physical insight gained in having a coupled-mode approach to solving range-dependent problems. (C) 2002 Acoustical Society of America.