Trap: x = λD/a does not work on a grating
The double-slit result x = λD/a relies on small angles (sin θ ≈ tan θ), which holds because a is much larger than λ. On a grating, d is comparable to λ, the angles are large, and the maxima are not evenly spaced, so you must use d sin θ = nλ and work in angles, never in fringe separations.
What this actually means
Check the numbers. A double slit has a ≈ 0.5 mm, so sin θ ≈ 0.001 and the small-angle approximation is superb. A grating has d ≈ 2 µm, so sin θ for the first order can be 0.26 or more and tan θ is nowhere near sin θ.
Because the angular gaps grow with order, there is no single fringe separation. From the worked example, consecutive orders sat 15.2°, 16.5° and 20.2° apart. A formula predicting equal spacing simply cannot describe that.
The safe rule: if the question mentions lines per mm, work in angles. If it gives a slit separation in tenths of a millimetre and a screen distance, work in fringe separations.
The one exception is a question that explicitly shows the grating maxima are close to the centre and evenly spaced, which effectively means small angles again. That is rare and will be signposted.
The same warning applies in reverse: do not use d sin θ = nλ with an angle you got from tan θ = x/D on a grating unless you compute the angle properly first.
Using x = λD/a on a grating problem, which underestimates the positions of every order beyond the first.
Prove it — watch it be true
- Read the true ray angles for the first three orders on the grating.
- Convert each to a position on a screen and confirm the spacings are unequal and grow with order.
- Compare against the evenly spaced double-slit profile in the comparison view.