An oil refinery is located on the north bank of a straight river that is 1 km wide. A pipeline is to be constructed from the refinery to storage tanks located on the south bank of the river 7 km east of the refinery. The cost of laying pipe is $500,000/km over land to a point P on the north bank and $1,000,000/km under the river to the tanks. To minimize the cost of the pipeline, how far (in km) from the refinery should P be located?

the actual costs are not important; just their ratio ... water:land = 2:1

If P is located x km east, then the cost
c = 2√(1+x^2) + 1(7-x)
dc/dx = 2x/√(1+x^2) - 1
dc/dx=0 at x = 1/√3

Use oobleck solution, variable choices much smarter.

To minimize the cost of the pipeline, we must determine the location of point P on the north bank of the river. Let's assume that point P is located x km east of the refinery.

Now, to calculate the cost, we need to consider the distance and cost of laying pipe on land and underwater.

The distance from the refinery to point P can be calculated as 7 km plus x km.

The cost of laying pipe over the land is given as $500,000 per kilometer. Therefore, the cost of laying pipe from the refinery to point P can be calculated as 500,000 * (7 + x) dollars.

The distance from point P to the storage tanks on the south bank of the river can be calculated as 1 km (the width of the river).

The cost of laying pipe under the river is given as $1,000,000 per kilometer. Therefore, the cost of laying pipe from point P to the storage tanks can be calculated as 1,000,000 dollars.

Now, the total cost of the pipeline can be calculated by adding the cost of laying pipe over the land (from the refinery to point P) and the cost of laying pipe under the river (from point P to the storage tanks).

Total cost = (500,000 * (7 + x)) + 1,000,000

To minimize the cost, we can take the derivative of the total cost function with respect to x and set it equal to 0.

d(Total cost)/dx = 500,000

Setting the derivative equal to 0 and solving for x:

500,000 = 0

This implies that x = -7.

However, a negative distance does not make sense in this context, so we discard this solution.

Therefore, to minimize the cost of the pipeline, point P should be located as close to the refinery as possible. In other words, point P should be located 0 km east of the refinery.

Thus, the optimal location for point P is right at the refinery.

s is length of underwater pipe, hypotenuse

c = cost in units of $100,000 / km
c = 5 x + 10 s
dc/dx = 5 + 10 ds/dx
zero when ds/dx = -0.5
geometry:
1^2 +(7-x)^2 = s^2
1 + 49 - 14 x + x^2 = s^2
s^2 = x^2 - 14 x + 50
2 s ds/dx = 2 x - 14
2 s (-0.5) = 2 x - 14
2 x + s = 14
s = 14 - 2x
1^2 + (7-x)^2 = s^2 = (14-2x)^2
1 + 49 - 14 x^2 = 196 - 56 x + 4 x^2
18 x^2 - 105 x + 146 = 0
I get x = 3.55 or x = 2.29
may have an arithmetic error, working fast