- Mathematics, four units
How do you find the largest area you can fence with a given length of fence?
To find the largest area with a fixed length of fence, write the area formula using length and width. Use the perimeter constraint to express one variable in terms of the other, producing an area function of one variable. Then differentiate, set the derivative to zero, verify the result gives a maximum, and substitute back to find the dimensions and area.
The topic explained
The Constraint Eliminates a Variable
An optimization problem in 11th grade math is simply a word problem with a derivative in the middle. The challenge is almost always setting up the function before taking the derivative. When you want the largest area with a fixed length of fence, you begin with two unknown dimensions: length and width. Area equals length times width, which has two variables.
You cannot differentiate a function of two variables at this level. You must find the constraint given in the problem, which is the total perimeter. For example, if you have 40 meters of fencing, two lengths plus two widths equal 40. Simplify that relationship to write the width in terms of the length. Substitute this expression into the area formula so that area depends on only one variable.
Differentiate, Solve, and Verify
Once area is a function of a single variable, take the derivative with respect to that variable and set it equal to zero. Solving this equation reveals the critical points. These values represent the candidate dimensions for your enclosure.
Always check that your answer makes physical sense and genuinely maximizes the space. Side lengths must be greater than zero and cannot exceed half the total perimeter. Check the sign of your derivative on both sides of your critical value: if it shifts from positive to negative, you have found a local maximum. Alternatively, verify that the second derivative is negative.
A Concrete Walkthrough
Suppose you have 40 meters of wire fencing to enclose a rectangular vegetable garden on all four sides. Let x be the width and y be the length. The perimeter constraint is 2x plus 2y equals 40, which simplifies to y equals 20 minus x.
Substitute y into the area formula: Area equals x times (20 minus x), or 20x minus x squared. Differentiating gives the derivative 20 minus 2x. Setting this derivative to zero yields 2x equals 20, meaning x equals 10 meters. Substituting back gives a length of 10 meters as well. The maximum area is 100 square meters, forming a square. Remember to answer with the requested quantity and its square units, not just the value of x.
Optimization: Maximizing Enclosed Area
Solve each problem on paper. Write down the constraint equation, express the area as a single-variable function, find the derivative, and state your final answer with units.
Free, no sign-up. The answer key prints on the second page. Regenerating a new worksheet on the same topic needs a free account.
A rectangular paddock is fenced on all four sides using 60 meters of fence. Write the area function A(x) in terms of its width x.
Using your function from item 1, find the width x that maximizes the area, and state the maximum area.
A farmer encloses a rectangular field along a straight riverbank. No fencing is needed along the river. If 80 meters of fence are available, write the area function in terms of the width x perpendicular to the water.
Find the dimensions and maximum area for the riverbank field in item 3.
A gardener uses 120 feet of fencing to create a rectangular garden divided into two equal side-by-side pens sharing an interior fence line. If x is the width of the shared divider, express the total area in terms of x.
Determine the dimensions that maximize the two-pen garden in item 5.
Common questions
Why is a square always the maximum area for a regular four-sided fence?
When a rectangle has a fixed perimeter, symmetry balances the product of its factors. Algebraically, the derivative of the area function A(x) = (P/2)x - x^2 is zero when x equals one-fourth of the perimeter, making length and width equal.
What happens if one side is an existing building or wall?
When a wall eliminates one side, the fence only covers two widths and one length. The optimal rectangle is no longer a square; instead, the side running parallel to the wall is exactly twice as long as each perpendicular side.
How can I prove my critical point is a maximum rather than a minimum?
You can test the derivative value slightly to the left and right of your critical point to see if the slope changes from positive to negative. You can also evaluate the second derivative: if it is negative everywhere on the domain, the curve is concave down, confirming a maximum.
What is the most frequent error students make on these optimization problems?
Students often stop after finding the value of x. Test questions typically ask for the maximum area itself or the full dimensions. Always re-read the prompt, substitute your critical point back into the appropriate formula, and include proper units.

Still have a question? Ask Lessi
Any question about this subject. Lessi answers right here, step by step.
Try asking
Asking needs a free account; your question is kept while you sign up. Answers are written by AI and can contain mistakes. Lessi doesn’t give medical or legal advice.
Learn it with a teacher
Learn this topic live with Lessi
Lessi, the AI teacher, explains it out loud on a board, with short quizzes, at your pace. The first 60 minutes are free.
Private teachers for Mathematics
Teachers on Lessoons, online or face to face. Each profile opens on the Lessoons site.
Featured teacher דביר הראלMathematics teacher₪200 / hourרמת גןבואו להתחיל איתי את השנה החדשה בתחושת ביטחון עצמי והבנה מעמיקה של החומר! אצלי גדלים מנצחים. אני הייטקיסט בעל רקע רב שנים בהוראת מתמטיקה בתיכון, מדעי המחשב ואנגלית.Full profile
גל חכם אהרוןMathematics teacher₪150 / hourירושליםבוגרת תואר ראשון במשפטים ובכלכלה מהאוניברסיטה העברית, ומרצה במכינה האוניברסיטאית של האוניברסיטה העברית.Full profile
אופיר מאגדיMathematics teacher₪200 / hourתל אביב -יפופרונטלי+ZOOM. הכנה מהירה ותכליתית לבחינה! מורה פרטי מצוין!!! רק למקצועות: המימון, ניהול פיננסי, שוק ההון ושמאות מקרקעין. יש מאות המלצות!Full profile
אבירם יעקביאןMathematics teacher₪230 / hourראשון לציוןבוגר מתמטיקה בהצטיינות מהטכניון, מרצה ומתרגל מצטיין. בעל ניסיון עשיר ורב שנים. מלמד מתמטיקה בגובה העיניים, סבלני ואיכפתי:)Full profile
יוחאי אMathematics teacherרמת גןסטטיסטיקאי ומוסמך MBA מסייע בעיבודים סטטיסטיים ומעביר שיעורים פרטיים (ליחיד או לקבוצות קטנות).Full profile
שי קמחיMathematics teacher₪200 / hourחיפהבוגר תואר שני עם שנות ניסיון בהוראה , רצון גדול להוביל להצלחות. .Full profile
בנימין דוידובMathematics teacher₪120 / hourאשקלוןמורה פרטי למתמטיקה/פיזיקה מזה כשבע שנים המלמד בצפון ובדרום - מגיש לבגרויות בכל הרמות טלפון - **********Full profile
יובל שפיראMathematics teacher₪80 / hourעתליתיובל, בת 23 מעתלית, בוגרת 5 יח״ל מתמטיקה בציון 95, בעלת ניסיון בהדרכה והוראה. מציעה תגבור, הכנה למבחנים וחיזוק הבסיס. סבלנית, אחראית וניידת עם רכב 😊Full profile