We would like to apply Fermat’s principle to derive Snell’s law, which is a more lengthy calculation. To do this, we consider a light ray traveling from point \(A\) in medium 1 (with refractive index \(n_1\)) to point \(C\) in medium 2 (with refractive index \(n_2\)), crossing the interface at point \(B\). Let the coordinates of points \(A\), \(B\), and \(C\) be \((x_A, y_A)\), \((x_B, y_B)\), and \((x_C, y_C)\), respectively. Assume the interface between the two media is at \(y = y_B\). The optical path length (OPL) is given by:
\[
\delta \int_{A}^{C} n(\vec{r}) \, ds = 0,
\]
where \(n(\vec{r})\) is the refractive index at position \(\vec{r}\), and \(ds\) is an infinitesimal element of the path.
Consider a light ray traveling from point \(A\) in medium 1 (with refractive index \(n_1\)) to point \(C\) in medium 2 (with refractive index \(n_2\)), crossing the interface at point \(B\). Let the coordinates of points \(A\), \(B\), and \(C\) be \((x_A, y_A)\), \((x_B, y_B)\), and \((x_C, y_C)\), respectively. Assume the interface between the two media is at \(y = y_B\).
Optical Path Length
The optical path length (OPL) is given by:
\[
\text{OPL} = n_1 \int_{A}^{B} ds_1 + n_2 \int_{B}^{C} ds_2,
\]
where \(ds_1\) and \(ds_2\) are the infinitesimal path lengths in media 1 and 2, respectively.
Path Lengths
The path lengths \(ds_1\) and \(ds_2\) can be expressed in terms of the coordinates:
\[
ds_1 = \sqrt{(dx_1)^2 + (dy_1)^2}, \quad ds_2 = \sqrt{(dx_2)^2 + (dy_2)^2}.
\]
Since the interface is at \(y = y_B\), we have \(dy_1 = y_B - y_A\) and \(dy_2 = y_C - y_B\). The total optical path length is:
\[
\text{OPL} = n_1 \sqrt{(x_B - x_A)^2 + (y_B - y_A)^2} + n_2 \sqrt{(x_C - x_B)^2 + (y_C - y_B)^2}.
\]
Applying Fermat’s Principle
To find the stationary path, we take the variation of the OPL with respect to \(x_B\):
\[
\delta \text{OPL} = \delta \left[ n_1 \sqrt{(x_B - x_A)^2 + (y_B - y_A)^2} + n_2 \sqrt{(x_C - x_B)^2 + (y_C - y_B)^2} \right] = 0.
\]
Taking the derivative with respect to \(x_B\):
\[
\frac{\partial}{\partial x_B} \left[ n_1 \sqrt{(x_B - x_A)^2 + (y_B - y_A)^2} + n_2 \sqrt{(x_C - x_B)^2 + (y_C - y_B)^2} \right] = 0.
\]
Differentiating
Differentiating each term separately:
\[
n_1 \frac{\partial}{\partial x_B} \sqrt{(x_B - x_A)^2 + (y_B - y_A)^2} + n_2 \frac{\partial}{\partial x_B} \sqrt{(x_C - x_B)^2 + (y_C - y_B)^2} = 0.
\]
Using the chain rule:
\[
n_1 \frac{x_B - x_A}{\sqrt{(x_B - x_A)^2 + (y_B - y_A)^2}} + n_2 \frac{x_B - x_C}{\sqrt{(x_C - x_B)^2 + (y_C - y_B)^2}} = 0.
\]
Simplifying
Let \(\theta_1\) be the angle of incidence and \(\theta_2\) be the angle of refraction. Then:
\[
\sin \theta_1 = \frac{x_B - x_A}{\sqrt{(x_B - x_A)^2 + (y_B - y_A)^2}}, \quad \sin \theta_2 = \frac{x_C - x_B}{\sqrt{(x_C - x_B)^2 + (y_C - y_B)^2}}.
\]
Substituting these into the equation:
\[
n_1 \sin \theta_1 + n_2 \sin \theta_2 = 0.
\]
Since \(\sin \theta_2\) is in the opposite direction, we have:
\[
n_1 \sin \theta_1 = n_2 \sin \theta_2.
\]
This is Snell’s law, which describes the relationship between the angles of incidence and refraction when light passes from one medium to another.
Conclusion
By applying Fermat’s principle and taking the variation of the optical path length, we have derived Snell’s law:
\[
n_1 \sin \theta_1 = n_2 \sin \theta_2.
\]
This demonstrates how the principle of least time leads to the well-known law of refraction in optics.