Canadian flagMath101 · Independent Ontario learning libraryCreated and edited by Kamran
Calculus IGrades 9–12University3 min read

Optimization

Optimization uses constraints, derivatives, and endpoint comparisons to find the best feasible value of a model.

Cheat sheet
Optimization turns “largest,” “smallest,” “least costly,” or “most efficient” into a function over a realistic domain.

Objective and constraint

The objective function is the quantity to maximize or minimize. A constraint connects the variables and restricts what is feasible.

The goal is usually to rewrite the objective using one independent variable, then analyze it on the domain allowed by the problem.

A reliable modelling process

  1. Draw and label a diagram when appropriate.
  2. Define variables with units.
  3. Write the objective function.
  4. Write the constraint.
  5. use the constraint to express the objective in one variable.
  6. determine the feasible domain.
  7. find critical numbers and evaluate endpoints.
  8. interpret the optimum in the original context.

Worked example: maximum rectangle area

Why the domain matters

The algebraic formula $20x-x^2$ exists for every real $x$, but negative dimensions or $x>20$ are impossible. Optimization occurs over the feasible model, not the formula's unrestricted mathematical domain.

Endpoints can be optimal, especially when the derivative has no interior critical point.

Closed-interval method

If the objective is continuous on $[a,b]$:

  1. find critical numbers inside $(a,b)$;
  2. evaluate the objective at those numbers and at $a,b$;
  3. compare outputs.

The largest is the absolute maximum and the smallest the absolute minimum on the interval.

Minimum-cost example structure

Suppose total cost is

$$ C(x)=5000+20x+\frac{80000}{x},qquad x>0. $$

Differentiate:

$$ C'(x)=20-\frac{80000}{x^2}. $$

Solving $C'=0$ gives a candidate; the second derivative or a sign chart can classify it. Context may require rounding to a whole production batch and comparing nearby feasible integers.

Classifying a candidate

The first derivative test identifies a minimum when $f'$ changes from negative to positive and a maximum when it changes from positive to negative.

Alternatively, if $f'(c)=0$ and $f''(c)>0$, $c$ is a local minimum; if $f''(c)<0$, it is a local maximum. A zero second derivative is inconclusive.

Geometry formulas and units

Optimization often uses perimeter, area, surface area, or volume. Write units throughout:

  • length: units;
  • area: square units;
  • volume: cubic units.

Dimensional consistency can reveal that the wrong quantity was optimized.

Discrete decisions

Calculus may return a non-integer quantity when only whole items are possible. Evaluate the nearest permitted integers rather than rounding automatically; the better discrete choice may lie on either side.

Also respect minimum order sizes, capacity limits, and other constraints.

Communicating the result

An answer should state the decision variable, the optimized quantity, and units. “$x=10$” is incomplete if $x$ was only an intermediate dimension and the question asked for maximum area.

Include a sentence connecting the calculus result to the original situation.

Common mistakes

Optimizing the constraint instead of the objective. Identify what the question asks to maximize or minimize.

Keeping multiple independent variables. Use the constraint to reduce the model.

Ignoring endpoints or physical restrictions. The optimum may occur at a boundary.

Assuming every critical number is the required optimum. Classify and compare.

Rounding a discrete answer without checking neighbours. Compare feasible candidates.

Quick self-check

  • What exact quantity is being optimized?
  • What constraint connects the variables?
  • Is the objective written in one variable?
  • What is the realistic domain, including endpoints and discrete restrictions?
  • Have all critical and endpoint values been compared?
  • Is the final decision and optimized value stated with units?
Check your understanding

Try it yourself

Hints are part of learning. Open one whenever it makes the next step feel possible.

1 practice question
Question 1Maximize a constrained area · Gentle

A rectangle has perimeter 40 m. Which dimensions maximize its area?

End of lesson

Nice work making it this far.

Understanding grows through return visits. Save this lesson, try the practice, or continue when you are ready.

Lesson complete

That one is yours now.

Optimization is saved to My Learning. Take the win—you earned it.

1Your Math101 collectionlesson completed
Search 464 published lessons, 123 answer guides, courses, and learning tools.
Your experience

Settings

Ontario math tutoringWork with KamranBook ↗