• Support PF! Buy your school textbooks, materials and every day products via PF Here!

Optimization problem solved two ways (algebra or calculus)

  • Thread starter VinnyCee
  • Start date
1. The problem statement, all variables and given/known data

A life guard sitting on a beach at point A needs to get to point B (Hasselhoff fell out his inflatable rocking chair) as soon as possible. The lifeguard (Pamela Anderson) can run (on the shore in slow-motion, like in Baywatch) at a rate of 3 m/s and can swim at a rate of 1.5 m/s. How far along the beach should the lifeguard run in slow motion?

http://img208.imageshack.us/img208/8902/beachprob1.jpg [Broken]

2. Relevant equations

We have the Pythagorean Theorem, which is...


Also, distance is speed times time.


We also have differentiation. Specifically the power rule:


3. The attempt at a solution

First, the problem requests the distance "d" needed to run (in slow-mo) along the shore to get to point B in the shortest time. So we need an equation relating that distance along the shore "d" to the total time to arrive at point B. So, this is essentially an optimization problem. The wikipedia entry is advanced, but reading the first paragraph should suffice to get an idea of what optimization is all about.

So, let's assume that the lifeguard runs a distance "d" along the shore. That makes the x-direction she must travel in the water to be "100 - d".

http://img33.imageshack.us/img33/2702/beachprob2.jpg [Broken]

Now, we need to construct the equations with which we will solve this problem.

Since we know that distance is speed multiplied by time, we can use that to get an expression for time in terms of distance.



The rate (or speed) is given for water and shore in the problem.



Now we use...


to get


The distance traveled (in slow motion) on the shore is simply "d", so...


What about the distance traveled in water? We need to use Pythagorean Theorem for that.

We'll take side a to be "100 - d" and side b to be "60" and we find the value of side c in terms of "d" traveled on shore (in slow motion).




Here, c is just the distance traveled in the water. So we can plug it into here:



Now we have an expression for TOTAL time that it will take to get from A to B.


Above is the formula you need to solve this problem. If you have a graphing calculator, you can plug this in and find the point where the y-coordinate (the time) is the lowest. This is where you want to find the x-value, which would be the distance "d" asked for in the problem. Here is what that plot looks like:

http://img337.imageshack.us/img337/7339/beachprob3.jpg [Broken]

The MATlab (highly suggest learning this software) code to produce that plot:

d = [0:0.001:100];
xlabel('Distance, d [m]');
ylabel('time, t ');

So obviously, from the graph, the distance d = 65m.
We can solve this using calculus.

Here we want to take the derivative with respect to distance of the equation we produced above.


Let's change the d's to x's for notation simplicity's sake...



The first term is easy to differentiate...


what about the second term? Let's simplify it a little first...


But a square root is really just an expression raised to the 1/2 power...


Well, now we use the power rule for differentiation:



Now we want to solve this equation for zero in order to get the place where the rate of change is zero. We want to find the zeros because that is either a high or a low, in this case a low for the amount of time it will take Pamela to reach Hasselhoff.


Last edited by a moderator:

Want to reply to this thread?

"Optimization problem solved two ways (algebra or calculus)" You must log in or register to reply here.

Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving