
Mark H. answered 11/06/19
Tutoring in Math and Science at all levels
Draw a picture first.
Let x be the length of the land segment. Then, we have a right triangle where the hypotenuse is the length of the ocean segment---i.e. the distance from the well to the end of the land segment. One side is the direct line from the well to land (2km), and the third side is 4-x. Using the pythagorean theorem, we can write the equation for the ocean segment:
√(22 + (4-x)2)
Now, write the equation for the cost: Assume that the land cost is 1, and therefor the ocean cost is 2
Cost, C(x) = x + 2 * √(22 + (4-x)2)
To find the minimum C, we take the 1st derivative and set it equal to 0:
Rewrite C(x) = x + 2 * (4 + (4-x)2)1/2
C'(x) = 1 + 2 * (4 + (4-x)2)-1/2(2(4-x)*(-1))
Set this = to 0, rearrange and simplify and solve for x. One of the solutions will be the optimum value for x.
EDIT: I get 2.845 and 5.155 for x. The second one is out of range, and therefore the solution appears to be x = 2.845. Plotting the original function seems to confirm this.
Thought problem: Would it be easier to write the function for cost as a function of the angle between the ocean line and the shore?