### Pset 6, Abubakar Abid (It may take a second for the LaTeX-javascript library to load...)

9.1) We want to minimize time spent in each of the materials,
$$ t = l_1/v_1 + l_2/v_2 $$
We can write this as
$$ t = \sqrt{x_1^2 + y_1^2}/v_1 + \sqrt{x_2^2 + (y-y_1)^2}/v_2 $$
Where \(y_1\) is the location along the interface where the light bends. Let us differentiate.
$$ dt/dy_1 = y_1/(\sqrt{x_1^2 + y_1^2}v_1) + -(y-y_1)/(\sqrt{x_2^2 + (y-y_1)^2} v_2) $$
But this is just
$$ dt/dy_1 = sin(\theta_1)/v_1 - sin(\theta_2)/v_2 = 0 $$
So
$$ sin(\theta_1)/v_1 = sin(\theta_2)/v_2 $$