# Optimization

• Oct 29th 2013, 04:19 PM
nubshat
Optimization
A Capybara needs to get from point A to point B around a circular pool (see diagram). If the Capybara swims half as fast as he can run, what angle should he jump in the pool to minimize the total travel time?
Attachment 29625
I know that to minimize time traveling you need to find the equation for time then derive and set to zero.
So far I have that time swimming = 2t, time running = t, speed = distance/time
I know that distance traveled on land is r*theta, but I have no idea how to find the distance traveled in water.
Right now my equation is Time spent traveling = r*theta*t + (Distance traveled in water)*2t

How can I find distance traveled by water? And is the rest of what I have done right?
• Oct 29th 2013, 04:38 PM
emakarov
Re: Optimization
Quote:

Originally Posted by nubshat
So far I have that time swimming = 2t, time running = t

Why do you think that?

Quote:

Originally Posted by nubshat
I know that distance traveled on land is r*theta, but I have no idea how to find the distance traveled in water.

Use the law of cosines.
• Oct 29th 2013, 04:50 PM
nubshat
Re: Optimization
Quote:

Originally Posted by emakarov
Why do you think that?

I have that because the question says that the Capybara swims half as fast as he can run, so if it takes him 't' seconds to run a certain distance, it will take him twice as long to swim that distance(2t).
Also, how can I use the cosine law if I don't know the angle to the right of theta, do I use 180-theta?
• Oct 29th 2013, 05:11 PM
emakarov
Re: Optimization
Quote:

Originally Posted by nubshat
I have that because the question says that the Capybara swims half as fast as he can run, so if it takes him 't' seconds to run a certain distance, it will take him twice as long to swim that distance(2t).

Why do you think the Capybara runs and swims the same distance?

Quote:

Originally Posted by nubshat
Also, how can I use the cosine law if I don't know the angle to the right of theta, do I use 180-theta?

Yes.
• Oct 29th 2013, 05:24 PM
nubshat
Re: Optimization
ok I got that they don't travel the same distance, so now I have S_running=2S_swimming

I used cosine law to find that the distance swimming = sqrt(r^2+r^2-2r^2cos(180-theta)) = rsqrt(2-2cos(180-theta)

Then for for total time I have

t=r*theta/2S_swimming + (rsqrt(2-2cos(180-theta)))/S_swimming . Can you please let me know if what I have is correct before I solve for the minimum time?
• Oct 29th 2013, 05:28 PM
emakarov
Re: Optimization
Quote:

Originally Posted by nubshat
Then for for total time I have

t=r*theta/2S_swimming + (rsqrt(2-2cos(180-theta)))/S_swimming .

Yes, this is correct. Note that $\cos(180-\theta)=-\cos\theta$.
• Oct 29th 2013, 05:39 PM
nubshat
Re: Optimization
Quote:

Originally Posted by emakarov
Yes, this is correct. Note that $\cos(180-\theta)=-\cos\theta$.

ok thanks that will help a lot:P
• Oct 30th 2013, 02:00 PM
nubshat
Re: Optimization
I got theta = pi/3 when I solve it, but I plugged in theta=0 and theta = pi and I'm getting the minimum time to be when theta = 0(Capybara swims the while way), but I think the right answer is that the Capybara is suppose to run the whole way. Can anyone confirm/deny this?
• Oct 30th 2013, 02:16 PM
emakarov
Re: Optimization
Quote:

Originally Posted by nubshat
I got theta = pi/3 when I solve it

We have $t=\frac{r}{S}(\theta/2 + \sqrt{2+2\cos\theta}$. So, $t(0) = 2r/S$, $t(\pi)=(\pi/2)r/S$ and $\pi/2<2$. The minimum for $\theta\ge0$ is indeed attained at $\theta=\pi$: see the graph.