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)

2. they found $\displaystyle \frac{dC}{dx}$, set that equal to 0, and found the value of x that minimizes the cost.
let C = cost in thousands of \displaystyle C = 100\sqrt{x^2+25} + 75(20-x)\displaystyle \frac{dC}{dx} = \frac{100x}{\sqrt{x^2+25}} - 75\displaystyle \frac{dC}{dx} = 0$...$\displaystyle \frac{4x}{\sqrt{x^2+25}} = 3\displaystyle \frac{16x^2}{x^2+25} = 9\displaystyle 16x^2 = 9x^2 + 225\displaystyle 7x^2 - 225 = 0\displaystyle x = \frac{15}{\sqrt{7}} \approx 5.7\$