Optimization — constrained, unconstrained, real-world problems
WHY does the derivative vanish at an extremum?
Deriving the classification test from scratch
We want a way to tell a peak from a valley. Use the Taylor expansion near a critical point (where ):
Since , the leading change is
Why this step? for any small , so the sign of alone decides whether goes up or down on both sides.
Unconstrained vs Constrained — WHAT is the difference?
Why Lagrange multipliers? (geometric derivation)
At a constrained optimum we move along the curve . We can't increase while staying on the curve only when stops changing along the curve — i.e. has no component tangent to . That means is parallel to :
Why this step? is perpendicular to the constraint curve; if is also perpendicular, no tangent direction can improve . The scalar measures how much the optimum would change if the constraint loosened.
The universal recipe (the 80/20 core)

Worked Example 1 — Box of maximum volume (constrained → 1-D)
A 12 cm × 12 cm sheet has equal squares of side cut from each corner; flaps fold up into an open box. Maximize volume.
- Dimensions after folding: base , height .
- , valid for . Why? meaningless, gives negative base.
Differentiate (product rule): Why factor? It instantly reveals roots.
Classify by endpoints: . So gives maximum volume .
Worked Example 2 — Closest point (substitution)
Find the point on the line nearest the origin.
Minimize distance, but minimize instead of . Why? is increasing, so the minimizer is the same and algebra is cleaner. → minimum. Then .
Nearest point: , distance . Sanity check: the segment to this point should be perpendicular to the line (slope vs line slope , product ✓).
Worked Example 3 — Lagrange multipliers
Maximize subject to .
Set with : Why? Both partials of are , so . Constraint gives , so max product .
This recovers the famous result: among numbers with fixed sum, the product is largest when they are equal (AM–GM in disguise).
Recall Feynman: explain to a 12-year-old
Picture a roller-coaster track. At the very top of a hill the track is flat for a split second — that flatness is "the slope equals zero." So to find the highest or lowest spots, find where the track goes flat, then look around to see if it's a hilltop or a dip. If you're stuck on a path (a fence you must walk along), you stop being able to climb higher only when "uphill" points straight across the fence — that's the Lagrange idea.
Flashcards
What must satisfy at an interior extremum of a differentiable function?
Is every critical point an extremum?
Second-derivative test: implies?
Second-derivative test: implies?
When the 2nd-derivative test fails (), what do you use?
Why minimize instead of for distance problems?
Lagrange condition for optimizing s.t. ?
Geometric meaning of ?
In the open-box problem, what domain restricts ?
Max product of two numbers with fixed sum occurs when?
What three categories of points must you compare for a global extremum on ?
What does the multiplier measure physically?
Connections
- Critical Points & Fermat's Theorem
- Second Derivative & Concavity
- Taylor Series Expansion
- Closed Interval Method (Global Extrema)
- Lagrange Multipliers (Multivariable)
- AM-GM Inequality
- Related Rates — both translate words into derivative equations.
Concept Map
Hinglish (regional understanding)
Intuition Hinglish mein samjho
Optimization ka core idea simple hai: kisi quantity ko maximum ya minimum karna hai. Calculus bolta hai — kisi smooth pahaadi ke top ya valley ke bottom par slope ek pal ke liye zero ho jaata hai, yaani . In points ko hum critical points kehte hain. Lekin dhyan rakho: har critical point max ya min nahi hota (jaise at ), isliye usko classify karna zaroori hai — second derivative dekho: matlab minimum (cup), matlab maximum (cap).
Real-world problems mein aksar ek constraint hota hai, jaise "perimeter fixed hai" ya "line par point hona chahiye". Do tareeke: ya to constraint se ek variable nikaal kar baaki sabko ek variable mein convert karo (substitution), ya multivariable case mein Lagrange multipliers use karo — jahan . Iska geometry yeh hai ki optimum par "uphill direction" constraint curve ke perpendicular ho jaata hai, isliye curve ke along aur improve nahi kar sakte.
Steps yaad rakhne ke liye DUCK-DC: Draw, Unknown, Constraint to one variable, Kill the derivative, Discriminate, Check endpoints. Box problem mein humne dekha par volume max (), aur ko reject kiya kyunki base zero ho jaata. Hamesha domain aur endpoints check karo — yeh sabse common galti hai jahan students marks gawate hain.