A train leaves the station at $10:00$ am and travels due south at a speed of $60km/h$. Another train has been heading due west at $45km/h$ and reaches the same station at $11:00$ am. At what time were the two trains the closest together? (Preferably to be solved using derivatives!)
[Math] Calculus train question
calculusoptimizationproblem solving
Related Solutions
The following follows the same outline as the solution of Johannes Kloos. I am writing it out to make a point about the function we minimize.
Please read the solution below. Then, without looking at it any more, write out a solution. If it turns out you need to look at the solution again, do so. But then wait a few hours before writing out your solution, again without looking at what is written below.
Let the dock be at $(0,0)$, and use the familiar conventions for the direction of North, South, West, and East. It is convenient to let $t=0$ at $2:00$ PM, and adjust the answer to "real" time at the end.
So at time $t$ the position of the South-heading boat is $(0,-20t)$. (If you prefer, you can let $t=0$ at $12:00$ Noon. That changes the details a little.)
The position of the East-heading boat at time $t$ is of the shape $(15t+c, 0)$ for some constant $c$. Since its position at time $t=1$ ($3:00$ PM) is $(0,0)$, we have $(15)(1)+c=0$, so $c=-15$.
By the Pythagorean Theorem, or the formula for distance between two points, the square of the distance between the two boats at time $t$ is $(-20t)^2 +(15t-15)^2$. So the distance between the two boats is $\sqrt{(-20t)^2 +(15t-15)^2}$.
This is what we want to minimize. But first note the following. (a) The first boat was at the dock, maybe for several days, before setting out. So the expression for the distance is only valid for $t \ge 0$. And since we don't know what the second boat does after reaching the dock, we have $t \le 1$. (b) To minimize the distance, it is enough to minimize the square of the distance. So instead of working with the ugly expression with the square root, we minimize the much nicer expression for the square of the distance.
Let $F(t)=(-20t)^2+(15t-15)^2$. We want to minimize $F(t)$, subject to $0 \le t\le 1$. It is worthwhile to simplify $F(t)$ a little. We have $$F(t)=400t^2+225(t-1)^2.$$ It follows that $$F'(t)=(400)(2)(t)+(225)(2)(t-1).$$ This is $0$ when $t=\frac{9}{25}$.
It is not hard to verify that for $t<\frac{9}{25}$, the derivative is negative, and for $t>\frac{9}{25}$, the derivative is positive. So $F(t)$ is minimized at $t=\frac{9}{25}$. Or else (more work) we can calculate $F(0)$, $F(1)$, and $F(9/25)$, and compare.
So the minimum distance is reached $\frac{9}{25}$ hours after $2:00$ PM. The minimum distance turns out to be $12$.
Hint: You are given the derivatives of your functions!
Let $f(t), g(t)$ be defined as above. Let $d_{1}(t) := |f(t)|$ and $d_{2}(t) := |g(t)|$ The distance squared is $H(t) := d_{1}(t)^{2} + d_{2}(t)^{2}$. In this case, what you are given is $d_{1}'(t) = -15$ since the distance to the dock is decreasing and $d_{2}'(t) = 20$ for the "opposite" reason. This implies that $d_{1}(t) = -15t + c$ and $d_{2}(t) = 20t + d$ for some constants $c, d$. By putting $t = 0$, we see $d = 0$ and $c = 15$ (since it took exactly one hour to reach the dock). Now we got $H(t) = (-15t + 15)^{2} + (20t)^{2}$ and the task became a problem that you know how to solve!
Best Answer
Observe that you want the length of the hypotenuse of a right triangle with vertical leg (the southern bound train) of length of $\;60x\;$, and a horizontal leg (the other train) of length $\;45(1-x)\;$ , with $\;x\,$= time ellapsed since $\;10:00\;$ , so the wanted hypotenuse's length (squared) is
$$f(x)=3,600 x^2+2,025(1-x)^2=5,625x^2-4,050 x+2,025=0\implies$$
$$f'(x)=11,250x-4,050=0\implies x=\frac{4,050}{11,250}=\frac25\implies$$
At $\;10:00 + 24'=10:24\;$ the distance was minimal, and this was
$$\sqrt{f\left(\frac25\right)}\approx36.12 \;kms.$$