Braggs' X-Ray diffraction experiment was to determine the structure of a crystal, by analysing the diffraction patterns when X-Rays bombard it.
To determine the formula (where d = interatomic spacing of the crystal), suppose two synchronised X-Ray waves are fired at the crystal, and each reflect on a consecutive 'atomic layer'. The X-Ray which travelled further in the crystal (ie. the X-Ray wave that reflected on the deeper atomic layer) would need an integral number of wavelengths to remain synchronised with the other wave when both waves exit the crystal. Using trigonometry, you can calculate the extra distance travelled by the longer wave to be
2dsin(theta). Putting this together gives you the formula n(lander) =
2dsin(theta). Looking at the book's diagram would make this much clearer.
I think this is how it goes...
[Edit: Wrong formula
Quoted supplied formula]