We analyzed compositional fluctuation with lattice relaxation in a selectively grown InGaAsP epilayer by x-ray diffraction measurement. A simple and deterministic analysis procedure is described for analyzing the distribution of lattice constants (Δa⊥,Δa||). The method is based on the systematic analysis of hkl-dependence of x-ray peak profiles. The method makes the direct observation of the distribution of lattice constants easier and is suitable for analysis of selectively grown samples. The method is applicable to a selectively grown InGaAsP epilayer with a small strain under a dislocation-free condition. Clear lattice relaxation is experimentally confirmed in the epilayer and is identified as the elastic relaxation that is caused by the three-dimensional shape of the selectively grown region. This is a direct observation of elastic relaxation in a selectively grown dislocation-free structure by x-ray diffraction measurement. Distributions of both perpendicular and parallel lattice constants are estimated from the x-ray data. The result shows that both the composition and relaxation rate fluctuate in the sample. © 2001 American Institute of Physics.