Solution (source code)

= Solution

Substitution of $m\lambda=d(\sin\alpha+\sin\beta)$ gives
$$
\boxed{L=W(\sin\alpha+\sin\beta).}
$$
The incident and outgoing <optical path length> contributions between the two ends of the illuminated <diffraction grating> add. Their total is $W\sin\alpha+W\sin\beta$, so \b[$L$ is the edge-to-edge optical path difference in the selected diffracted direction]. This is a length, not a dimensionless resolving power. With $N_g=W/d$ illuminated grooves, $L=mN_g\lambda$ and the ideal <diffraction grating> <diffraction>-limited <spectral resolving power> is $R_g=mN_g=L/\lambda$. A wide <optical slit> generally gives a smaller slit-limited $R$; this distinction limits how far the slit-width scaling may be extrapolated. All of these formulae assume the stated reflection-grating sign convention.