Particle channeling in crystals and the method of averaging