# A Sheep-pen Problem

The problem is:

A farmer has 60 hurdles, with which she plans to build a sheep-pen. She
wants the area of the pen to be as large as possible. Two hurdles can be
fixed together end-to-end to form a straight line, or to be at right angles;
no other angles are possible.

Where she plans to build the pen, there's a long straight sheep-proof fence.
If the end of a hurdle is next to the fence, she can make a sheep-proof join.
She realises that she can use the fence to form one side of the pen.

What shape should she make the pen?

You may want to try to solve the problem, before you look at the two solutions
below.

Figure 1.

We denote the width of the pen by **a** and its length by **b**, as shown in Figure 1.

The area of the pen is **ab**, and we have **2a + b = 60**.
So, replacing **b** by **60 - 2a**, we find that the area is **a(60 - 2a)**,
which is **60a-2a**^{2}.

We differentiate this with respect to **a**, getting **60 - 4a**. Setting this to
**0** to find the maximum (or maybe minimum) area, we find **a=15, b=30**.

The farmer "borrows" another 60 hurdles. She will mentally build as big a pen as possible
with all 120 hurdles, situate it so that the fence runs through its centre, and then "return"
the 60 hurdles that are on the other side of the fence. She realises that the biggest pen she
can build with 120 hurdles is a square, 30 hurdles to a side. But there are many possibilities
for the orientation of the pen relative to the fence, as shown:

Figure 5.

Figure 4.

Figure 3.

Figure 2.

All of these must have a long side of 30 hurdles, with the remaining hurdles split in any way
(including 30-0 and 15-15) between the two short sides, which are necessarily at right angles to the
long side.

I prefer the symmetry method to the calculus method for several reasons.

- It is easily grasped. I can do it my head. I don't need paper.
- It is less subject to errors. Some people make mistakes when manipulating equations
and differentiating terms.
- It is convincing. Once you have seen it you know that it is right, there
is nothing that needs checking.
- It makes it clear
*why* half the hurdles must be used for the long side,
rather than just churning it out as a result.
- It generates
*all* the solutions, not just one of them.
If you're still not convinced that symmetry can be easier to use than calculus,
try this puzzle:

As above, but instead of 60 short hurdles, she has five long hurdles,
which can be fixed together end-to-end at any angle.
What shape should she make the pen?

If you've understood the symmetry-based solution to the previous problem, you
should find this one easy using symmetry. It's also possible using calculus.

This is one of several pages on using symmetry in mathematics.