Four years ago I wrote a post about math education that mentioned the problem of “The Farmer and the Fencing.” The link for the post is here and a sample assignment from an Elementary Algebra (Algebra I) course is here. I mentioned in that post that I’ve used this problem at a variety of levels of mathematics starting with the 7th grade.

For the 7th grade class, we looked at some possible values for the length and width of the pen that was to be constructed from the fencing and made a table of values showing the length, width and area of the pen for each set of values.

The project from the Elementary Algebra class that is linked above addresses the question from a somewhat more sophisticated level, asking the students to introduce variables for the length and width and then substitute in for one of the variables to arrive at an expression for the area as a function of only one of the dimensions. The students can then find the maximum area using a graphing calculator.

In a Pre-Calculus class I taught during the 1999-2000 school year, we covered a unit that considered the parabola as a conic section and included applications on projectile motion and maximum and minimum values. In the Pre-Calculus class, we found the max or min by finding the vertex of the parabola defined at the point and . We didn’t need Calculus to determine this, the can be defined from the vertex form of the equation of a parabola . With a little classical algebra, you can show that .

If you expand

Then

I taught Differential Calculus as a grad student at the University of Maine in 2003 and we covered The Farmer and the Fencing from the perspective of Calculus, in which we differentiate the area equation and set the derivative equal to zero to find the maximum area. The problems can be spruced up a little by dividing the pen into smaller pens using cross-sectional pieces.

In the fundamental problem the maximum area of a simple pen with four sides and no cross-divisions is arrived at by splitting the perimeter equally among the four sides to make a square. If the pen is cross divided in any way, the maximum area comes from a scenario in which half of the perimeter is allocated to the lengthwise pieces and the other half allocated to the any widths.

If there are lengths and widths then the perimeter is represented by . The area is . If we isolate the length in the perimeter equation and substitute it into the area equation, we can then differentiate the area equation for an answer for the general problem of maximum area of a pen with by crosspieces:

Then substituting into the area equation:

So, the area equation is then

Which makes the derivative

.

Setting this equal to zero and solving for :

or

which means that half of the perimeter should be allocated to the widths and the other half to the lengths.

For example, if the farmer has 300 feet of fencing, the maximum area is a square that is 75 feet on each side.

If the pen is split into two smaller pens with a crosswise fence, then the maximum area will allocate 150 feet to the widths (75 feet each) and 150 feet to the three lengths (50 feet each).

When I taught this problem in 1999-2000 I asked myself what might happen if the pen were to be divided on the diagonal creating two triangular pens. Little did I know how much this would complicate such a simple little problem.

The Briggs and Cochran Calculus textbook includes a similar problem in its section on optimization (problem 10c on pg. 214). In a key modification that makes the problem solvable for Calculus I students, they eliminate one of the lengths of the figure by placing the pen against a barn.

This eliminates one of the lengths in the problem. Let’s look at the solution to this problem before we tackle the more general version which requires that both lengths come from the available fencing. In the problem in the textbook, 200 meters of fencing are to be used, so the constraint on the amount of fencing creates the following equation:

If we want to maximize the area of the pen then we need to substitute for one of the variables and find the derivative of the area equation:

In order to substitute we need to isolate one of the variables from the constraint equation. This will involve getting the square root by itself so that we can square both sides of the equation:

This is where this problem differs from the general problem, in that the two terms cancel each other out and allow us to isolate the

We’ll move both terms that contain the to the same side, so that we can factor out and then divide through by

So now our area equation becomes:

OR

Finding the derivative for this is pretty messy and strains the display capabilities of this blog! We’ll do our best to show the work here:

So, combining like terms:

And then cancel a common factor of 8 in the numerator and denominator:

The simplified expression for the derivative is:

So from this we need to set the numerator equal to zero. In the textbook, there is no indication that technology will be necessary to complete the problem, but I don’t see any way around using a graphical solution to finding the root of the derivative. I suppose there is always the cubic formula, but that is truly an anachronism. Here’s what the graph of the derivative looks like with the root indicated:

From the graph, we can conclude that:

and the crosspiece

We’ll look at the diagonal problem without the barn (which leads to a Lagrangian solution) in another post.

Read Full Post »