Find Maximum Garden Area with Fixed Perimeter

Geometry: Area & Volume 9th-10th Grade
PROBLEM
Simon has 160 meters of fencing to build a rectangular garden. The garden's area (in square meters) as a function of width x (in meters) is A(x)=-x(x-80). What is the maximum area possible?

What This Problem Teaches

  • Finding the vertex of a quadratic function to locate maximum or minimum values
  • Understanding how geometric constraints translate into algebraic functions
  • Recognizing that optimization problems often reduce to finding extrema of quadratics
  • Connecting the mathematical result to the physical meaning (optimal garden dimensions)
  • Working with functions in both factored and standard form

Visualizing the Problem

The area function A(x) = -x(x-80) represents a downward-opening parabola. The maximum area occurs at the vertex of this parabola.

Simon has 160 meters of fencing to build a rectangular garden. The garden's area (in square meters) as a function of...

Solution: Method 1 — Finding the Vertex Directly

Since we have the area function A(x) = -x(x-80) in factored form, we can find the maximum by locating the vertex of this downward-opening parabola.

Step 1 — Identify the zeros of the function

The function A(x) = -x(x-80) equals zero when either factor is zero:

x = 0 or x - 80 = 0
x = 0 or x = 80

So the parabola crosses the x-axis at x = 0 and x = 80.

Step 2 — Find the vertex x-coordinate

For a parabola, the vertex lies exactly halfway between the two zeros. The x-coordinate of the vertex is:

x = (0 + 80)/2 = 40

Step 3 — Calculate the maximum area

Substitute x = 40 into the area function:

A(40) = -40(40 - 80)
A(40) = -40(-40)
A(40) = 1600
The maximum area is 1600 square meters.

Solution: Method 2 — Using the Vertex Formula

Let's solve this by first expanding the function into standard form, then applying the vertex formula.

Step 1 — Expand the area function

Starting with A(x) = -x(x-80), we can expand this:

A(x) = -x(x - 80)
A(x) = -x² + 80x

Now we have the function in standard form: A(x) = -x² + 80x + 0.

Step 2 — Apply the vertex formula

For a quadratic function f(x) = ax² + bx + c, the x-coordinate of the vertex is x = -b/(2a).

Here, a = -1, b = 80, and c = 0:

x = -b/(2a) = -80/(2(-1)) = -80/(-2) = 40

Step 3 — Calculate the maximum area

Substitute x = 40 into the area function:

A(40) = -40² + 80(40)
A(40) = -1600 + 3200
A(40) = 1600
The maximum area is 1600 square meters.

Verification

Let's verify our answer by checking that the dimensions make sense and satisfy the constraint.

Check the dimensions: If the width is 40 meters, what is the length?

From the original factored form A(x) = -x(x-80), we can see that when x = 40:

A(40) = -40(40 - 80) = -40(-40) = 40 × 40 = 1600

This means the length is also 40 meters (since area = width × length = 40 × 40 = 1600).

Check the perimeter constraint: With width = 40m and length = 40m:

Perimeter = 2(width + length) = 2(40 + 40) = 2(80) = 160 meters ✓

Check that this is indeed a maximum: Let's test nearby values:

  • At x = 39: A(39) = -39(39-80) = -39(-41) = 1599 square meters
  • At x = 41: A(41) = -41(41-80) = -41(-39) = 1599 square meters

Both values are less than 1600, confirming that x = 40 gives the maximum area.

The Physical Meaning

The mathematical result tells us something beautiful about rectangles: for any fixed perimeter, the rectangle with maximum area is always a square.

With 160 meters of fencing, Simon's optimal garden is a 40m × 40m square with area 1600 m². Any other rectangular shape with the same perimeter will have less area.

Why does this make intuitive sense? Think of it this way: if you have a rectangle that's very long and narrow (like 70m × 10m), you're "wasting" perimeter on the long sides that doesn't contribute much to area. The square shape distributes the perimeter most efficiently between length and width.

Common Pitfalls

Mistake 1: Confusing the constraint with the function

✗ Some students try to maximize the perimeter function 2x + 2y = 160 instead of the area function. The perimeter is fixed at 160m—it's the constraint, not what we're optimizing.

Mistake 2: Forgetting that the function gives area directly

✗ Students sometimes find x = 40 correctly but then think they need to find the length separately. The function A(x) = -x(x-80) is already set up so that when you substitute x, you get the area directly.

Mistake 3: Mixing up maximum and minimum

✗ Since the coefficient of x² is negative (-1), this parabola opens downward and has a maximum at the vertex. Some students confuse this and look for a minimum instead, or think there's no maximum because the function can go to negative infinity.

Mistake 4: Using the wrong vertex formula

✗ When using x = -b/(2a), students sometimes forget the negative sign or use the wrong coefficients. From A(x) = -x² + 80x, we have a = -1 and b = 80, so x = -80/(2(-1)) = 40, not x = 80/2 = 40 (which happens to give the same answer by coincidence).

The General Pattern

This problem exemplifies a broader principle in optimization: constrained optimization problems often reduce to finding the vertex of a quadratic function.

