Phase 2 - Lesson 2.5

Optimization in One Variable

Finding maxima and minima with the first- and second-derivative tests, and applying them to profit maximization and utility.

⏱ 55 min● Intermediate🔗 Prereqs: 2.4
↖ Phase 2 hub
Builds on: 2.2-2.3 gave derivatives; optimization is their first big payoff.
Leads to: These ideas generalize to gradients and the KKT conditions of convex optimization (Phase 10).

Learning Objectives

Click a status chip to cycle: Not started → In progress → Studied → Practiced → Needs review → Mastered.

Key Vocabulary

Critical point
A point where f′=0 or f′ is undefined; the only candidates for interior extrema.
Fermat’s theorem
If f has a local extremum at an interior point where it is differentiable, then f′=0 there.
First-derivative test
f′ changing + to − marks a local max; − to + a local min.
Second-derivative test
At a critical point, f″<0 ⇒ local max, f″>0 ⇒ local min, f″=0 inconclusive.
Global (absolute) extremum
The largest/smallest value over the whole domain, possibly at an endpoint.
Concavity
f″>0 means convex (cup up); f″<0 means concave (cap down).

Where extrema can hide

Fermat’s theorem: at an interior local max or min of a differentiable function, the tangent is horizontal, so \(f'(x)=0\). Thus interior extrema occur only at critical points. On a closed interval \([a,b]\) the Extreme Value Theorem guarantees a global max and min exist, and they sit either at a critical point or an endpoint.

Key Idea
Global-extremum recipe on [a,b]: (1) find all critical points inside, (2) evaluate f at them and at both endpoints, (3) the largest value is the global max, the smallest the global min. No calculus theorem beyond this is needed.

Classifying a critical point

Two tests decide whether a critical point is a max, a min, or neither. The first-derivative test reads the sign change of \(f'\); the second-derivative test reads curvature: \(f''\gt 0\) (convex) means a min, \(f''\lt 0\) (concave) means a max.

Worked Example - Classify the critical points of f(x)=x³−3x
1
\(f'(x)=3x^2-3=3(x-1)(x+1)\), so critical points at \(x=\pm1\).
2
\(f''(x)=6x\). At \(x=1\), \(f''=6\gt 0\) → local min \(f(1)=-2\).
3
At \(x=-1\), \(f''=-6\lt 0\) → local max \(f(-1)=2\).
4
Neither is global: \(x^3-3x\to\pm\infty\), so on all of \(\R\) there is no absolute extremum.

Finance link: profit maximization

A firm with revenue \(R(q)\) and cost \(C(q)\) maximizes profit \(\pi(q)=R(q)-C(q)\). Setting \(\pi'(q)=0\) gives the classic condition \(R'(q)=C'(q)\) - marginal revenue equals marginal cost. The second-order condition \(\pi''\lt 0\) (i.e. \(R''\lt C''\)) confirms it is a maximum, not a minimum.

Interactive: hunt the optimum

Common Mistakes to Avoid
  • Assuming every critical point is an extremum - f′=0 can be a saddle/inflection, as x³ at 0.
  • Reporting a local max as the global max without checking endpoints and end-behavior.
  • Forgetting critical points where f′ is undefined (corners), not just where f′=0.
  • Trusting the second-derivative test when f″=0 - it is inconclusive; fall back to the first-derivative test.
Quant Practitioner Tips
  • On a closed interval, always tabulate f at critical points AND endpoints before declaring a global winner.
  • Marginal-equals-marginal (MR=MC) is Fermat’s theorem wearing an economics hat.
  • Concavity (sign of f″) doubles as a max/min classifier and a convexity check for optimization theory.
  • If the second-derivative test stalls (f″=0), examine the sign change of f′ directly.

Knowledge Check

Q1 Easy
At an interior local maximum of a differentiable function, Fermat’s theorem guarantees:
f″=0
f′=0
f=0
f is increasing
Q2 Medium
If f′(c)=0 and f″(c)>0, then c is a:
local maximum
local minimum
saddle point
global maximum
Q3 Medium
A firm maximizes profit π=R−C. The first-order condition is:
R=C
R′=C′ (marginal revenue = marginal cost)
R′=0
C′=0

Practical Exercise

A manufacturer’s profit is \(\pi(q)=-q^3+9q^2-15q-10\) (thousands of dollars) for \(q\in[0,7]\) units (thousands). Find the production level that maximizes profit and the maximum profit.

▶ Show full solution

Differentiate: \(\pi'(q)=-3q^2+18q-15=-3(q^2-6q+5)=-3(q-1)(q-5)\). Critical points \(q=1,5\).

Second derivative \(\pi''(q)=-6q+18\): at \(q=5\), \(\pi''=-12\lt 0\) (local max); at \(q=1\), \(\pi''=12\gt 0\) (local min).

Evaluate candidates and endpoints: \(\pi(0)=-10,\ \pi(1)=-17,\ \pi(5)=15,\ \pi(7)=-17\). The global maximum is at \(q=5\) with profit \(\$15{,}000\).

After the reveal, answer for yourself: Notice the interior local min at q=1 was the WORST candidate. Always compare every critical point and endpoint numerically before crowning the maximum.

Lesson Summary

Interior extrema of a differentiable function occur only at critical points (Fermat), and on a closed interval the global extrema (guaranteed by the Extreme Value Theorem) lie among critical points and endpoints. The first- and second-derivative tests classify each candidate. In economics this is marginal analysis: profit peaks where marginal revenue equals marginal cost.

Formula Sheet Additions

Profit optimum
\[\pi'(q)=R'(q)-C'(q)=0\ \Rightarrow\ R'(q)=C'(q)\]
Marginal revenue equals marginal cost - Fermat’s theorem in economics.

Retrieval Practice

Close the lesson and answer from memory before checking. This is deliberate, effortful recall - the single highest-yield study action.

▶ Show retrieval prompts & answers
Q: Give the recipe for the global max/min of a continuous f on [a,b].
A: Find interior critical points (f′=0 or undefined), evaluate f there and at both endpoints, and pick the largest and smallest values; the Extreme Value Theorem guarantees they exist.
Q: State the second-derivative test and when it fails.
A: At a critical point c: f″(c)<0 gives a local max, f″(c)>0 a local min; if f″(c)=0 it is inconclusive and you use the first-derivative sign-change test instead.

Completion Checklist

Confidence / mastery rating
Personal notes