Tutorials › AP Calculus › A Multi-Step Geometry Optimization Workshop

Optimization and L'Hôpital's Rule · Tutorial 409 of 999

A Multi-Step Geometry Optimization Workshop

Practice translating geometric constraints into one-variable models, checking every candidate, and explaining why each optimum fits the original situation.

Advanced 10 min read

What You'll Learn

  • Define geometric variables and express dimensions in terms of one variable.
  • Use a diagram’s symmetry only when the conditions justify it.
  • Build area and volume objectives from geometric constraints.
  • Identify the feasible interval, including degenerate boundary cases.
  • Test endpoints and interior critical points before stating an absolute optimum.
  • Check that each calculated optimum satisfies the original geometry.

From a Geometric Description to an Optimum

Many geometry optimization problems begin with a picture and a constraint: a shape must fit inside another shape, or its dimensions must satisfy a fixed relation. The calculus comes after the modeling. First decide exactly what objects are allowed, define variables, and translate the geometry into equations.

Then reduce the quantity to be optimized to a function of one variable. Its feasible interval matters: an endpoint can represent a degenerate shape, and an interior critical point is only a candidate until it has been compared with all other candidates.

Optimization checklist: Define the permitted geometric family; state variables and units; derive the constraint; form a one-variable objective; identify the entire feasible domain; test endpoints and interior critical points; and state the result in the original context.

Why Candidate Testing Is Necessary

If a continuous objective is defined on a closed, bounded interval, it attains an absolute maximum and minimum there. An interior absolute extremum of a differentiable function must have derivative zero. Therefore, to find an absolute optimum on such an interval, check every endpoint and every interior point where the derivative is zero or undefined. A critical point alone does not establish an absolute optimum.

In the examples, dimensions are nonnegative. An endpoint where one dimension becomes zero is allowed as a limiting, degenerate shape for candidate testing, even if the desired physical shape must have positive dimensions. Its objective value still helps rule out a larger interior value.

Worked Example: A Rectangle in a Semicircle

Worked Example: A Rectangle in a Semicircle

A semicircle of radius \(5\) lies above a horizontal diameter. A rectangle has its base on the diameter and lies inside the semicircle. Find the greatest possible area among rectangles whose sides are parallel to the coordinate axes.

Model the geometry carefully. Let the circle’s center be the origin. Write the rectangle’s horizontal extent as \([c-x,c+x]\), where \(2x\) is its full width, \(x\geq 0\), and \(c\) is the horizontal displacement of its center. The upper boundary of the semicircle is \(y=\sqrt{25-u^2}\) at horizontal coordinate \(u\), for \(-5\leq u\leq 5\). Since the rectangle must fit beneath the semicircle, its height \(y\) cannot exceed the height at either upper corner.

At least one of \(|c-x|\) and \(|c+x|\) is at least \(x\): otherwise both endpoints would be less than \(x\) from the origin, which is impossible for two points \(2x\) apart. The semicircle’s height decreases as the absolute horizontal coordinate increases. Consequently, for any displacement \(c\), the rectangle’s height satisfies \(y\leq\sqrt{25-x^2}\). This upper bound is attained when \(c=0\), because then both upper corners have horizontal coordinates \(-x\) and \(x\), and both lie at the same height on the semicircle. Thus, for each fixed half-width \(x\), a centered rectangle gives the greatest possible area. It is therefore sufficient—and justified—to optimize centered rectangles.

For a centered rectangle, the upper-right corner is \((x,y)\) on the circle. The radius to that corner has horizontal leg \(x\), vertical leg \(y\), and length \(5\). Hence \(x^2+y^2=25\), so \(y=\sqrt{25-x^2}\). The area is width times height:

$$ A(x)=2xy=2x\sqrt{25-x^2},\qquad 0\leq x\leq 5. $$

Differentiate for \(0<x<5\):

$$ A'(x)=2\sqrt{25-x^2}-\frac{2x^2}{\sqrt{25-x^2}} =\frac{50-4x^2}{\sqrt{25-x^2}}. $$

The denominator is positive on the interior. Setting the numerator equal to zero gives \(50-4x^2=0\), so \(x^2=25/2\) and \(x=5/\sqrt{2}\). The corresponding height is \(y=\sqrt{25-25/2}=5/\sqrt{2}\). The endpoint areas are \(A(0)=0\) and \(A(5)=0\), whereas the interior candidate has area \(2(5/\sqrt{2})(5/\sqrt{2})=25\). Thus the greatest area is \(25\) square units, attained by a square of side \(5/\sqrt{2}\).

Check: Its corner satisfies \(x^2+y^2=25/2+25/2=25\), so it lies on the semicircle. Substitution into the area formula gives \(A=2xy=25\), as calculated.

Worked Example: A Rectangle in a Right Triangle

Worked Example: A Rectangle in a Right Triangle

A right triangle has vertices \((0,0)\), \((12,0)\), and \((0,9)\). A rectangle has one corner at \((0,0)\), its sides along the coordinate axes, and its opposite corner on the triangle’s hypotenuse. Find the greatest possible rectangle area in this family.

Let \(x\) be the rectangle’s horizontal side and \(y\) its vertical side. The hypotenuse passes through \((12,0)\) and \((0,9)\). Its slope is \((0-9)/(12-0)=-3/4\), so its equation is \(y=9-\frac{3}{4}x\). Therefore the area, expressed using one variable, is

$$ A(x)=xy=x\left(9-\frac{3}{4}x\right), \qquad 0\leq x\leq 12. $$

