WhatsApp us
University Maths25 Nov 2026

Optimization Problems in Calculus: Setup, Worked Examples and Practice

How to set up and solve optimization problems in Calculus I, how to justify that an answer is the absolute maximum or minimum, six worked examples from fencing to a river crossing, the errors that lose marks and practice with answers.

Optimization Problems in Calculus: Setup, Worked Examples and Practice

An optimisation problem asks for the largest or smallest value of some quantity (area, volume, distance, time, material) subject to a condition. You solve it by writing the quantity as a function of one variable, finding where its derivative is zero, and then proving that this point really gives the absolute maximum or minimum on the allowed domain. The last step is where most written solutions lose marks, so every example below shows the justification as well as the calculus.

A five-step setup that works every time

  1. Name the target. What is being maximised or minimised? Write it as a formula, even if it has two variables at first, such as A = LW.
  2. Use the constraint. The fixed quantity (fencing length, volume, a curve the point lies on) links the variables. Solve it for one variable and substitute, so the target becomes a function of one variable.
  3. State the domain. Physical limits give an interval: lengths can't be negative, a cut can't be wider than half the sheet. Write it down.
  4. Differentiate and solve f′(x) = 0. Keep only critical points inside the domain.
  5. Justify and answer. Use the closed interval method, or a first or second derivative argument, then answer the question asked, with units.

Optimisation usually comes right after related rates in Calculus I. Our college maths tutoring page for US students explains how online sessions with Ajay Vatsyayan support students through the applications-of-derivatives unit.

How to prove your answer is the absolute extremum

situationmethodwhat to write
continuous function on a closed interval [a, b]closed interval methodevaluate f at every critical point and both endpoints; the largest value is the max
open interval or (0, ∞), one critical pointfirst derivative testf′ changes from + to − (max) or − to + (min) there, so it is the absolute extremum
open interval, one critical point, f″ easysecond derivative testf″ < 0 means max, f″ > 0 means min; with only one critical point this is absolute
f″ = 0 at the critical pointfall back on the first derivative testthe second derivative test is inconclusive

A local extremum is not automatically absolute. The "only one critical point" condition is what lets you upgrade it, so state it.

Type 1: fencing with a fixed perimeter

A farmer has 480 m of fencing to make a rectangular enclosure split into three equal pens by two internal fences parallel to the shorter sides. What dimensions give the largest total area?

Let W be the shorter side and L the longer side. The fencing covers two lengths and four widths (two outer, two internal):

2L + 4W = 480, so L = 240 − 2W

Target: A = LW = W(240 − 2W) = 240W − 2W², on the domain 0 ≤ W ≤ 120.

A′(W) = 240 − 4W = 0 gives W = 60, so L = 120.

Closed interval check: A(0) = 0, A(120) = 0, A(60) = 7200. The maximum area is 7200 m², with the enclosure 120 m by 60 m.

Type 2: the open-top box

Squares of side x are cut from the corners of a 30 cm by 48 cm sheet, and the sides folded up to make an open box. Find the largest possible volume.

V(x) = x(30 − 2x)(48 − 2x), with 0 ≤ x ≤ 15 (the short side limits the cut).

Expanding and differentiating:

V′(x) = 12x² − 312x + 1440 = 12(x² − 26x + 120) = 12(x − 6)(x − 20)

The critical points are x = 6 and x = 20, but 20 is outside the domain, so discard it. V(0) = V(15) = 0 and V(6) = 6 × 18 × 36 = 3888.

The largest volume is 3888 cm³, with 6 cm squares cut out. Students who forget the domain sometimes pick x = 20, which would need a sheet wider than 40 cm.

Type 3: a can with unequal material costs

A closed cylindrical can must hold 500 cm³. The top and bottom are made of material three times as expensive per cm² as the side. What shape minimises the material cost?

Take the side to cost 1 unit per cm². Then

C = 3(2πr²) + 2πrh, with πr²h = 500, so h = 500/(πr²)

C(r) = 6πr² + 1000/r, on the open domain r > 0.

C′(r) = 12πr − 1000/r² = 0 gives r³ = 1000/(12π) = 500/(6π), so r ≈ 2.98 cm.

Then h = 500/(πr²) = 6r ≈ 17.9 cm. The second derivative C″(r) = 12π + 2000/r³ is positive for every r > 0, and r ≈ 2.98 is the only critical point, so this is the absolute minimum (about 503 cost units).

