# Math Help - optimization - distance on a pipeline

1. ## optimization - distance on a pipeline

A pipeline is to be placed so that it connects point A to the river point B. A and B are two homesteads and X is the pumphouse. How far from M should X be so that the pipeline is as short as possible?

2. Use a little Pythagoras on the two right triangles.

Let L=length of pipeline. Let x=length from M to X.

$L=\sqrt{1+(5-x)^{2}}+\sqrt{x^{2}+4}$

Differentiate, set to 0 and solve for x