[Math] Optimizing for the minimum relative distance in a given situation

calculusderivativesoptimizationsystems of equations

I have primarily been working on this problem for quite some time now; the level of the problem is introductory calculus w/ optimization problems.

The situation is as follows:

Ship A sails due east at $5$ km/h and sees Ship B $5$ km northeast of
Ship A sailing due south at $4$ km/h. At what moment will the two
ships be closest to one another?

And just for one's information, the answer is approximately $47$ minutes according to the solutions manual.

However, I have been getting approximately $29$ minutes from the way I have set up my equation, so I would like to inquire whether or not my method of optimization for this sort of problem is right or wrong. If so, it would really be great if you could aid me in setting up the equations properly.

My Setup

We have the distance, $5$ km north east. Use the distance formula.

$$d = \sqrt{(x_2 – x_1)^2 + (y_2 – y_1)^2}$$

At the very initiation of the system (when time is $0$), Ship A is at $(0, 0).$ Have Ship A represent $(x_1, y_1).$

$$d = \sqrt{(x_2)^2 + (y_2)^2}$$

Plug in $d = 5$ km and solve for one variable.

$$5 = \sqrt{(x_2)^2 + (y_2)^2}$$
$$25 = (x_2)^2 + (y_2)^2$$
$$\sqrt{25 – (x_2)^2} = (y_2)$$

$y2$ should represent the given $y$-coordinate of Ship B. As Ship B continues sailing south at $4$ km/h, its displacement can be modeled with:

$$\mathrm{Ship\ B} = y_2 – 4x = \sqrt{25 – (x_2)^2} – 4x$$
(where $x$ is time delta)

We also know that Ship A simply has a velocity of $5$ km/h and thus can be modeled with:

$$\mathrm{Ship\ A} = 5_x$$

I then use the Pythagorean Theorem to determine the relative distance between the two, and optimize the equation for the minimal distance between the two.

$$c^2 = a^2 + b^2$$
$$c^2 = (5x)^2 + \left(\sqrt{25 – (x_2)^2} – 4x\right)^2$$
$$c = \sqrt{(5x)^2 + \left(\sqrt{25 – (x_2)^2} – 4x\right)^2}$$

I then calculate the derivative and locate wherever there is no rate of change. In this case I got around $0.49$ which only represents $29$ minutes; not $47$ minutes as the solutions manual has stated.

http://www.wolframalpha.com/input/?i=sqrt%28%28sqrt%2825+-+%28x%29%5E2%29+-+4x%29%5E2+%2B+%285x%29%5E2%29+derivative+zeroes

If there is anything wrong with my thought process or setup of equations, please let me know. Or, if I am just proceeding with this question completely wrong, then it would be great if you would lead me on to the right path.

Best Answer

There are various ways of solving this. You should draw a picture of the situation first.

One way is to model both ships as a line.

$p_A(0) = t(5,0), p_B(0) = {5\over \sqrt{2}}(1,1)+t (0,-4)$.

It is easier to work with the square of distance.

Now compute $s(t) = \|p_B(t)-p_A(t)\|^2 = \|{5\over \sqrt{2}}(1,1) +t(-5,-4) \|^2= ({5\over \sqrt{2}}-5t)^2 + ({5\over \sqrt{2}}-4t)^2 $.

Now differentiate, set it equal to zero and solve for $t$.

You will get $t = {45 \over 41 \sqrt{2}}$. Remember to convert to minutes.