Atomic mixing in the depth-dependent diffusion approximation