Inhomogeneous optical slab and channel waveguides are basic devices for realization of interconnections in the optical integrated circuits as a fundamental alternative for all-optical signal processing systems. Usually, the numerical methods are used for determination of the waveguide characteristics such as the mode functions, the index of refractions and the wave vectors in engineering problems. In this wor we will obtain a new set of exact solutions for the propagating modes in slab waveguides. Using our proposed approach, one can obtain a large class of inhomogeneous media with position dependent permittivity and permeability with exact solutions for TM modes