Given ensuing information, determine the least cost and the least cost mix of on- and off-shore pipe.

-The intake facility is in the water 2 miles vertically north of the shoreline
-The water filtration plant is on land 1 mile vertically south of the shoreline
-The intake and the plant are horizontally 3 miles apart
-The cost to lay pipe off-shore is $60,000 per mile and the cost to lay pipe on-shore is $30,000 per mile
-The shoreline runs east and west in a horizontal straight line

Nice twist to a standard question.

I picked a point on the shoreline x miles horizonatally from the intake, leaving 3-x horizontally to the plant
I let the diagonal in the water be D1 and the diagonal on land D2

I see two right-angled triangles
one with sides 2, x and D1
the other with 1, 3-x and D2

cost = 60000D1 + 30000D2
= 60000(x^2+4)^(1/2) + 30000(1 + (3-x)^2)^(1/2
= 30000( 2(x^2+4)^(1/2) + (1 + (3-x)^2)^(1/2)
= 30000( 2(x^2+4)^(1/2) + (x^2 - 6x + 10)^2)^(1/2)

d(cost)/dx = 30000( (x^2+4)^(-1/2) (2x) + (1/2)(x^2 - 6x + 10)^(-1/2) (2x-6) )
= 0 for a min of cost

2x/(√(x^2+4) +(x-3)/√(x^2 - 6x + 10) = 0
2x/√(x^2+4) = (3-x)/(√(x^2 - 6x + 10)

square both sides
4x^2/(x^2 + 4) = (3-x)^2/(x^2 - 6x + 10)

after cross-muliplying, collecting all like terms and dividing each term by 3 I get

x^4 - 6x^3 + 9x^2 + 8x - 12=0
I tried x = ±1, ±2, ±3, ±4, ±6
and fortunately it worked for x=1

Wolfram gave me two real numbers
x = 1 and x = - 1.11169 , of course a negative makes no sense

x = 1

least cost = 60000√5 + 30000√5
= $ 201246

It might be a good idea to check my arithmetic and algebra

thank you

To determine the least cost and the least cost mix of on- and off-shore pipe, we need to calculate the cost for both options and compare them.

First, let's calculate the cost for laying pipe offshore. Since the intake facility is 2 miles north of the shoreline and the filtration plant is 1 mile south of the shoreline, the total distance for the offshore pipe would be 3 miles. Given that the cost to lay pipe offshore is $60,000 per mile, the total cost for offshore pipe would be:

Offshore pipe cost = Total distance * Cost per mile
= 3 miles * $60,000 per mile
= $180,000

Next, let's calculate the cost for laying pipe onshore. Since the intake facility and the filtration plant are 3 miles apart horizontally, the total distance for onshore pipe would be 3 miles. Given that the cost to lay pipe onshore is $30,000 per mile, the total cost for onshore pipe would be:

Onshore pipe cost = Total distance * Cost per mile
= 3 miles * $30,000 per mile
= $90,000

Now, we can compare the costs of the two options. The offshore pipe cost is $180,000 and the onshore pipe cost is $90,000.

To determine the least cost and the least cost mix of on- and off-shore pipe, we need to find the option with the minimum cost. Since the onshore pipe cost is lower than the offshore pipe cost, the least cost option is to lay all the pipe onshore.

Therefore, the least cost and the least cost mix of on- and off-shore pipe is to lay all the pipe onshore, with a total cost of $90,000.