The general pattern is:

  1. Express one variable in terms of another using the constraint
  2. Substitute to get the quantity you want to optimize as a function of one variable
  3. This function is often quadratic
  4. Find the vertex to locate the maximum or minimum

For any rectangle with fixed perimeter P, if the width is x, then:

Length = P/2 - x
Area = x(P/2 - x) = -x² + (P/2)x

The maximum area occurs at x = P/4, making both dimensions equal to P/4.

This is why squares are always the rectangles with maximum area for a given perimeter—and why circular enclosures beat rectangular ones (though that requires calculus to prove rigorously).

What If? Extend Your Thinking

1
Double the Perimeter
Simon has 320 meters of fencing (double the original). The area function becomes A(x) = -x(x-160). What is the new maximum area?
Step 1 — Find the zeros

A(x) = -x(x-160) = 0 when x = 0 or x = 160

Step 2 — Find the vertex

Vertex x-coordinate: (0 + 160)/2 = 80

Step 3 — Calculate maximum area

A(80) = -80(80-160) = -80(-80) = 6400

Step 4 — Verify dimensions

Garden is 80m × 80m. Perimeter: 2(80 + 80) = 320m ✓

Answer: 6400 square meters (exactly 4 times the original, since area scales with the square of linear dimensions)

2
Against a Barn Wall
Simon builds his rectangular garden against a barn wall, so only three sides need fencing. Using 160 meters of fencing, if x is the width of each side perpendicular to the barn, what is the maximum area?
Step 1 — Set up the constraint

Fencing needed: 2x + y = 160, so y = 160 - 2x

Step 2 — Write the area function

A(x) = x × y = x(160 - 2x) = 160x - 2x²

Step 3 — Find the vertex

Using x = -b/(2a) with a = -2, b = 160:
x = -160/(2(-2)) = 40

Step 4 — Calculate dimensions and area

Width: x = 40m, Length: y = 160 - 2(40) = 80m
A = 40 × 80 = 3200

Answer: 3200 square meters (double the area of the original square garden!)

3
Square vs Circle
Simon has 160 meters of fencing. Compare the areas: (a) the optimal rectangle (40m × 40m square), and (b) a circular garden where the fencing forms the circumference. Which gives more area?
Step 1 — Area of optimal rectangle

From the original problem: 1600 square meters

Step 2 — Find radius of circle

Circumference = 2πr = 160, so r = 160/(2π) = 80/π ≈ 25.46m

Step 3 — Calculate circular area

A = πr² = π(80/π)² = π × 6400/π² = 6400/π ≈ 2037

Step 4 — Compare

Circle: ~2037 m²
Square: 1600 m²
Circle is about 27% larger!

Answer: The circular garden has ~2037 square meters, significantly more than the rectangular garden. This illustrates the isoperimetric inequality—among all shapes with the same perimeter, the circle has maximum area.

4
Working Backwards
A rectangular garden has maximum area 2500 square meters when built with a fixed amount of fencing. What was the total length of fencing used, and what are the garden's dimensions?
Step 1 — Use the square property

For maximum area with fixed perimeter, the rectangle must be a square.

Step 2 — Find the side length

If area = 2500 and it's a square: s² = 2500, so s = 50m

Step 3 — Calculate perimeter

Perimeter = 4s = 4 × 50 = 200 meters

Step 4 — Verify with area function

With P = 200, area function is A(x) = x(100-x)
Maximum at x = 50: A(50) = 50 × 50 = 2500 ✓

Answer: 200 meters of fencing creates a 50m × 50m square garden with area 2500 m².

Frequently Asked Questions

How do you find the maximum value of a quadratic function?+

For a quadratic in the form f(x) = ax² + bx + c, the maximum (if a < 0) or minimum (if a > 0) occurs at x = -b/(2a). In this problem, A(x) = -x² + 80x gives x = -80/(2×-1) = 40, yielding maximum area of 1600 square meters. Alternatively, if the quadratic is in factored form like -x(x-80), the vertex lies halfway between the zeros.

Why does a rectangle with fixed perimeter have maximum area when it's a square?+

This follows from the isoperimetric inequality. For any fixed perimeter, the rectangle with maximum area has equal length and width. Intuitively, if one dimension is much larger than the other, you're "wasting" perimeter on the long sides without gaining proportional area. Here, with 160m of fencing, the optimal dimensions are 40m × 40m, creating a square with area 1600 m². Any other rectangular configuration yields less area.

How do you set up the area function from a perimeter constraint?+

Start with the constraint equation. If width is x and length is y, then perimeter gives 2x + 2y = 160, which simplifies to y = 80 - x. Area equals length times width: A = xy = x(80 - x) = -x² + 80x. This quadratic opens downward (negative coefficient of x²), so it has a maximum at the vertex. The factored form A(x) = -x(x-80) makes finding the vertex even easier.

NJ
Neven Jurkovic, PhD

Professor of Computer Science, Palo Alto College, Alamo Colleges District, San Antonio, TX

Developer of Algebrator

Contact

This solution was prepared with AI assistance and reviewed by Dr. Jurkovic for mathematical accuracy and pedagogical clarity.

2026-11-22