Showing posts with label minimum. Show all posts
Showing posts with label minimum. Show all posts

Sunday, June 8, 2008

Boating Calculus

Today's question is dedicated to all boating lovers and calculus fans. It is not very hard, it has no use in real life, and yet it is a very beautiful question (like the ones on super math tips).

A boat leaves the dock at 12:00pm and heads west at 40km/h. Another boat travels north at 20km/h and enters the dock at 1:00pm. When is the distance between the boats the shortest and what is that distance?

Nice, isn't it? We have an optimization question here, so we need to create a function to find a variable to optimize. We're dealing here with given speeds, variable times and varying distances, so let's call the time variable t (in hours, to match the speeds) and the distance variable d (in km).

Now, the distance from the first boat to the dock is 40t (it starts at the dock). The distance from the second boat to the dock is 20 when it starts, and 20 - 20t total (since it travels towards the dock).

The boats are heading in perpendicular directions, so they form a right triangle. Using the Pythagorean theorem, we can find the distance between the boats, d:
d2 = (40t)2 + (20 - 20t)2
d2 = 1600t2 + 400 - 800t + 400t2
d2 = 2000t2 - 800t + 400

Since we want to find the minimum value for d and d must be positive, we can also find the minimum value of d2 (also must be positive). Let y = d2:
y = 2000t2 - 800t + 400

Now differentiate this function:
y' = 4000t - 800

To find an extremety, we need to set y' to zero:
0 = 4000t - 800
4000t = 800
t = 1/5

To see that it is indeed a minimum, let's find the second derivative of y:
y'' = 4000
Since it is positive, y is minimal when t = 1/5

Now calculate y when t = 1/5:
y = 2000 * (1/5)2 - 800 * (1/5) + 400
y = 2000 * (1/25) - 160 + 400
y = 80 + 240 = 320

However, y is the distance squared, so let's take the square root of this number:
d = sqrt(y) = sqrt(320) = 8sqrt(5) = 17.888... km.

This means that after 1/5 of an hour, which is 60 / 5 = 12 minutes, the boats will be the closest to each other at 8sqrt(5) (or 17.888) km apart.

Hope you enjoyed.
Nadav

nadavs

Thursday, June 5, 2008

Wire Optimization

Finally, after waiting for a good question, it finally came: an optimization question. This one is from Yahoo Answers, and believe me, it's very good.

A 6 meter long wire is cut into 12 pieces. From these pieces, eight have the same length and the other four also have an equal length. These pieces form a frame of the box. How long should each piece for the box to have a maximum volume?

First, we should define ourselves some variables, otherwise we'd be lost.

Let x be the length of one of the 8 pieces. That means the total length of the 8 equal pieces is 8x. That means the other four pieces have a total length of 6 - 8x, and 3/2 - 2x meters each.

Since these wires form a box, the sides of the box have lengths of x, x, and 3/2 - 2x. That makes the volume of the box x * x * (3/2 - 2x), or 3x2/2 - 2x3.

To find the maximum value, we need to differentiate the volume function and set it to zero. Then we need to find the values that we get from solving the equation, plug them in the second derivative, see which one is a maximum and say "Problem Solved".

So:
V = 3x2/2 - 2x3
V' = 3x - 6x2
0 = 3x - 6x2
3x(1 - 2x) = 0
x = 0, 1/2

Now, let's find the second derivative and see when it's negative, so we get a maximum:
V'' = 3 - 12x
V''(0) = 3 - 0 = 3 > 0 - minimum
V''(1/2) = 3 - 12 * 1/2 = 3 - 6 = -3 < x =" 1/2" 1 =" 1/2">3 = 1/8 m3

Problem solved.
Nadav

nadavs