By the effective index method a two-dimensional field problem is transformed to a problem for a one-dimensional effective waveguide. This method is applied to semiconductor lasers having a gradual lateral variation in the complex permittivity. For the special case of a parabolic variation, analytical formulas for the required gain in the center and the half width of the intensity distribution are derived. The results are compared with a numerical method and very good agreement is found except in some cases where convergence problems occur for the numerical method. This agreement is taken as evidence for the validity of results obtained using the effective index method for analysis of semiconductor laser structures.