# Math Help - Pipiline - Optimization

1. ## Pipiline - Optimization

does anyone know what the equation would be to start doing this?

An offshore oil well, P is located in the ocean 5 km from the neearest point on the shore, A. A pipeline is to be built to take oil from P to a refinery that is 20 km along the straight shoreline from A. Cost to build pipline in water is 100 000 per km, and on land is 75 000 per km. What route is cheapest?
*
|\
|5 \ Root(x^2+25)
| \
|----\-------*-----
{ x }{ 20-x}

Right so i got the equation

C= 100 000(x^2+25)^1/2 + 75000 (20-x)

how did they get that

2. they found $\frac{dC}{dx}$, set that equal to 0, and found the value of x that minimizes the cost.

let C = cost in thousands of \$

$C = 100\sqrt{x^2+25} + 75(20-x)$

$\frac{dC}{dx} = \frac{100x}{\sqrt{x^2+25}} - 75$

$\frac{dC}{dx} = 0$ ...

$\frac{4x}{\sqrt{x^2+25}} = 3$

$\frac{16x^2}{x^2+25} = 9$

$16x^2 = 9x^2 + 225$

$7x^2 - 225 = 0$

$x = \frac{15}{\sqrt{7}} \approx 5.7$

3. THANK YOU,

realize i made a mistake by not squaring the 4x to make it 16x^2