Let there be two different media I and II on either side of the $x$-axis (Figure 2), with the speed of light in media I and II being $c_{1}$ and $c_{2}$, respectively. If a light ray starts from point A in medium I and reaches point B in medium II, what path should the light take to minimize the time of travel?
Solution: In the same medium, the shortest path of a light ray is a straight line. We can assume that the light ray travels along the straight line AP in medium I and along the straight line PB in medium II, using the notation in the figure. Then,
$$\mathrm{AP}=\sqrt{x^{2}+b_{1}^{2}}, \mathrm{~PB}=\sqrt{(a-x)^{2}+b_{2}^{2}}$$

The time required for the light ray to travel from point A through point P to point B is
$$\begin{array}{l}
\mathrm{T}(x)=\frac{1}{c_{1}} \sqrt{x^{2}+b_{1}^{2}} \\
+\frac{1}{c_{2}} \sqrt{(a-x)^{2}+b_{2}^{2}}(0<x<a) \\
=\frac{1}{c_{1}}\left(\sqrt{x^{2}+b_{1}^{2}}-c_{1} t x\right)+\frac{1}{c_{2}} \\
\text { - [ } \left.\sqrt{(a-x)^{2}+b_{2}^{2}}-c_{2} t(a-x)\right]+a t .
\end{array}$$

Here \( t \) is a constant to be determined.
Since the time T has a minimum value, there exists \( t \) such that
$$\begin{array}{l}
\left|c_{1} t\right|<1,\left|c_{2} t\right|<1, \\
\mathrm{~T}_{\mathrm{min}}=\frac{1}{c_{1}} \sqrt{b_{1}^{2}-c_{1}^{2} t^{2}}+\frac{1}{c_{2}} \sqrt{b_{2}^{2}-c_{2}^{2} t^{2}}+a t . \\
r_{1} \\
x=b_{1} c_{1} t \\
\text { when } \alpha \quad \sqrt{1-c_{1}^{2} t^{2}},
\end{array}$$

At this time,
$$\begin{array}{l}
a-x=\begin{array}{l}
b_{2} c_{2} t \\
\sqrt{1-c_{2}^{2} t^{2}}
\end{array} \\
\frac{b_{1}}{x}=\sqrt{c_{1}^{2} t^{2}-1}=\cot \theta_{1} , \\
\frac{b_{2}}{a-x}=\sqrt{c_{2}^{2} t^{2}-1}=\cot \theta_{2}
\end{array}$$
Dividing these gives \(\frac{\sin \theta_{1}}{\sin \theta_{2}}=\frac{c_{1}}{c_{2}}\).