This is a reference to the question posted by Govind Prajapat Refraction of light through a slab of variable refractive index
A monochromatic light wave is incident normally on a glass slab of thickness 𝑑, as shown in the figure. The refractive index of the slab increases linearly from 𝑛1 to 𝑛2 over the height ℎ. Which of the following statement(s) is(are) true about the light wave emerging out of the slab?
(A) It will deflect up by an angle tan-1[(n22-n12)d/2h]
(B) It will deflect up by an angle tan-1[(n2-n1)d/h]
(C) It will not deflect.
(D) The deflection angle depends only on (𝑛2 − 𝑛1 ) and not on the individual values of 𝑛1 and 𝑛2.
In the answer by Stevan V. Saban https://physics.stackexchange.com/q/805443, he has mentioned that the individual rays slow down causing the wavefront to deviate, what is the difference between deviation of the rays and the wavefront?
Furthermore, wouldn't these individual rays deviate as seen when you apply Snell's law at each interface through which the rays pass:
$$\cos(\theta + d\theta)(\mu+d\mu)= cos(\theta)\mu$$
$$(\cos(\theta)\cos(d\theta) - \sin(\theta)\sin(d\theta))(\mu + d\mu) = \cos(\theta)\mu $$
$$\mu\cos(\theta)(1-cos(d\theta)) + \sin(\theta)\sin(d\theta)(\mu + d\mu) - \cos(\theta)\cos(d\theta)d\mu = 0$$
Dividing by $d\theta$ , where $d\theta$ and $d\mu$ tend to 0, we get: $$\mu\sin(\theta) - \cos(\theta)\frac{d\mu}{d\theta} = 0$$
Solving this differential equation we get $\lambda \sec(\theta) = \mu$, where lambda depends on where the ray enters the slab.
Further $\tan(\theta) = \frac{dy}{dx}$
Hence,we get the relation: $$ \lambda \sqrt{(\frac{dy}{dx})^2 + 1} = \mu(y) $$
This gives the trajectory of individual rays which I don't think lead to the same resultant rays exiting out of the slab as obtained by Stevan V. Saban https://physics.stackexchange.com/q/805443,
Why is there a difference? Do the individual rays really deviate in the slab? If not why can we not apply Snell's law in this form in the analysis?