diff --git a/_psets/7.md b/_psets/7.md
index 89c0965cceae8bcbc7c153aa0459ddccc51c7791..7cfeb591c8185439bafa6239afb404d0aab7365f 100644
--- a/_psets/7.md
+++ b/_psets/7.md
@@ -10,6 +10,44 @@ case Fermat’s Principle: a light ray chooses the path between two points that
 travel between them. Apply this to two points on either side of a dielectric interface to derive
 Snell’s Law.
 
+Let there be a dialectic interface along the y axis, between media with indices of refraction
+$$n_1$$ (left) and $$n_2$$ (right). The time it takes for light to go from a point $$(x_1, y_1)$$ on
+the left to $$(x_2, y_2)$$ on the right, passing through the interface at height $$y$$ is
+
+$$
+t = \frac{n_1}{c} \sqrt{x_1^2 + (y_1 - y)^2} + \frac{n_1}{c} \sqrt{x_2^2 + (y_2 - y)^2}
+$$
+
+The derivative of this with respect to $$y$$ is
+
+$$
+\begin{align*}
+\frac{dt}{dy}
+&= \frac{-n_1 (y_1 - y)}{c \sqrt{x_1^2 + (y_1 - y)^2}}
+    + \frac{-n_2 (y_2 - y)}{c \sqrt{x_2^2 + (y_2 - y)^2}} \\
+&= -n_1 \sin \theta_1 + n_2 \sin \theta_2
+\end{align*}
+$$
+
+since
+
+$$
+\sin \theta_1 = \frac{y_1 - y}{\sqrt{x_1^2 + (y_1 - y)^2}}
+$$
+
+and
+
+$$
+\sin \theta_2 = \frac{y - y_2}{\sqrt{x_2^2 + (y_2 - y)^2}}
+$$
+
+(by [SOHCAHTOA](http://mathworld.wolfram.com/SOHCAHTOA.html)). Hence the time of flight is minimized
+when
+
+$$
+\frac{n_1}{n_2} = \frac{\sin \theta_2}{\sin \theta_1}
+$$
+
 
 ## (9.2)