Fencing a Rectangular Pen Against a Barn
Farmer Joe has exactly 20 meters of fencing to build a rectangular pen for his sheep. One side of the pen will be placed against a straight barn wall, so he only needs to fence the other three sides. He wants the pen to enclose the largest possible area, and he prefers to use whole-number dimensions for the sides. Additionally, he wants the side perpendicular to the barn wall to be at least 4 meters long so the sheep have enough room to turn around. He is unsure whether the barn wall changes the best shape. He also wonders what the maximum area would be if he had no barn wall and had to fence all four sides using the same 20 meters of fencing. Help Farmer Joe determine the best dimensions with the barn wall, check whether the 4-meter minimum width affects his choice, and compare it to the no-wall case.
1. Find the dimensions that maximize the area of the pen using the barn wall, assuming integer dimensions and the width (perpendicular to wall) is at least 4 meters. Show your reasoning.
Read the worked answer
Let the width perpendicular to the wall be w and the length parallel to the wall be L. Since only three sides are fenced, 2w + L = 20. The area is A = w * L = w(20 - 2w). We need integer w >= 4. Test possible w values: w=4 -> L=12, A=48; w=5 -> L=10, A=50; w=6 -> L=8, A=48; w=7 -> L=6, A=42; w=8 -> L=4, A=32; w=9 -> L=2, A=18; w=10 -> L=0, A=0. The maximum area is 50 when w=5 and L=10. Since w=5 is >=4, the constraint is satisfied. So dimensions: 5 m by 10 m, with the 10 m side parallel to the barn wall. Area = 50 m².
2. Does the 4-meter minimum width change the answer? Explain.
Read the worked answer
The optimal width without the constraint would be w=5 (as found). Since 5 >= 4, the constraint does not change the optimal choice. The maximum area is still 50 m² at w=5, L=10. If the minimum width had been greater than 5, say 6, then the optimal would shift to w=6, L=8, area 48. But with 4, it's fine. So no change.
3. If Farmer Joe had no barn wall and had to fence all four sides with the same 20 meters, what would be the maximum area using integer dimensions? Compare to the barn-wall case.
Read the worked answer
With four sides, perimeter = 2w + 2L = 20, so w + L = 10. Area = w * L = w(10 - w). Test integer w: w=1 -> L=9, A=9; w=2 -> L=8, A=16; w=3 -> L=7, A=21; w=4 -> L=6, A=24; w=5 -> L=5, A=25; w=6 -> L=4, A=24; etc. Maximum area is 25 at w=5, L=5 (a square). This is half the area of the barn-wall case (50 m²). The barn wall effectively gives an extra side of fencing, allowing a larger pen for the same fencing. Also, the optimal shape changes from 5x10 to 5x5. So the barn wall doubles the maximum area.