The interval follows from the horizontal extent of the triangle. At \(x=0\), the rectangle has zero width; at \(x=12\), its height is zero. Differentiate and find interior critical points:

$$ A'(x)=9-\frac{3}{2}x. $$

Solving \(A'(x)=0\) gives \(\frac{3}{2}x=9\), hence \(x=6\). The corresponding height is \(y=9-\frac{3}{4}(6)=9-\frac{18}{4}=9-\frac{9}{2}=\frac{9}{2}\). The candidate’s area is \(6\cdot\frac{9}{2}=27\). At the endpoints, \(A(0)=0\) and \(A(12)=12(9-9)=0\). Thus the absolute maximum is \(27\) square units, attained by a rectangle with dimensions \(6\) by \(\frac{9}{2}\).

Check: The opposite corner \((6,\frac{9}{2})\) satisfies the hypotenuse equation, since \(9-\frac{3}{4}(6)=\frac{9}{2}\). Its area is indeed \(6\cdot\frac{9}{2}=27\).

Worked Example: A Rectangle Beneath a Parabola

Worked Example: A Rectangle Beneath a Parabola

A rectangle has its base on the \(x\)-axis and lies below the parabola \(y=12-x^2\), above the \(x\)-axis. Its vertical sides are parallel to the \(y\)-axis. Find the greatest area for this family of rectangles.

For a rectangle to fit, the height of its top must not exceed the parabola at either endpoint of its base. The parabola is symmetric about the \(y\)-axis, and its height decreases as \(|x|\) increases. For a fixed width, the rectangle’s smaller endpoint height is greatest when its base is centered at the origin. Thus it suffices to consider centered rectangles. Let \(x\geq0\) be the horizontal distance from the origin to the right endpoint. The width is \(2x\), and both upper corners have height \(y=12-x^2\). Nonnegative height requires \(0\leq x\leq\sqrt{12}\).

The area function and its derivative are

$$ A(x)=2x(12-x^2)=24x-2x^3, \qquad A'(x)=24-6x^2. $$

Setting \(A'(x)=0\) gives \(6x^2=24\), so \(x^2=4\). Since \(x\geq0\), the interior candidate is \(x=2\). Its height is \(12-2^2=8\), its width is \(2(2)=4\), and its area is \(4\cdot8=32\). At the endpoints, \(A(0)=0\) and \(A(\sqrt{12})=2\sqrt{12}(12-12)=0\). The greatest area is therefore \(32\) square units.

Check: The top corners are \((-2,8)\) and \((2,8)\). Each lies on the parabola because \(12-(-2)^2=8\) and \(12-2^2=8\). The rectangle’s area is \(4\cdot8=32\), matching the objective value.

Why the Modeling Steps Matter

Each example uses the same mathematical structure, but the geometry determines what the variables mean. In the semicircle problem, \(x\) was a half-width, not the full width. In the triangle problem, \(x\) was the full horizontal side. Choosing a variable without recording its meaning can make an otherwise correct derivative solve the wrong model.

A common error is to use the full width of the semicircle rectangle as the horizontal leg of the radius triangle. If \(w\) is the full width of a centered rectangle, its upper-right corner is \(w/2\) units horizontally from the center. The correct constraint is \((w/2)^2+y^2=25\), not \(w^2+y^2=25\). The incorrect relation would give the area model \(w\sqrt{25-w^2}\), whose derivative leads to \(w=5/\sqrt{2}\) and area \(25/2\). That answer is wrong because the corner’s horizontal coordinate is \(w/2\), not \(w\). The corrected relation gives \(y=\sqrt{25-(w/2)^2}\); its maximum occurs at \(w=5\sqrt{2}\), with \(y=5/\sqrt{2}\) and area \(25\).

Symmetry also needs justification. A rectangle in a semicircle or beneath a symmetric curve is not automatically centered merely because the containing shape is symmetric. The first example showed why centering gives the largest height for a fixed width. The third used the same principle for the parabola. Making that reasoning explicit ensures that the one-variable model covers the best possible shape rather than just a convenient special case.

A Reliable Final Check

After finding a candidate, return to the original geometric conditions. Check that the dimensions are nonnegative, that the point or corner satisfies the constraint, and that the reported objective matches the dimensions. Compare every candidate required by the feasible interval, not just the one that looks most plausible.

1
Define the dimensions.
State which geometric length each variable represents and whether it is a full width, half-width, radius, or height.
2
Translate the constraint.
Use the line, circle, curve, or other geometric relation to express one dimension in terms of another.
3
Optimize over the feasible interval.
Differentiate the objective and test all interior critical points together with the endpoints.
4
Interpret and verify.
Give the dimensions and objective with units, then substitute into the original geometric constraint.

Check Your Understanding

For each question, explain how the geometric model supports the calculus, not only what calculation you would perform.

  1. In the semicircle example, why is the radius constraint \(x^2+y^2=25\) when \(x\) denotes half the rectangle’s width?
  2. For the triangle example, what are the feasible values of \(x\), and what geometric shapes do the two endpoints represent?
  3. In the parabola example, why does the centered rectangle have the greatest height among rectangles of the same width?
  4. Why must an interior solution of \(A'(x)=0\) be compared with the endpoint values?
  5. If a variable represents the full width of a centered rectangle, how should its horizontal distance from the center appear in a circle constraint?

Test yourself: AP Calculus practice exams

Ready to check what you know? Work an AP-style practice exam, then open the full solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers all of AP Calculus AB & BC: full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon