Step 1:
Define your variables.x = the length of underwater pipe at $50,000 per mile
y = the length of land-based pipe at $30,000 per mile
![]()
C(y) = cost of the project
C(y) = $50,000
+ $30,000(20 - y)
Step 2:
The Domain of the function: Since y is the distance along the coastline, y can be found on the closed interval [0, 20].Step 3: Graph the total cost equation on the interval [0, 20],
C(y) = $50,000
+ $30,000(20 - y)

Step 4: First Derivative test: Set C’(y) equal to zero.
C’(y) =
0 = 
y = -9 and 9
The domain is [0, 20], therefore 9 is the absolute minimum.
Step 5:
Test C(0), C(9), and C(20).
|
y distance |
Total Cost C(y) |
|
0 |
$1,200,000 |
|
9 |
$1,080,000 |
|
20 |
$1,166,190 |
Conclusion: The minimum cost occurs when x = 15 miles and y = 9 miles. The minimal cost is $1,080,000.