Let there be two different media I and II on either side of the $x$-axis (Figure 2). The speed of light in media I and II is $c_{1}$ and $c_{2}$, respectively. Now, if light travels from point $A$ in medium I to 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 $A P$ in medium I and along the straight line $P B$ in medium II, using the notation in the figure. Then,
$$
A P=\sqrt{x^{2}+b_{1}^{2}}, P B=\sqrt{(a-x)^{2}+b_{2}^{2}} .
$$

The time required for the light to travel from point $A$ via point $P$ to point $B$ is
$$
\begin{array}{l} 
T(x)= \frac{1}{c_{1}} \sqrt{x^{2}+b_{1}^{2}} \\
\quad+\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}} \\
\cdot\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}
\quad\left|c_{1} t\right|<1,\left|c_{2} t\right|<1, \\
T_{\min }=\frac{1}{c_{1}} b_{1} \sqrt{1-c_{1}^{2} t^{2}}+\frac{1}{c_{2}} b_{2} \sqrt{1-c_{2}^{2} t^{2}}+a t . \\
\text { At this time, }\left\{\begin{array}{l}
x=\frac{b_{1} c_{1} t}{\sqrt{1-c_{1}^{2} t^{2}}}, \\
a-x=\frac{b_{2} c_{2} t}{\sqrt{1-c_{2}^{2} t^{2}}} \\
\Rightarrow\left\{\begin{array}{l}
\frac{b_{1}}{x}=\sqrt{\frac{1}{c_{1}^{2} t^{2}}-1}=\cot \theta_{1}, \\
\frac{b_{2}}{a-x}=\sqrt{\frac{1}{c_{2}^{2} t^{2}}-1}=\cot \theta_{2}
\end{array}\right. \\
\Rightarrow\left\{\begin{array} { l } 
{ \operatorname { c s c } \theta _ { 1 } = \frac { 1 } { c _ { 1 } t } , } \\
{ \operatorname { c s c } \theta _ { 2 } = \frac { 1 } { c _ { 2 } t } }
\end{array} \Rightarrow \left\{\begin{array}{l}
\sin \theta_{1}=c_{1} t, \\
\sin \theta_{2}=c_{2} t .
\end{array}\right.\right. \\
\text { Dividing gives } \frac{\sin \theta_{1}}{\sin \theta_{2}}=\frac{c_{1}}{c_{2}} .
\end{array}\right.
\end{array}
$$

Dividing gives $\frac{\sin \theta_{1}}{\sin \theta_{2}}=\frac{c_{1}}{c_{2}}$.