Optimization Problems in Calculus: Steps & Examples

#Calculus
TL;DR
Optimization problems in calculus ask for the largest or smallest value of a quantity, such as maximum area, maximum volume, or minimum cost. You write the quantity you care about (the objective) as a function of one variable using a constraint equation, differentiate it, solve f′(x)=0f'(x) = 0 to find the critical points, and confirm whether each is a maximum or a minimum with the second-derivative test or by checking the endpoints of the domain.
BT
Bhanzu TeamLast updated on September 30, 202615 min read

What Are Optimization Problems?

Optimization problems are word problems that ask you to make some quantity as large or as small as possible. In calculus, you solve them by turning the quantity into a function and finding its highest or lowest point. The largest value is a maximum; the smallest value is a minimum; together they are the extreme values of the function.

Every optimization problem has the same two ingredients:

  • The objective. The thing you want to make biggest or smallest: an area, a volume, a cost, a distance, a profit. This becomes the function you differentiate.

  • The constraint. A fixed condition that ties the variables together: a fixed length of fencing, a fixed volume, a fixed budget. This is the equation that lets you rewrite the objective in terms of a single variable.

The geometric idea underneath is simple. At a smooth maximum or minimum, the graph stops rising or falling for an instant, so the tangent line is flat and its slope is zero. Because the derivative measures that slope, the best value hides wherever f′(x)=0f'(x) = 0. Finding these turning points is the same skill covered in maxima and minima and critical points; optimization is where that skill meets a real design question.

How Do You Solve An Optimization Problem Step By Step?

Almost every optimization problem yields to the same six-step workflow. Learn the workflow once and the individual problems stop looking different from each other.

Table: The six-step method for solving an optimization problem.

Step

What you do

Why it matters

1. Draw and name

Sketch the situation and label every unknown with a letter

Turns words into variables you can compute with

2. Write the objective

Write the quantity to maximise or minimise as a formula

Names the function whose peak or valley you want

3. Write the constraint

Write the fixed condition as an equation

Gives the relationship that removes a variable

4. Reduce to one variable

Substitute the constraint so the objective uses a single variable

You can only differentiate a one-variable function

5. Differentiate and solve

Find f′(x)f'(x), set f′(x)=0f'(x) = 0, solve for the critical points

The maximum or minimum sits where the slope is zero

6. Verify and answer

Confirm max vs min, check the domain endpoints, state the answer

A critical point alone is not yet the answer

Two cautions live inside this table. Step 4 is the one students skip: you cannot differentiate an objective that still contains two unknowns, so the constraint must be used to eliminate one of them first. Step 6 is the one students forget: setting f′(x)=0f'(x) = 0 finds a candidate, but you still have to confirm it is the kind of extreme value you wanted and read off what the question actually asked for, often the dimensions, not just the maximum value.

What Are Some Worked Optimization Problems?

Each example below runs the full six-step method. Every derivative is verified, and every maximum or minimum is confirmed with the second-derivative test.

Example 1: Maximum area with a fixed length of fencing.

A farmer has 100100 metres of fencing and wants to enclose a rectangular field along a straight river. The river forms one side, so only the other three sides need fencing. What dimensions give the maximum area?

Let the two sides perpendicular to the river be xx and the side parallel to it be yy. The objective is the area:

A=x⋅yA = x \cdot y

The constraint is that the three fenced sides use 100100 metres: 2x+y=1002x + y = 100, so y=100−2xy = 100 - 2x. Substitute to reduce the area to one variable:

A(x)=x(100−2x)=100x−2x2A(x) = x(100 - 2x) = 100x - 2x^2

Differentiate and set the derivative to zero:

A′(x)=100−4x=0⇒x=25A'(x) = 100 - 4x = 0 \quad\Rightarrow\quad x = 25

Confirm it is a maximum with the second derivative: A′′(x)=−4<0A''(x) = -4 < 0, so the curve is concave down and x=25x = 25 is a maximum. Then y=100−2(25)=50y = 100 - 2(25) = 50, and the domain endpoints x=0x = 0 and x=50x = 50 both give zero area, so the turning point wins.

Final answer: the field is 25 m×50 m25 \text{ m} \times 50 \text{ m}, giving a maximum area of A=25×50=1250 m2A = 25 \times 50 = 1250 \text{ m}^2.

Example 2: Maximum volume of an open-top box.

A square sheet of cardboard measures 1212 inches on each side. You cut a small square of side xx from each corner and fold the flaps up to make an open-top box. What value of xx gives the maximum volume?

After cutting, the base is a square of side (12−2x)(12 - 2x) and the height is xx. The objective is the volume:

V(x)=x(12−2x)2=4x3−48x2+144xV(x) = x(12 - 2x)^2 = 4x^3 - 48x^2 + 144x

The domain is 0≤x≤60 \le x \le 6, since the base side cannot be negative. Differentiate:

V′(x)=12x2−96x+144=12(x2−8x+12)=12(x−2)(x−6)V'(x) = 12x^2 - 96x + 144 = 12(x^2 - 8x + 12) = 12(x - 2)(x - 6)

Setting V′(x)=0V'(x) = 0 gives x=2x = 2 or x=6x = 6. The value x=6x = 6 collapses the base to zero, so test x=2x = 2 with the second derivative: V′′(x)=24x−96V''(x) = 24x - 96, and V′′(2)=48−96=−48<0V''(2) = 48 - 96 = -48 < 0, a maximum. Both endpoints x=0x = 0 and x=6x = 6 give zero volume, confirming the interior peak.

V(2)=2(12−4)2=2×64=128V(2) = 2(12 - 4)^2 = 2 \times 64 = 128

Final answer: cut corners of side x=2x = 2 inches for a maximum volume of 128 in3128 \text{ in}^3.

Example 3: Minimum material for a closed cylindrical can.

A closed cylindrical can must hold a volume of 1000 cm31000 \text{ cm}^3. What radius and height use the least metal, that is, the minimum total surface area?

The objective is the surface area of a closed cylinder (two circular ends plus the curved side):

S=2πr2+2πrhS = 2\pi r^2 + 2\pi r h

The constraint is the fixed volume: πr2h=1000\pi r^2 h = 1000, so h=1000πr2h = \dfrac{1000}{\pi r^2}. Substitute to reduce SS to the single variable rr:

S(r)=2πr2+2πr⋅1000πr2=2πr2+2000rS(r) = 2\pi r^2 + 2\pi r \cdot \frac{1000}{\pi r^2} = 2\pi r^2 + \frac{2000}{r}

Differentiate and set to zero:

S′(r)=4πr−2000r2=0⇒4πr3=2000⇒r3=500πS'(r) = 4\pi r - \frac{2000}{r^2} = 0 \quad\Rightarrow\quad 4\pi r^3 = 2000 \quad\Rightarrow\quad r^3 = \frac{500}{\pi}

r=(500π)1/3≈5.4193 cmr = \left(\frac{500}{\pi}\right)^{1/3} \approx 5.4193 \text{ cm}

Confirm a minimum: S′′(r)=4π+4000r3>0S''(r) = 4\pi + \dfrac{4000}{r^3} > 0 for every positive rr, so the curve is concave up and this critical point is a minimum. The height follows from the constraint:

h=1000πr2≈1000π(5.4193)2≈10.8385 cmh = \frac{1000}{\pi r^2} \approx \frac{1000}{\pi (5.4193)^2} \approx 10.8385 \text{ cm}

Notice the clean result h=2rh = 2r: the most economical closed can is exactly as tall as it is wide. Since 4πr3=20004\pi r^3 = 2000 means 2000r=4πr2\dfrac{2000}{r} = 4\pi r^2, the minimum surface area is S=2πr2+4πr2=6πr2≈553.58 cm2S = 2\pi r^2 + 4\pi r^2 = 6\pi r^2 \approx 553.58 \text{ cm}^2.

Final answer: radius r≈5.4193 cmr \approx 5.4193 \text{ cm}, height h≈10.8385 cmh \approx 10.8385 \text{ cm} (with h=2rh = 2r), giving a minimum surface area of about 553.58 cm2553.58 \text{ cm}^2.

Example 4: Minimum material for an open-top storage box.

An open-top box with a square base must hold 32000 cm332000 \text{ cm}^3. Material costs are proportional to surface area, so minimising material means minimising the area of the base plus the four sides. What dimensions cost the least?

Let the base be x×xx \times x and the height be hh. The objective (base plus four sides, no top) is:

S=x2+4xhS = x^2 + 4xh

The constraint is the fixed volume: x2h=32000x^2 h = 32000, so h=32000x2h = \dfrac{32000}{x^2}. Substitute:

S(x)=x2+4x⋅32000x2=x2+128000xS(x) = x^2 + 4x \cdot \frac{32000}{x^2} = x^2 + \frac{128000}{x}

Differentiate and set to zero:

S′(x)=2x−128000x2=0⇒2x3=128000⇒x3=64000⇒x=40S'(x) = 2x - \frac{128000}{x^2} = 0 \quad\Rightarrow\quad 2x^3 = 128000 \quad\Rightarrow\quad x^3 = 64000 \quad\Rightarrow\quad x = 40

Confirm a minimum: S′′(x)=2+256000x3>0S''(x) = 2 + \dfrac{256000}{x^3} > 0, concave up, so x=40x = 40 is a minimum. Then h=32000402=320001600=20h = \dfrac{32000}{40^2} = \dfrac{32000}{1600} = 20.

S(40)=402+12800040=1600+3200=4800S(40) = 40^2 + \frac{128000}{40} = 1600 + 3200 = 4800

Final answer: a base of 40 cm×40 cm40 \text{ cm} \times 40 \text{ cm} and height 20 cm20 \text{ cm}, using a minimum of 4800 cm24800 \text{ cm}^2 of material.

How Do You Confirm A Maximum Or Minimum?

Solving f′(x)=0f'(x) = 0 only finds candidates. A flat tangent happens at a peak, at a valley, and sometimes at a plateau that is neither. You must confirm which one you have, and there are two standard ways.

  • The second-derivative test. Evaluate f′′f'' at the critical point. If f′′(c)<0f''(c) < 0 the graph is concave down and cc is a maximum; if f′′(c)>0f''(c) > 0 the graph is concave up and cc is a minimum. This is the quickest confirmation when the second derivative is easy to compute, and it is the one used in all four examples above.

  • The first-derivative test. Check the sign of f′f' on either side of the critical point. A change from positive to negative marks a maximum; negative to positive marks a minimum. Use this when the second derivative is awkward.

Neither test is the whole story, because the true maximum or minimum can sit at the edge of the allowed domain rather than at an interior turning point. When the variable is restricted to a closed interval [a,b][a, b], the closed-interval method (backed by the extreme value theorem) is airtight: evaluate the objective at every critical point and at both endpoints aa and bb, then compare. The largest of those values is the absolute maximum and the smallest is the absolute minimum.

In the fencing and open-box examples the endpoints gave zero, so the interior critical point won, but skipping the endpoint check is exactly how a correct derivative still leads to a wrong final answer. This edge-versus-interior comparison is part of the wider toolkit in applications of derivatives.

Why Do Optimization Problems Work?

Optimization works because a smooth curve cannot switch from rising to falling without going flat in between. That flat instant is the whole trick.

  • A maximum is a hilltop. Just before the peak the function is increasing, so the slope is positive; just after, it is decreasing, so the slope is negative. In between, at the very top, the slope passes through zero. Setting f′(x)=0f'(x) = 0 is nothing more than asking "where does the graph stop climbing?"

  • A minimum is a valley floor. The same argument runs upside down: the slope moves from negative to positive, passing through zero at the lowest point.

  • Concavity tells the two apart. At a hilltop the curve bends downward, so f′′<0f''< 0; at a valley floor it bends upward, so f′′>0f'' > 0. The second derivative reads the shape of the bend and names the extreme value.

The constraint step has a geometric meaning too. Every constraint removes one degree of freedom, collapsing a surface of possibilities down to a single curve you can walk along. Optimization is then just finding the highest or lowest point on that one curve. This is why the method feels the same whether the objective is area, volume, or cost: underneath, you are always locating the turning point of a single-variable function.

Who Invented The Method Of Maxima And Minima?

Finding a best value is older than calculus itself. The idea of setting a rate of change to zero to catch a maximum was worked out before Newton and Leibniz built the derivative.

Two more figures shaped the subject:

  • Johannes Kepler (1571–1630, Germany) studied how to gauge the volume of wine barrels and, in doing so, noticed that near the best proportions the volume barely changes as the shape varies, an early glimpse of the flat tangent at a maximum.

  • Joseph-Louis Lagrange (1736–1813, France and Italy) extended optimization to problems with constraints that cannot be substituted away, inventing the method of multipliers still used for constrained optimization across engineering and economics today.

Where Are Optimization Problems Used In The Real World?

The same "make it biggest or smallest" question runs through nearly every quantitative field.

  • Packaging and manufacturing: designing a can, carton, or bottle that holds a required volume with the least material, exactly the cylinder and box problems above, saves money on every unit produced.

  • Logistics and delivery: routing trucks and scheduling deliveries to minimise total distance, time, or fuel is optimization on a large scale.

  • Economics and business: a firm maximises profit or minimises cost by setting marginal revenue equal to marginal cost, which is the f′(x)=0f'(x) = 0 condition in disguise.

  • Machine learning: training a model means minimising a loss function, and the algorithm literally follows the slope downhill toward the minimum, a numerical cousin of setting the derivative to zero.

  • Engineering and architecture: choosing beam dimensions for maximum strength with minimum weight, or shaping a structure to minimise stress, are optimization problems with physical constraints.

One method, find where the rate of change vanishes, quietly decides the shape of a soda can, the route of a delivery van, and the settings of a learning machine.

What Are The Most Common Mistakes With Optimization Problems?

These four errors account for most lost marks on optimization, and each matches a question real students ask on r/calculus, r/learnmath, and university calculus-pitfalls handouts. Most of them are setup errors, not calculus errors.

Differentiating before reducing to one variable.

Where it slips in:

A student writes the objective with two unknowns still in it, such as A=xyA = xy, and tries to differentiate straight away.

Don't do this:

Do not differentiate a formula that contains more than one variable. There is no single derivative of xyxy with respect to one letter while the other floats free.

The correct way:

Use the constraint first to eliminate a variable, turning A=xyA = xy into A(x)=x(100−2x)A(x) = x(100 - 2x), and only then differentiate.

Optimising the constraint instead of the objective.

Where it slips in:

A student differentiates the fixed condition (the perimeter or the volume equation) rather than the quantity the question asks to maximise or minimise.

Don't do this:

Do not set the derivative of the constraint to zero. The constraint is fixed; it never changes, so it has no maximum to find.

The correct way:

Keep the two roles straight: the objective is what you differentiate, the constraint is what you substitute. Label them before you compute.

Ignoring the domain and its endpoints.

Where it slips in:

A student finds an interior critical point and stops, without asking whether the variable is limited to an interval or whether the endpoints give a larger or smaller value.

Don't do this:

Do not assume the critical point is automatically the answer. On a closed interval the extreme value can sit at an endpoint.

The correct way:

State the domain from the physical situation (a length cannot be negative), then compare the critical-point value against the values at both endpoints, as the extreme value theorem requires.

Not answering the actual question.

Where it slips in:

A student solves f′(x)=0f'(x) = 0, gets x=2x = 2, and writes that as the final answer, when the question asked for the maximum volume or the full dimensions.

Don't do this:

Do not stop at the critical value of xx. That number is usually an input, not the quantity being optimised.

The correct way:

Substitute the critical value back to report exactly what was asked: the maximum volume V(2)=128 in3V(2) = 128 \text{ in}^3, or the dimensions in full. Re-read the final sentence of the problem before writing your answer.

Practice Problems On Optimization Problems

Work each one with the six-step method, then check against the answer. Every answer is verified.

  1. Find two positive numbers whose sum is 2020 and whose product is a maximum.
    (Answer: both numbers are 1010; maximum product 100100.)

  2. A rectangle has a fixed perimeter of 4040 m. What dimensions give the maximum area?
    (Answer: a 10 m×10 m10 \text{ m} \times 10 \text{ m} square; maximum area 100 m2100 \text{ m}^2.)

  3. An open-top box is made by cutting equal corner squares of side xx from an 18×1818 \times 18 inch sheet. Find xx for maximum volume.
    (Answer: x=3x = 3 in; maximum volume 432 in3432 \text{ in}^3.)

  4. A rectangle of fixed area 100 m2100 \text{ m}^2 is to be fenced. What dimensions use the least fencing?
    (Answer: a 10 m×10 m10 \text{ m} \times 10 \text{ m} square; minimum perimeter 4040 m.)

  5. A closed cylinder must hold 500 cm3500 \text{ cm}^3. Find the radius that minimises surface area.
    (Answer: r=(5002π)1/3≈4.3013 cmr = \left(\tfrac{500}{2\pi}\right)^{1/3} \approx 4.3013 \text{ cm}, with h=2r≈8.6026 cmh = 2r \approx 8.6026 \text{ cm}.)

  6. A rectangular field beside a river is fenced on three sides with 200200 m of fencing. Find the dimensions of maximum area.
    (Answer: 100 m100 \text{ m} along the river by 50 m50 \text{ m} deep; maximum area 5000 m25000 \text{ m}^2.)

Where Should You Go Next After Optimization Problems?

Optimization pulls together several derivative skills, and each of these is a natural next door.

  1. Maxima and minima. Go deeper on the turning-point theory that every optimization problem rests on, including local versus absolute extremes.

  2. Second-derivative test. Master the concavity check that confirms whether a critical point is the maximum or the minimum you wanted.

  3. Related rates. The other great applied-derivative topic, where a constraint links quantities that change together over time.

If your child is meeting applied max-and-min problems for the first time, a live Bhanzu trainer teaches optimization from the setup up, so the word problem stops being the hard part, in the Bhanzu math program.

Was this article helpful?

Your feedback helps us write better content

Frequently Asked Questions

What are optimization problems in calculus?
They are problems that ask for the maximum or minimum value of a quantity, such as the largest area or the lowest cost. You write the quantity as a function of one variable, differentiate it, and solve f′(x)=0f'(x) = 0 to find where the function turns.
What are the steps to solve an optimization problem?
Draw and label the situation, write the objective (what to maximise or minimise), write the constraint, use the constraint to reduce the objective to one variable, differentiate and solve f′(x)=0f'(x) = 0, then confirm max versus min and check the endpoints before stating the answer.
How do I know if a critical point is a maximum or a minimum?
Use the second-derivative test: if f′′(c)<0f''(c) < 0 the point is a maximum, and if f′′(c)>0f''(c) > 0 it is a minimum. Alternatively, check whether f′f' changes from positive to negative (maximum) or negative to positive (minimum) around the point.
Why do you set the derivative equal to zero in optimization problems?
Because at a smooth maximum or minimum the tangent line is flat, so its slope, which the derivative measures, is zero. Solving f′(x)=0f'(x) = 0 locates every candidate turning point on the curve.
Do I always need to check the endpoints?
Yes, whenever the variable is limited to a closed interval. The extreme value theorem guarantees the absolute maximum and minimum occur at either a critical point or an endpoint, so you compare all of them and pick the largest and smallest.
Why are optimization problems considered hard?
Most of the difficulty is in the setup, not the calculus. Translating the words into an objective and a constraint, then reducing to one variable, is where most errors happen; the differentiation itself is usually routine.
✍️ Written By
BT
Bhanzu Team
Content Creator and Editor
Bhanzu’s editorial team, known as Team Bhanzu, is made up of experienced educators, curriculum experts, content strategists, and fact-checkers dedicated to making math simple and engaging for learners worldwide. Every article and resource is carefully researched, thoughtfully structured, and rigorously reviewed to ensure accuracy, clarity, and real-world relevance. We understand that building strong math foundations can raise questions for students and parents alike. That’s why Team Bhanzu focuses on delivering practical insights, concept-driven explanations, and trustworthy guidance-empowering learners to develop confidence, speed, and a lifelong love for mathematics.
Related Articles
Book a FREE Demo ClassBook Now →