Doubts with the Bragg's law of reflection The Bragg's condition of constructive interference between two rays reflected from two parallel crystal planes separated by a distance $d$ is $$2d\sin\theta=n\lambda$$ where $\lambda$ is the common wavelength of the reflected rays. 


*

*Why do we assume that both the reflected rays have the same wavelength ($\lambda$) for a given incident wavelength (say, $\lambda_{\rm in})$? 

*Even if we assume that both the reflected rays have the same wavelength ($\lambda$), why should that be equal to the wavelength of the incident light ($\lambda_{\rm in})$? In electromagnetic theory, we all learned that in a reflection, wavelength need not remain constant though frequency remains. 
 A: 
Why do we assume that both the reflected rays have the same wavelength ($\lambda$) for a given incident wavelength (say, $\lambda_{in}$)? 

The equality could be easily justified by a symmetry argument. Nothing allows to distinguish among different reflected rays.

Even if we assume that both the reflected rays have the same wavelength ($\lambda$), why should that be equal to the wavelength of the incident light ($\lambda_{in}$)? In electromagnetic theory, we all learned that in a reflection, wavelength need not remain constant though frequency remains. 

It is true that in electromagnetic theory we know that in th passage froma a medium to another in general there is a change of wavelength while frequency remains constant. However,  that phenomenon requires a macroscopic description where the medium appears like a continuum on the scale of one wavelength, which is not the case in th case of Bragg reflections. Moreover, the change of wavelength  is a phenomenon usually observed in the case of refraction, not reflection (once again for symmetry reasons).
A: I will answer your questions as how I understood them. Please clarify if I misunderstood.
I think by this question you are asking why we do not consider the change in the index of refraction. Ie., why we assume that the wavelength of the X-ray is the same in the material as outside the material. The reason that the same wavelength is assumed is because the index of refraction in materials in the X-ray regime is very small. Typically in the hard X-ray regime, the index is given as $(\delta, \beta)$ where the index, $n$, is equal to $1-\delta-i\beta$ (if you have not yet learned what an imaginary index is, ignore $\beta$ for now). Assume for the rest of this question that it is okay for an index of refraction to be less than 1.
Typically $\delta$ is on the order of $10^{(-6)}$, and thus the wavelength change between the inside and the outside is typically negligible. If you are measuring in the condition where your incident angle is close to the critical angle, you may actually need to consider the effect of the change in wavelength and the approximation that is Bragg’s law breaks down (however, it is still negligible for most experiments).
The reason we assume that the reflected X-ray is the same wavelength as the incoming X-ray is simply because most reflections are elastic. Thus the energy does not change upon reflection. Although this statement is dependent on the incoming X-ray energy, typically it can be assumed a negligible amount of X-rays will transfer energy into your material.
