# Optimization of distance between cars -- "two cards are traveling along perpendicular roads"

1) Two cars are traveling along perpendicular roads, car A at 40 mph, car B at 60 mph. At noon, when car A reaches the intersection, car B is 90 mi away, and moving toward it. At 1 pm, the rate, in miles per hour, at which the distance between the cars is changing is:

A. -40 | B. 68 | C. 4 | D. -4 | E. 40

2) If t is the number of hours of travel after noon, then the cars are closest together when t is:

A. 0 | B. $\frac{27}{26}$ | C. $\frac{9}{5}$ | D. $\frac{3}{2}$ | E. $\frac{14}{13}$

Solutions

To begin, note down the "givens": $\frac{da}{dt} = 40$, $\frac{db}{dt} = 60$. At 12pm, cars A and B are at (0,0) and (0, -90) respectively. Because A is traveling along the x-axis and B along the y-axis for the purposes of this solution, position $a$ represent's car A's x value, and $b$ is car B's y value.

Next, evaluate the cars' positions at 1pm, keeping in mind they are traveling perpendicular to each other. Cars A and B will be at (40, 0) and (0, -30) respectively, because of the velocities provided. Simply put, car A has moved "right" along the x-axis by 40, and car B has moved "up" along the y-axis by 60, because exactly one hour passed since 12pm, hence 1 * the velocity.

The first question asks us to find the rate at which the distance is changing, or $\frac{dd}{dt}$, where $d$ is the distance between cars A and B. To do this, we use the distance formula, $d = \sqrt{(a_1 - b_1)^2 + (a_2 - b_2)^2}$, where $a_1$ and $b_1$ represent car A and B's x coords, and $a_2$ and $b_2$ represent car A and B's y coords. But because car A always travels along the x-axis, and car B along the y-axis, $a_2$ (car A's y value) is always zero and $b_1$ (car B's x value) is always zero. $$d = \sqrt{(a_1 - 0)^2 + (0 - b_2)^2}$$ $$d = \sqrt{(a_1)^2 + (-b_2)^2}$$ $$d^2 = (a_1)^2 + (-b_2)^2$$ $$d^2 = (a_1)^2 + (b_2)^2$$ And finally, $d^2 = a^2 + b^2$, because using the axes simplifies the problem, as explained in the first paragraph.

Implicitly derive $$2d\frac{dd}{dt} = 2a\frac{da}{dt} + 2b\frac{db}{dt}$$ $$\frac{dd}{dt} = \frac{a\frac{da}{dt} + b\frac{db}{dt}}{d}$$

Plug in $40$ for $a$, $-30$ for $b$, $40$ for $\frac{da}{dt}$, $60$ for $\frac{db}{dt}$, and $50$ for $d$ (using Pythagorean Theorem, $30^2 + 40^2 = 50^2$). $$\frac{dd}{dt} = \frac{40(40) + -30(60)}{50}$$ $$\frac{dd}{dt} = \frac{1600 -1800}{50}$$ $$\frac{dd}{dt} = \frac{-200}{50}$$ $$\frac{dd}{dt} = -4$$

Question two concerns optimization; finding the minimum value of the distance. We know the initial positions of the cars at 12pm, and their velocities. The initial point plus the distance traveled per hour for $t$ hours tells us the positions of the cars at $t$. We can find that car A at time $t$ is at $0 + 40t$ or $40t$ and car B is at $-90 + 60t$.

Using the rate of change of the distance computed above, $$\frac{dd}{dt} = \frac{a\frac{da}{dt} + b\frac{db}{dt}}{d}$$

Plug in the values and set the derivative to zero to optimize.

$$\frac{dd}{dt} = \frac{40t(40) + (-90 + 60t)60}{d} = 0$$ $$40t(40) + (-90 + 60t)60 = 0$$ $$5200t - 5400 = 0$$ $$5200t = 5400$$ $$t=27/26$$

And perform a simple check to verify the minimum. Plugging in $t = 1$ into the numerator portion, for simplicity, yields $-200$; $t = 2$ yields $5000$. The derivative is 0 and is increasing at $27/26$, so the distance is indeed minimized at that time.