Math With AmarA C A D E M Y

Calculus I · 12 minute lesson

Use a derivative to find the largest rectangle

Model a fixed-perimeter rectangle, find a critical point, and justify that it gives the greatest area.

Lesson 7 of 12 in Calculus. Take the time you need; the lesson estimate is a guide.

Jump to practice

Learn with Amar

Teaching video

A teaching recording for this chapter has not been published yet. Start with the worked example below and explore the related animations where available.

Browse grades and teaching videos

01 · Read and understand

What you will learn

  • Use a perimeter constraint to express area with one variable.
  • Find an interior candidate by differentiating.
  • Use concavity and endpoint values to justify an absolute maximum.

Before you start

Rectangle area and perimeter, quadratic expressions, and the derivative power rule.

Keep paper nearby. Read the question once for the context, then again to identify what is known and what you need to find.

Start with a question

In a geometry model, 40 m of boundary is available for all four sides of a rectangle. Which dimensions give the greatest enclosed area?

Why this math matters

Optimization connects a goal to a constraint. Here the goal is to maximize area while the total boundary length stays fixed. A derivative identifies where increasing the width stops improving the area, but the domain and a maximum check complete the argument.

Two rectangles with a perimeter of 40 metres: 8 by 12 gives area 96, while 10 by 10 gives area 100 square metres.12 m8 m96 m²10 m10 m100 m²Same perimeter. Different areas.
Two rectangles with a perimeter of 40 metres: 8 by 12 gives area 96, while 10 by 10 gives area 100 square metres. Diagram is illustrative; use the labelled measurements.

Set up the model

A useful answer starts with clear assumptions:

  • The model is a rectangle on a flat plane, and all four sides count toward the 40 m boundary.
  • Widths and lengths may take any positive real value; there are no openings or thicknesses in this idealized model.
  • This is an optimization exercise, not advice for construction, fencing, or structural design.

02 · Work through the example

Follow the reasoning, one step at a time.

Try to predict the next step before reading it. After each calculation, explain why the operation makes sense and how it helps answer the original question.

AI-edited portrait of Amar

Work through it with Amar

See this example unfold.

The complete worked example, one idea at a time.

Text-led walkthrough · no audioAmar’s portrait was edited with AI.

Use a derivative to find the largest rectangle

Paused

Question: Start with the question. Paused.

Question

Start with the question

In a geometry model, 40 m of boundary is available for all four sides of a rectangle. Which dimensions give the greatest enclosed area?

Before you calculate

Read what is known and what you need to find. Make a prediction before moving to the first calculation.

Starts paused. Play advances through the full text at a reading pace; pause whenever you need more time. Previous, Next, and the phase buttons let you set your own pace. Playback pauses when this walkthrough leaves the screen or you switch tabs.

Your device’s reduced-motion setting keeps each phase still. Manual controls remain available. The full written solution stays below.

  1. Use the fixed boundary

    2L + 2w = 40; L = 20 − w

    Let L and w be numerical lengths in metres. Positive side lengths require 0 < w < 20. A wider rectangle must be shorter because its perimeter cannot change.

  2. Write area using one input

    A(w) = w(20 − w) = 20w − w²

    A is measured in square metres. Writing L in terms of w ensures every candidate respects the boundary constraint.

  3. Find a critical point

    A′(w) = 20 − 2w; 20 − 2w = 0 gives w = 10

    The derivative is positive for w < 10 and negative for w > 10. Area increases up to 10 m, then decreases after it.

  4. Justify the maximum

    A″(w) = −2; A(10) = 100 m²

    The area function is concave down throughout the interval. Extending it to the closed interval [0, 20] gives degenerate endpoint areas of 0, so the interior candidate is also the absolute maximum.

  5. Recover both dimensions

    w = 10 m; L = 20 − 10 = 10 m

    The maximizing rectangle is a square. Checking its perimeter gives 2(10) + 2(10) = 40 m, exactly the stated boundary.

The result

A 10 m by 10 m square gives the maximum area of 100 m².

You can verify the conclusion without calculus by completing the square: A(w) = 100 − (w − 10)². A square is nonnegative, so no permitted width can produce an area above 100 m². The derivative and algebra tell the same story.

Common mistakes to catch

  • Writing L + w = 40 forgets that a rectangle has two sides of each length.
  • A zero derivative gives a candidate; you still need to decide whether it is a maximum, minimum, or neither.
  • If one side were supplied by an existing wall, the constraint would change and so would the maximizing dimensions.

03 · Practice independently

Try it before revealing the answer.

Use paper or a calculator as needed. Write your units and reasoning, then open the hint or explanation to check your approach.

Practice 1

Repeat the four-sided rectangle problem with a total boundary of 60 m. What dimensions maximize area, and what is that area?

Show a hint

L = 30 − w, so A(w) = 30w − w². Set its derivative equal to zero.

Reveal answer and explanation

15 m by 15 m; 225 m²

A′(w) = 30 − 2w = 0 gives w = 15, and L = 15. The quadratic is concave down and its degenerate endpoint areas are zero, so 225 m² is the maximum.

Practice 2

In the original 40 m model, compare an 8 m by 12 m rectangle with the optimum. How much smaller is its area?

Show a hint

Multiply 8 by 12, then subtract the result from 100.

Reveal answer and explanation

4 m² smaller

Its perimeter is 2(8 + 12) = 40 m and its area is 96 m². The difference is 100 − 96 = 4 m², matching (8 − 10)² in the completed-square form.

Take the idea with you

For any optimization exercise, state the quantity to maximize, the constraint, the allowed inputs, and the units. A beautiful derivative calculation cannot rescue a model built from the wrong constraint.

04 · Reflect and continue

Can you explain it in your own words?

Before moving on, explain the main idea without looking at the worked example. Try both practice questions, check your reasoning, and name one mistake you now know how to avoid. Return to a step if you still need support.

Next lesson

Up next: What changes when an integral's endpoint also changes?

Completion is your own study record, not a test score. It stays in this browser, does not sync to another device, and can be removed by clearing browser data.