The Fourier expansion method for computation of the frequency distribution function of crystals