The grating equation comes from the concept of diffraction grating where the light is split into slits or bands and diffracted intro several beams travelling in different directions. The equation given is
nλ = d (X/L)
where
n is the order of fringe
λ is the wavelength of light
d is the distance between the slits
x is the distance from the central fringe
L is the length of the screen with slits to the viewing screen
Now, if we're only given with d, we cannot solve the problem because we don't know the values for n, x, and L. So, let's just assume for sample purposes. As mentioned earlier, light is diffracted into bands. The middle band is called the central fringe where n=0. If the wavelength of the specific light having a certain band is located next to the central fringe, n=1. If it is located two places from the central fringe, n=2, and so on and so forth. Let's assume n=3. Next, let us also assume that the screen are place 13.7 m apart, so L=13.7 m. To complete the data, let's assume x=25 mm. Substituting the values:
a.) (3)λ = (1/500 mm) (25 mm/13,700 mm))
λ = 1.217×10⁻⁶ mm or 1.217 nm
b.) (3)λ = (1/1000 mm) (25 mm/13,700 mm))
λ = 6.083×10⁻⁶ mm or 6.083 nm