The first-order diffraction efficiency of a waveguide diffraction grat
ing is maximized, for a wide range of grating periods, by optimization
of the effective-index modulation profile. Three different values of
effective-index modulation in the range of 0.02-0.11 are considered. T
he analysis is performed with the thin-grating-decomposition method. T
he results are verified by electromagnetic grating theory and applied
to the construction of diffractive waveguide lenses with an improved o
verall efficiency. In the neighborhood of the optical axis, the optimi
zed lens structure is a close approximation of a gradient-thickness Fr
esnel lens. Significant deviations from this shape appear when the loc
al grating period reduces below approximately 15-25lambda, where lambd
a is the wavelength of the guided mode. Near the edges of a high-numer
ical-aperture lens, where the local period is approximately 3-6lambda,
an approximate Bragg grating structure is obtained.