Discussion: This student makes use of calculus to solve this extrema problem which comes directly from a Putnam competition. The problem is not entirely straightforward since it requires getting an exact description as a union of intervals of the domain of the function. Once this is obtained standard techniques apply.

Click the image to the left to bring up an enlarged copy of the solution.