Minimizing Quantity Part 1: The Fastest Route

This is a classical type of problem in physics. Imagine you are on the beach, and you throw a ball somewhere in the ocean. You the decide to have a race with someone who can get to the ball faster. Both of you run at the same speed, and when you enter the ocean, you slow down due to the water’s resistance. Therefore, the only thing that will affect who will win the race is what path each one of you takes. So the question is, which is the fastest path?

shortest route

I will tell you one thing, though, it is not a straight line. It sounds unintuitive, but think about it. You travel faster on land, and slower on the water, so what you have to do is maximize your time on land and minimize them on the water without going overboard. What that means, though, is that traveling with a straight line is a no no because it doesn’t maximize your time on land, and you spent way too much time on the water, which slows you down. If that is the case, what hope do you have of figuring out what path to take? Well, we do it with THE POWER OF MATHEMATICS of course!

Now, what you want to do is run in a straight line to the appropriate direction until you reach the ocean, change direction, and then run for the ball. So let’s construct the following mathematical structure: Position is labeled as x, and y, x being horizontal and y being vertical, of course. I will call the initial position as x=0 and y=0, and the final position x=xf and y=yf. The transition point will be at y=yt. The speed on the beach is v1 and the speed on the ocean is v2.


Now, you know from basic math and physics (or at least I hope you know) that distance=velocity*time. I will write it as d=v*t.  Then, in order to calculate time, you divide both sides by v, you get t=d/v. So, what is the total travel time of an arbitrary path? First of all, remember pythagorean theorem and then describe the distance on both mediums:

d_1=\sqrt{x_t^2 + y_t^2}

d_2=\sqrt{(y_f-y_t)^2 + (x_f-x_t)^2}

And since one travels in different speed depending on the medium:

T=\frac{\sqrt{x_t^2 + y_t^2}}{v_1}+\frac{\sqrt{(y_f-y_t)^2 + (x_f-x_t)^2}}{v_2}

Now, if you think about it, that equation T tells you the time it would take for you to get to the ball for all possible paths because it is pretty much an arbitrary equation. It tells you all possible paths so long as you make the beginning, the end, and where the shore is fixed. It doesn’t matter where, as long as you fix them in place. Since the important part is what part of the shore you should transition into, the part that changes is x. So, let’s play with them, shall we? Let’s say yt=10 meters, yf=20 meters, xf=20 meters, v1=5 m/s, and v2=2.5 m/s, and graph the equation:


As you can see from the graph, the minimum time in this case is around 8 seconds when you choose x=around 15. This happens, of course, only using the values I gave above. Now, the interesting part is that when one chooses the path of least time, one certain condition is always satisfied.  The condition applies to all arbitrary examples, and the solution to it is elegant. What you just do is just find the derivative of the function. The derivative means finding how the function changes, so basically, the slope at every point in the graph. Now, see that graph I created above? Notice how in the section where time goes at a minimum, the line stops going downwards and then starts curving upwards? At that part, the slope is 0. So now we know that in order to find the minimum time, I have to find the slope of the function T and make it equal to zero. So, by using the power rule and chain rule of the derivative, I get:

\frac{dT}{dx}=0=\frac{x_t}{v_1 \sqrt{x_t^2 + y_t^2}}-\frac{x_f - x_t}{v_2 \sqrt{(y_f-y_t)^2 + (x_f-x_t)^2}}

And since sin(angle)=opposite/hypotenuse:

\frac{sin \theta_1}{v_1}=\frac{sin \theta_2}{v_2}

See why the solution is neat? You really don’t need to know anything else except how fast you go in the two different mediums. And what it tells you is that if you enter a slower or faster medium by an angle, you can figure out the other angle by using the ratio of the two different speeds… Wait a minute. I have seen this before. Where was… Oh SNAP!

n_1*sin \theta_1=n_2*sin \theta_2

That is right, folks. Snell’s law of refraction is what naturally happens when something travels from a faster medium to a slower one (or the other way around). Now, it may seem like Snell’s law is somewhat different because instead of speed, it has something called the index of refraction. But remember that the speed of light has an absolute limit, which is the speed of light in the vacuum, called c. So:

c*\frac{sin \theta_1}{v_1}=c*\frac{sin \theta_2}{v_2}

As you can see, the index of refraction, then is the speed of light in vacuum divided by the speed of light in a medium (which is slower). And so:

n_1*sin \theta_1=n_2*sin \theta_2

It also means that because the equation above is the necessary condition for one to travel the fastest route from one medium to another, light is always travelling the fastest route possible. Right now you might have the impression that somehow nature is thinking all of these things through and choosing these paths because they are the most efficient ones. Of course, we know nature doesn’t think at all and things happen just because, cause and effect and all. As we shall see in my next post, it is not that light itself wants to go fast, it is that the wave nature of light makes it bend a certain way when it passes from one medium to another, and the way it bends just happens to be the most efficient route possible.


One Response to Minimizing Quantity Part 1: The Fastest Route

  1. krobe8 says:

    Nice explanation. Thanks!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: