[Math] Calculus train question

calculusoptimizationproblem solving

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!)

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.$$