Compare: if all surfaces cost the same, the same method gives h = 2r (r ≈ 4.30 cm, h ≈ 8.60 cm). Expensive ends push the design towards a tall, thin can. Questions often ask for this ratio h/r rather than the numbers.

Type 4: the closest point on a curve

Find the point on y = √x closest to (4, 0).

Minimise the square of the distance instead of the distance itself: it has the same minimiser and no square root.

D² = (x − 4)² + (√x)² = (x − 4)² + x, for x ≥ 0

d/dx (D²) = 2(x − 4) + 1 = 0 gives x = 7/2.

The derivative is negative before 7/2 and positive after, so this is the absolute minimum. The closest point is (3.5, √3.5) ≈ (3.5, 1.871), at distance √3.75 ≈ 1.936.

Type 5: crossing a river (time, with a square root)

A swimmer on one bank of a 300 m wide river wants to reach a point B on the far bank, 1000 m downstream. She swims at 2 m/s and runs at 5 m/s. Where should she land to minimise her total time? (Ignore the current.)

Let her land x metres downstream of the point directly opposite. She swims √(300² + x²) and runs 1000 − x.

T(x) = √(90000 + x²)/2 + (1000 − x)/5, for 0 ≤ x ≤ 1000

T′(x) = x/(2√(90000 + x²)) − 1/5 = 0

So 5x = 2√(90000 + x²). Squaring: 25x² = 360000 + 4x², so 21x² = 360000 and x = √(360000/21) ≈ 130.9 m.

Closed interval check: T(0) = 150 + 200 = 350 s, T(1000) ≈ 522.0 s and T(130.9) ≈ 337.5 s. She should land about 131 m downstream, for a total time of about 337.5 s.

Squaring can introduce false solutions, so always check the critical point in the original equation; here x must be positive, which it is.

Type 6: the largest rectangle inside an ellipse

Find the largest rectangle, with sides parallel to the axes, inscribed in the ellipse x²/16 + y²/9 = 1.

Let (x, y) be the corner in the first quadrant. The area is A = 4xy, with y = 3√(1 − x²/16).

A(x) = 12x√(1 − x²/16), for 0 ≤ x ≤ 4

Setting A′(x) = 0 gives x² = 8, so x = 2√2 and y = 3/√2. Endpoints give A = 0, so the maximum area is 4(2√2)(3/√2) = 24.

The general result is 2ab for x²/a² + y²/b² = 1, a useful check.

Mistakes markers penalise

  • No domain. Without it you can't reject x = 20 in the box, and you can't use the closed interval method.
  • No justification. "f′ = 0 at x = 60, so the max is 7200" is incomplete. Add the endpoint values, or a derivative sign argument.
  • Two variables left in the target. Differentiate only after the constraint has removed one.
  • Forgetting endpoints when the answer is at an endpoint. In practice question 5 below, the maximum is at an endpoint, with no critical point involved.
  • Answering the wrong thing. The question may want dimensions, the point, the value or the ratio. Reread the last line.
  • Rounding too early. Keep r³ = 500/(6π) exact until the final step; rounding r first changes h.

Practice problems

  1. Two positive numbers add to 40. Maximise the product of the square of one with the other.
  2. Find the absolute maximum of f(x) = x e^(−x/2) on [0, 6].
  3. An open-top box with a square base must hold 32,000 cm³. Find the dimensions that use the least material.
  4. Find the point on the line y = 2x + 1 closest to (5, 0).
  5. A 60 cm wire is cut in two. One piece is bent into a square, the other into a circle. How should it be cut to minimise the total area enclosed, and how to maximise it?

Answers:

  1. x²(40 − x) is largest at x = 80/3; the numbers are 80/3 and 40/3, with product 256000/27 ≈ 9481.5.
  2. f′(x) = e^(−x/2)(1 − x/2) = 0 at x = 2. f(2) = 2/e ≈ 0.736, f(0) = 0, f(6) ≈ 0.299, so the maximum is 2/e.
  3. Surface area x² + 128000/x is least at x = 40 cm, with height 20 cm (4800 cm² of material).
  4. (0.6, 2.2), at distance √24.2 ≈ 4.919 (which matches the point-to-line formula 11/√5).
  5. Minimum: use 240/(π + 4) ≈ 33.6 cm for the square, total area ≈ 126.0 cm². Maximum: no cut at all, all wire to the circle, area 900/π ≈ 286.5 cm² (an endpoint).

