What is Calculus I

Optimization?

Using derivatives to find the best possible outcome — maximum profit, minimum cost, shortest path, largest area. The most applied topic in calculus.

Optimization is the process of finding the maximum or minimum value of a function, subject to any given constraints. It's calculus put to work in the real world: a business wants to maximize profit, an engineer wants to minimize material cost, a physicist wants to find the path of least time.

The key insight is that at a maximum or minimum, the function momentarily stops changing — its derivative is zero. So finding the best value reduces to: write a function, differentiate it, set equal to zero, solve.

This simple process underlies machine learning, economics, logistics, structural engineering, and most of applied mathematics. Optimization is what calculus was built for.

🏔️
Standing at the peak

Imagine you're climbing a mountain in thick fog. You can't see the summit, but you can feel the slope under your feet. As long as the ground slopes upward, keep climbing. The moment the ground becomes flat — derivative zero — you're at a local peak. Optimization is exactly this: walk until the slope is zero.

📦
A classic example

You have 40 metres of fencing and want to enclose the largest possible rectangular garden. What dimensions give the maximum area? Without calculus, you might guess. With optimization, you express area as a function of one variable, differentiate, set to zero — and get the exact answer: a square, every time.

1
Identify what to optimize
What quantity do you want to maximize or minimize? Area? Cost? Volume? Time? Name it clearly.
2
Write the objective function
Express the quantity from step 1 as a function. It may initially involve multiple variables.
3
Apply the constraint
Use the given constraint (total perimeter = 40 m, volume = 1 litre, etc.) to eliminate all variables except one.
4
Differentiate and set equal to zero
Find \(f'(x) = 0\). These are the critical points — candidates for max/min.
5
Verify with second derivative or endpoints
Confirm it's a max or min using \(f''(c)\) or by checking the endpoints of the domain.
6
Answer the question fully
State the optimal value and the input that achieves it. Include units. Check the answer makes physical sense.
10.0
40 m of fencing. Area = x(20−x). Drag slider — maximum area at x = 10 m (a square).
Maximize area with 40 m of fencing
Setup
Let width = \(x\), length = \(20 - x\) (since \(2x + 2(20-x) = 40\)).
Objective
\(A(x) = x(20 - x) = 20x - x^2\)
Differentiate
\(A'(x) = 20 - 2x\)
Set = 0
\(20 - 2x = 0 \Rightarrow x = 10\)
Verify
\(A''(x) = -2 < 0\) → concave down → local maximum ✓
Answer
Width = 10 m, length = 10 m (a square). Maximum area = \(10 \times 10 = 100\) m².
Minimum material
Can of volume 1 L — minimize surface area
Express \(SA\) in terms of radius \(r\).
Differentiate, set = 0.
Optimal: height = diameter.
Maximum revenue
\(R(p) = p(200 - 2p)\)
\(R'(p) = 200 - 4p = 0\)
\(p = 50\)
Max revenue at price \(\$50\).
Shortest distance
Closest point on \(y = x^2\) to \((0, 3)\)
Minimize \(D^2 = x^2 + (x^2-3)^2\).
Differentiate, set = 0, solve for \(x\).
Maximum volume
Box from 12×12 sheet, cut corners of size \(x\)
\(V = x(12-2x)^2\)
\(V' = 0\) gives \(x = 2\)
Max volume = 128 units³
✗ Not checking endpoints
On a closed interval \([a, b]\), the global maximum or minimum could occur at the endpoints, not at an interior critical point. Always evaluate \(f(a)\), \(f(b)\), and all critical point values, then compare.
✗ Forgetting to state what the answer means
Finding \(x = 10\) is not the full answer. You must state: "the width is 10 m, the maximum area is 100 m²." Always answer the original question in context — with correct units.
✗ Using two variables without eliminating one
You can only differentiate a function of one variable. If your objective function has two variables (like \(A = xy\)), you must use the constraint to express \(y\) in terms of \(x\) before differentiating.

Ready to test your knowledge?

Optimization is one of the most-tested topics in Calculus I on BUders.

Go to Calculus I Quizzes →