Hello, 52090!

If we *must* use Calculus, the approach and set-up is quite ugly.

A water line runs east-west. A town wants to connect two new housing developments

to the line by running lines from a single point on the existing line to the developments.

One is 3 miles north of the existing line; the other is 4 miles north of the existing line

and 5 miles east of the first development.

Find the place on the existing line, relative to the two developments,

to make the connection that minimizes the total length of the new line. Code:

* B
* |
A * * |
| * * | 4
3 | * * |
| * * |
* - - - * - - - - - *
C x P 5-x D

Development $\displaystyle A$ is 3 miles from the line: .$\displaystyle AC = 3$

Development $\displaystyle B$ is 4 miles from the line: .$\displaystyle BD = 4$

$\displaystyle CD = 5$

Let $\displaystyle P$ be a point on $\displaystyle CD$.

Let $\displaystyle x \,=\, CP$, then $\displaystyle 5-x \,=\, PD$

We want to minimize the distance: $\displaystyle AP + PB$

In right triangle $\displaystyle ACP\!:\;AP \:=\:\sqrt{x^2+3^2}$

In right triangle $\displaystyle BDP\!:\;PB \:=\:\sqrt{(5-x)^2 + 4^2}$

The total distance is: .$\displaystyle D(x) \;=\;\left(x^2+9\right)^{\frac{1}{2}} + \left(x^2-10x+41\right)^{\frac{1}{2}} $

. . and that is the function we must minimize.

I'll wait in the car . . .

.