The rectangular plot in Figure 23 has size 100 ft by 200 ft. Pipe is to be laid from A to a point P on side BC and from there to C. The cost of laying pipe along the side of the plot is $ 50/ft and the cost through the plot is $ 70/ft (since it is underground).

(a) Let f(x) be the total cost, where x is the distance from P to B. Determine f(x), but note that f is discontinuous at x = 0 (when x = 0, the cost of the entire pipe is $ 50/ft). What is the minimal cost?

(b) If the cost along the sides is $ 64/ft, what is the minimal cost?