A scheme for the design of diffractive phase elements (DPE's) that int
egrates several optical functions is presented in a consistent sense b
ased on the general theory of amplitude-phase retrieval and the Yang-G
u algorithm [Appl. Opt. 33, 209 (1994)]. We extend the original Yang-G
u algorithm to treat a system illuminated by a beam of incident light
whose components are at different wavelengths, and a set of equations
for determining the phase distribution of the DPE is derived. The prof
ile of a surface-relief DPE can be designed with an iterative algorith
m. Numerical simulations are carried out for the design of one-dimensi
onal DPE's capable of both demultiplexing different wavelength compone
nts and focusing each partial wave at predetermined positions. The inf
luence of the extension of sampling points in the DPE's from ideal geo
metric points to physical spots on design results is also investigated
. The numerical simulation results show that the new algorithm can be
used successfully to design the desired DPE's. It is therefore expecte
d to be useful in the design of DPE's for micro-optical systems.