Every answer above was checked in Python (sympy).

What optimisation leads to

The single-variable version here becomes constrained optimisation in several variables in Calculus III, where you can't always substitute the constraint away: Lagrange multipliers, step by step handles exactly that, and the advanced calculus tutoring page covers the multivariable course. The derivative skills needed here grow out of limits, covered in the epsilon-delta definition of a limit, and the setup habits match related rates problems: draw, label, link the variables, then differentiate.

In Calculus II the integration techniques take over, from integration by parts to partial fractions and trig substitution.

How Maths Bodhi helps

Most optimisation errors happen before any calculus: in the diagram, the constraint and the domain. In online sessions we give you fresh word problems, ask you to build the function yourself and then check your justification the way a strict marker would. We teach and review your own attempts; we don't complete graded work. The university maths tutoring hub lists the other courses we support.

Home tuition is available in Gurgaon (Gurugram). Students elsewhere in India and abroad learn with us online. You can book a free demo class.

Written and checked by the Maths Bodhi team (November 2026).

Frequently asked questions

What are the steps to solve optimization problems in calculus?
Write the target quantity, use the constraint to reduce it to one variable, state the domain, solve f′(x) = 0, then justify the absolute max or min.
How do you know if it is a maximum or minimum in an optimization problem?
Compare values at critical points and endpoints on a closed interval, or use the sign of f′ or f″ when there is only one critical point.
Why do we minimise distance squared instead of distance?
The square root is increasing, so both have the same minimiser, and D² is easier to differentiate.
Do I need to check endpoints in optimization?
Yes, on a closed interval; the absolute extremum can sit at an endpoint, as in the wire problem.
What if the critical point is outside the domain?
Discard it; only critical points inside the allowed interval count.
Is optimization in Calc 1?
Yes, it is usually taught in Calculus I as an application of derivatives, often straight after related rates.
optimizationCalculus Iapplications of derivativesmaxima and minimacollege calculus

Related guides

Keep exploring this maths topic

University Maths18 Nov 2026

Related Rates Problems, Step by Step (With Solutions)

A six-step method for related rates problems in Calculus I, six graded worked solutions (balloon, ladder, cone, cars, shadow, rocket camera), a table of the equations that link the variables, common traps and practice with answers.

related ratesCalculus Iimplicit differentiationchain rule

By Maths Bodhi Team

Read guide

University Maths25 Nov 2026

How to Pass Calculus 2 in College: A Unit-by-Unit Plan

Why Calculus II feels harder than Calculus I, what to master in each unit, a weekly routine, a three-week plan for the final, exam-day habits that save marks and a ten-minute self-check with answers.

Calculus IIcalc 2 finalstudy planintegration techniques

By Maths Bodhi Team

Read guide

University Maths25 Nov 2026

Trig Substitution Integrals and Partial Fractions: A Calculus II Guide

How to recognise when an integral needs trig substitution or partial fractions, the three trig substitutions and the decomposition forms in one table, six worked examples including a definite sec substitution and completing the square, errors to avoid and practice with answers.

trig substitutionpartial fractionsCalculus IIintegration techniques

By Maths Bodhi Team

Read guide

University Maths18 Nov 2026

The Epsilon-Delta Definition of a Limit: How to Write the Proof

What the epsilon-delta definition of a limit actually says, a two-stage method for writing the proof, five graded worked examples (linear to non-existence), the δ-choice rules for each function type and practice with answers.

epsilon delta prooflimitsCalculus Icontinuity

By Maths Bodhi Team

Read guide

University Maths25 Nov 2026

Lagrange Multipliers Step by Step: Worked Examples With One and Two Constraints

A step-by-step method for Lagrange multipliers, from a single constraint to two constraints and closed regions, with six graded worked examples, the case-splitting that students miss, a method table and practice questions with answers.

Lagrange multipliersconstrained optimisationmultivariable calculuscalculus 3

By Maths Bodhi Team

Read guide

University Maths25 Nov 2026

Taylor Series Expansion and Maclaurin Series: A Complete Guide With Examples

The Taylor series formula, the Maclaurin series to know by heart with their intervals of convergence, four ways to build a series without differentiating ten times, error bounds, series for limits and integrals, six worked examples and practice with answers.

Taylor seriesMaclaurin seriespower seriesCalculus II

By Maths Bodhi Team

Read guide