Why do I need quadratic equations to fence a garden?
With a fixed length of fence, a deeper garden is a narrower one. Area equals depth times width, and because width shrinks as depth grows, area becomes a quadratic. Its graph is an upside-down parabola, and the top of that curve is the biggest garden your fence can make. The vertex formula finds it exactly.
- Garden area
- 192 m²
- Garden width
- 16 m
- Biggest possible
- 200 m²
Challenge: Build the biggest possible garden (within 1%).
Play
Slide the depth. Watch the garden change shape and the dot climb and fall on the curve.
Challenge: Build the biggest possible garden (within 1%). The box under the picture turns green when you get it.
Stuck? Pick one of the examples from the “Try an example” menu, or press “New example.”
Understand
Area is depth times width. With the fence on three sides, the width is whatever fence is left after the two sides: . So
That's a quadratic with a negative term, so its graph is a hill. The blue dot is your garden. The top of the hill (the vertex) is the biggest garden, at
Too shallow and the garden is a thin strip. Too deep and it's a narrow corridor. The vertex is the balance point.
Use
Every input has a unit menu, so you can type values in the units you already have. Results follow your units.
Show the work
- Area = depth × width
A = x\,(F - 2x) = -2x^2 + Fx - With your numbers
A = 12 \times 16 = 192\ \mathrm{m^2} - Best depth (vertex)
x = -\frac{b}{2a} = -\frac{40}{2(-2)} = 10\ \mathrm{m} - Biggest area
A_{\max} = 200\ \mathrm{m^2}
Export
Enter the fence you actually have and try depths, or read the best depth straight from the "Biggest possible" result. Turn off the wall option for a free-standing pen.
- Leave room for a gate. Subtract its width from the fence length.
- For round or irregular beds, a circle encloses the most area of any shape.
For learning and estimation. Verify with applicable codes, standards, and a qualified professional before using in design, construction, or safety-critical work.
Cheat card
| Symbol | Meaning | Unit |
|---|---|---|
| length of fence you have | m | |
| depth (the two sides touching the wall) | m | |
| garden area | m² |
- Against a wall, the best garden is twice as wide as it is deep.
- Without a wall, the best rectangle is a square.
- Using a wall as one side always gives more area from the same fence.
Where it’s used
- Gardening
Gardeners plan raised beds and vegetable plots to get the most growing room from the fencing they have. - Home Projects
The same math sizes dog runs, patios, and chicken pens.
Related exhibits
- Start here
Pizza value: one large or two mediums?
Area grows with the square of the size. That changes which pizza is the deal.
- Go further
Ladder against a wall: how high will it reach?
A ladder, a wall, and the ground make a right triangle. Pythagoras does the rest.
- Also try
Throwing a ball: the quadratic arc
Every throw, jump, and fountain draws a parabola.
Questions people ask
What shape gives the most area for a fixed fence?
For a rectangle with fence on all four sides, a square. With a wall as one side, a rectangle twice as wide as it is deep.
Why is this a quadratic?
Area is depth × width, and width depends on depth (F − 2x). Multiplying gives −2x² + Fx, a quadratic with a maximum.
How do I find the maximum without a graph?
Use the vertex formula x = −b / (2a). Here a = −2 and b = F, so the best depth is F/4.