t = A C v 1 + B C v 2 = h 1 2 + x 2 v 1 + h 2 2 + ( d − x ) 2 v 2 ; {\displaystyle \ t={\frac {AC}{v_{1}}}+{\frac {BC}{v_{2}}}={\frac {\sqrt {h_{1}^{2}+x^{2}}}{v_{1}}}+{\frac {\sqrt {h_{2}^{2}+(d-x)^{2}}}{v_{2}}};} ;
d t d x = 0 ⇒ 2 x 2 v 1 h 1 2 + x 2 − 2 ( d − x ) 2 v 2 h 2 2 + ( d − x ) 2 = x v 1 h 1 2 + x 2 − d − x v 2 h 2 2 + ( d − x ) 2 = s i n ( α ) v 1 − s i n ( β ) v 2 = 0 {\displaystyle \ {\frac {dt}{dx}}=0\Rightarrow {\frac {2x}{2v_{1}{\sqrt {h_{1}^{2}+x^{2}}}}}-{\frac {2(d-x)}{2v_{2}{\sqrt {h_{2}^{2}+(d-x)^{2}}}}}={\frac {x}{v_{1}{\sqrt {h_{1}^{2}+x^{2}}}}}-{\frac {d-x}{v_{2}{\sqrt {h_{2}^{2}+(d-x)^{2}}}}}={\frac {sin(\alpha )}{v_{1}}}-{\frac {sin(\beta )}{v_{2}}}=0} .
Звідси
s i n ( α ) s i n ( β ) = v 1 v 2 = n 2 n 1 {\displaystyle {\frac {sin(\alpha )}{sin(\beta )}}={\frac {v_{1}}{v_{2}}}={\frac {n_{2}}{n_{1}}}} .