Calculus

Solve an optimization problem with derivatives

Optimization turns a constrained quantity into a one-variable objective, uses derivatives to locate candidates, and compares those candidates within the feasible domain.

Author
VibeMath Editorial TeamOriginal AI-assisted lesson content edited for clarity, accessibility, and product-truth accuracy.
Math reviewer
VibeMath Math ReviewIndependent equation, example, substitution, units, scope, and accessibility checks; not a claim of individual human credentials.
Last reviewed

What you will learn

  • Separate the objective quantity from the constraint that links variables.
  • Use the constraint to write a one-variable objective over a feasible domain.
  • Compare critical points and endpoints before interpreting the optimum.

Build the idea

An optimization problem has a quantity to maximize or minimize and restrictions on what inputs are possible. Mixing those roles makes it difficult to build the correct function.

The constraint eliminates extra variables. Once the objective depends on one variable, its derivative identifies interior points where the rate of change is zero or undefined.

A critical point is only a candidate. The feasible domain and endpoints must also be checked, and the winning input must be translated back into the units and variables of the problem.

A fixed-perimeter rectangle changing shape

Imagine a loop of fencing with total length twenty meters. As one side grows, the adjacent side shrinks, producing narrow rectangles at the ends and a largest area near the balanced middle.

Visual description: Sequence of rectangles with the same perimeter shows area increasing toward a square and decreasing after the sides become unbalanced.
Read as: Two x plus two y equals twenty.
Read as: Area as a function of x equals x times the quantity ten minus x, or ten x minus x squared.

Worked example

Problem

A rectangle has perimeter twenty meters. Find the side lengths that maximize its area and verify the maximum over the feasible domain.

Strategy

Solve the perimeter constraint for one side, substitute into area, locate derivative-zero candidates, and compare them with the degenerate endpoints.

  1. Step 1

    Divide the perimeter equation by two and solve for y. Nonnegative side lengths restrict x to the interval from zero to ten.

    Read as: y equals ten minus x, with x between zero and ten inclusive.
  2. Step 2

    Differentiate the area function and set the derivative equal to zero. Ten minus two x equals zero at x equals five.

    Read as: A prime of x equals ten minus two x, which is zero when x equals five.
  3. Step 3

    The endpoints produce zero area, while x equals five gives y equals five and area twenty-five square meters.

    Read as: A of zero is zero, A of five is twenty-five, and A of ten is zero.

Answer and verification

The maximum-area rectangle is five meters by five meters, with area twenty-five square meters.

The downward-opening quadratic increases before five and decreases after five, and its value exceeds both feasible endpoints, confirming a global maximum.

Common mistakes

  • Differentiating an area expression that still contains both x and y without relating them.

    Use the constraint first so the objective has one independent variable and a clear feasible interval.

  • Stopping as soon as the derivative equals zero.

    A critical point may be a minimum or neither. Compare candidates and endpoints within the actual domain.

Try it yourself

A rectangle has area thirty-six square meters. Minimize its perimeter and identify the side lengths.

Show hint

Use y equals thirty-six over x, write perimeter as two x plus seventy-two over x, and solve where its derivative is zero.

Show answer

The minimum occurs at x equals six and y equals six, giving perimeter twenty-four meters.

Accessible lesson transcript

This reviewed reading order covers the lesson explanation, equations, example, and checks without claiming that a video exists.

  1. Part 1

    Lesson overview

    Optimization turns a constrained quantity into a one-variable objective, uses derivatives to locate candidates, and compares those candidates within the feasible domain. An optimization problem has a quantity to maximize or minimize and restrictions on what inputs are possible. Mixing those roles makes it difficult to build the correct function. Separate the objective quantity from the constraint that links variables.

  2. Part 2

    Visual model and equations

    The constraint eliminates extra variables. Once the objective depends on one variable, its derivative identifies interior points where the rate of change is zero or undefined. Imagine a loop of fencing with total length twenty meters. As one side grows, the adjacent side shrinks, producing narrow rectangles at the ends and a largest area near the balanced middle. Two x plus two y equals twenty. Area as a function of x equals x times the quantity ten minus x, or ten x minus x squared.

  3. Part 3

    Worked example

    A rectangle has perimeter twenty meters. Find the side lengths that maximize its area and verify the maximum over the feasible domain. Solve the perimeter constraint for one side, substitute into area, locate derivative-zero candidates, and compare them with the degenerate endpoints. Divide the perimeter equation by two and solve for y. Nonnegative side lengths restrict x to the interval from zero to ten. Differentiate the area function and set the derivative equal to zero. Ten minus two x equals zero at x equals five. The endpoints produce zero area, while x equals five gives y equals five and area twenty-five square meters. The maximum-area rectangle is five meters by five meters, with area twenty-five square meters. The downward-opening quadratic increases before five and decreases after five, and its value exceeds both feasible endpoints, confirming a global maximum.

  4. Part 4

    Checks, practice, and scope

    A critical point is only a candidate. The feasible domain and endpoints must also be checked, and the winning input must be translated back into the units and variables of the problem. Differentiating an area expression that still contains both x and y without relating them. Use the constraint first so the objective has one independent variable and a clear feasible interval. Stopping as soon as the derivative equals zero. A critical point may be a minimum or neither. Compare candidates and endpoints within the actual domain. A rectangle has area thirty-six square meters. Minimize its perimeter and identify the side lengths. Use y equals thirty-six over x, write perimeter as two x plus seventy-two over x, and solve where its derivative is zero. The minimum occurs at x equals six and y equals six, giving perimeter twenty-four meters. State the objective, constraint, and feasible domain before differentiating. A one-variable model converts the physical restriction into calculus-ready form. Critical points and endpoints must be compared before an optimum is claimed. The example assumes a differentiable model and exact measurements; real design problems may include discrete materials, uncertainty, or additional constraints. Derivative-zero analysis alone does not address objectives with corners, discontinuities, or unbounded feasible regions.

Scope and limitations

  • The example assumes a differentiable model and exact measurements; real design problems may include discrete materials, uncertainty, or additional constraints.
  • Derivative-zero analysis alone does not address objectives with corners, discontinuities, or unbounded feasible regions.