Application of the differential method to uniaxial gratings with an infinite number of refraction channels: Scalar case