Optimization Problem #4 - Maximizing the Area of Rectangular Fence Using Calculus / Derivatives. In this video, I show how a farmer can find the maximum area of a rectangular pen that he can construct given 500 feet of fencing. We can actually solve this quite easily using algebra but here I am trying to show the overall process that we use on maximization / minimization problems.