Semianalytical treatment of beam broadening in crystals