in this video we're going to derive snell's law of refraction from fermat's principle of least
time if you haven't heard of fermat's principle of least time this is the beautiful optimization
principle saying that for light to get from point a as you see in the diagram to point b it's going
to choose the path that minimizes its travel time and what we're looking at in our picture
here is a transition of a light ray from a fast medium into a slow medium in other words the
index of refraction n1 is less than the index of refraction and two and so i see a refraction
toward the normal and the idea of the principle of least time is for example light is not going
to travel straight from point a to point b and that's because it gives it a larger than
necessary distance to travel within the slower material thereby creating a larger travel time
and suppose i proposed this path from a to b well that minimizes the travel distance within
the slower material but we added so much to the total path length within the faster material
that that also produces a larger total time for the light to travel from point a to point b
so somewhere in between is this happy medium that gives us a typical looking ray refraction
and that's going to minimize the travel time from a to b to start to get a grip on what to do here
we're going to label this thing up and now we've labeled the horizontal travel distance within the
faster material as x1 we went ahead and put the angle in here with respect to the normal theta 1
the vertical travel distance y1 and we did the same thing in the slower material
now we're going to want to think about the travel distance within each material and that's just the
hypotenuse of a right triangle so we can write this in really quickly the hypotenuse in material
one is the square root of the sum of the squares of the legs we do the same thing in material two
and so now we have the travel distance within each material in terms of the horizontal and vertical
components the other thing i want to write down in the diagram is the speed of light within each
material so recall that the speed of light is given by c divided by the index of refraction
so we have a travel distance and we have a speed i think we can get the time of travel within
each of these materials all we're doing here is thinking about distance equals rate times time
or d equals vt and i get the time of travel by taking the distance and dividing by the speed
so i write down the time of travel in material 1 and that's the distance traveled divided by the
speed and the speed is c over n1 if i divide by that i multiply by the reciprocal and i get it n1
over c i do the same thing within material two again when i divide by that speed i'm
multiplying by the reciprocal so i'll just start that way n2 over c and then the distance traveled
is x2 squared plus y2 squared all square rooted now we can quickly write down the
total time of travel and this is the thing we want to minimize and that's t1 plus t2
and then there's one more thing i have to do to get set up to apply calculus to this thing
again what we're imagining for our optimization process is that we try different points to hit
the interface between these two materials maybe light travels along one of those paths to the left
maybe it travels along one of these paths to the right and we want to be able to vary the path
in terms of a single variable and then find the path that minimizes the travel time well
y1 and y2 are constants here with respect to that variation but x1 and x2 are not so i have
two things that are varying within my expression for the total time all i have to do is express
x2 in terms of x1 and i'll be down to a single variable and then i can apply calculus to minimize
this thing so what i'm going to do is call the total horizontal displacement for this
light ray i'll call that x and that's a constant and this makes it so i can express x2
as x minus x1 making that substitution i have my total travel time as a function of x1 only
now that our travel time is expressed in terms of a single variable all i have to do to minimize
this quantity is take the derivative and set it equal to zero and remember x1 is the only
variable in here so when i differentiate this first piece that's the square root of a thing
which differentiates to one over two times the same square root and then the chain rule requires
me to multiply by the derivative of the interior which is 2x1 and i lost a factor of c there
and we do the same thing on the second term i get 1 over 2 times the original square root
times the derivative of the interior well that itself requires the chain rule i have a 2 times
x minus x1 when i differentiate with respect to x minus x1 then i have to multiply by negative 1
the derivative of that interior our factors of two are going to cancel we set the whole thing equal
to zero i'm going to add the second term to the right hand side it had a minus sign in it anyway
and we can multiply through by c and then we're actually just staring at the answer when i look
at x1 over the square root of x1 squared plus y1 squared that's precisely the opposite side over
the hypotenuse for the angle theta 1. in other words that's the sine of theta 1. on the right
hand side i have an x minus x 1 that's exactly the same thing as x 2 or the opposite side
divided by the square root of x minus x 1 quantity squared plus y 2 squared that's the same thing as
the square root of x2 squared plus y2 squared so again that's the opposite over hypotenuse
for the angle theta two in other words the sine of theta two and that's what we normally call snell's
law of refraction and we managed to get it purely by assuming that light would travel the path from
a to b then minimize the travel time if you enjoyed this video or at least found it useful
check out another one by clicking one of the links on the left or click the zaxlab logo on
the right to explore dozens of physics and math playlists as always you can leave your questions
comments and requests in the comments section below and i'll get back to you within 24 hours
thanks for watching zach's lab and best of luck on your math and physics journey