Applications of Derivatives — Optimization and Curve Sketching

Optimization and curve sketching use the first and second derivatives of a function to find its largest/smallest values and to draw its graph accurately. Key result: at a smooth maximum or minimum, the derivative equals zero (); the second derivative's sign reveals which it is and how the curve bends. Applies to: maximizing profit, minimizing material or distance, modelling motion, and sketching any differentiable curve. Who/when: rooted in the work of Fermat (1630s) and Newton/Leibniz (1660s–1680s).

The applications of derivatives to optimization and curve sketching exploit the fact that the derivative measures the instantaneous rate of change — the slope of the tangent line — of a function. Where that slope is zero, the function momentarily neither rises nor falls, marking candidate locations for peaks (maxima) and valleys (minima). The second derivative measures how the slope itself changes, revealing concavity (whether the curve bends upward like a cup or downward like a cap) and the inflection points where the bending reverses. These ideas matter because countless practical problems — building the cheapest box, finding the fastest route, maximizing revenue — reduce to locating extreme values of a function. A surprising fact: the maximum of a function can occur where the derivative fails to exist (a sharp corner) or at the edge of the allowed domain, not only where — so the tidy rule "set the derivative to zero" is necessary but never the whole story.

The Core Insight

A differentiable function can only turn around — switch from increasing to decreasing or vice versa — at a point where its tangent line is horizontal. Therefore the interesting features of a graph (its hills, valleys, and bends) are encoded in the places where , where is undefined, and where changes sign. Reading these three pieces of information lets you reconstruct the entire shape of a curve and pinpoint its optimal values without plotting hundreds of points.

Formal Statement

Critical Point

A critical point of a function is a number in the domain of at which either

1
⟳A critical point is by definition where the candidate-extremum condition can be met; the two cases correspond to smooth turning points and to corners/cusps respectively.

Here is the derivative of evaluated at , geometrically the slope of the tangent line to the graph at .

Local and Absolute Extrema

has a local (relative) maximum at if for all near ; a local minimum if for all near . It has an absolute (global) maximum at if for every in the domain, and similarly for absolute minimum. The symbol "near " means within some open interval containing .

Fermat's Theorem (Interior Extremum)

If has a local maximum or minimum at an interior point of its domain, and exists, then

2
⟳Compare the one-sided difference quotients on each side of a peak; one is , the other , and if the two-sided limit exists it must equal both, forcing .

First Derivative Test

Let be a critical point of a continuous function .

  • If changes from positive to negative at , then has a local maximum at .
  • If changes from negative to positive at , then has a local minimum at .
  • If does not change sign, is neither.

Symbolically, increasing means and decreasing means on the relevant interval.

Second Derivative Test

If and exists:

3
⟳ means the slope is increasing through , so goes from negative to positive — a valley; the inequality is reversed for a peak. If the test is inconclusive.

Concavity and Inflection Points

is concave up on an interval where (the curve lies above its tangents, shaped like ) and concave down where (shaped like ). An inflection point is a point where the concavity changes, requiring
4
⟳Inflection is the second-order analogue of an extremum: it is where "turns around," found by setting and checking for an actual sign change.

Extreme Value Theorem

If is continuous on a closed, bounded interval , then attains both an absolute maximum and an absolute minimum on . These occur either at critical points inside or at the endpoints or .

Why It Holds

Fermat's Theorem

Suppose has a local maximum at an interior point and exists.

  1. By definition of local maximum, for all sufficiently small , so .
  2. For : the difference quotient satisfies (negative over positive). Taking the limit as gives the right-hand derivative .
  3. For : now (negative over negative). Taking the limit as gives the left-hand derivative .
  4. Since exists, the left and right limits are equal. The only number satisfying both and is .

The minimum case follows by applying this result to .

A cubic-like curve showing a local max, local min, and an inflection point with sign data for f' and f''

x y local max, f'=0 local min, f'=0 inflection, f''=0 f''>0 (concave up) f''<0 (concave down)

Building Intuition

intuition Imagine walking along the graph from left to right as if it were a hilly road. The first derivative is your forward tilt: uphill (), downhill (), or level (). You can only switch between climbing and descending by momentarily walking on flat ground — that flat spot is a hilltop (max) or valley bottom (min).

The second derivative describes the shape of the road surface itself. Concave up () is a valley-shaped dip that would collect rainwater; concave down () is a dome that sheds it. An inflection point is the precise spot where the road transitions from one curvature to the other — like the middle of an S-bend on a mountain pass.

This is why the second-derivative test works: at a flat spot, if the surface curves up like a cup, you must be at the bottom of a valley (minimum); if it curves down like a cap, you must be at the top of a hill (maximum).

Worked Examples

Minimizing the Cost of a Box

Given: An open-top box with a square base must hold a volume of . Find the dimensions that minimize the surface area (material used). Setup. Let the base side be and height . Volume: , so . Surface area (base + four sides): .

Substitute :

5
⟳Eliminate using the volume constraint so depends on a single variable .

Differentiate and set to zero:
6
⟳Apply the power rule to and to , then clear the denominator.

So , and .

Confirm minimum: everywhere, so the critical point is indeed a minimum.

Sketching a Curve from Derivative Data

Given: Sketch . Step 1 — Critical points. . Setting gives and . Step 2 — Classify with the second derivative. .
  • At : → local maximum, value .
  • At : → local minimum, value .
Step 3 — Inflection point. at ; since changes from negative to positive there, is an inflection point. Step 4 — Intercepts and behaviour. at and . As , ; as , .

Common Misconceptions

"Setting always gives the maximum or minimum." This is incomplete on three counts:
  1. Critical points include places where is undefined (corners, cusps, vertical tangents) — e.g. has a minimum at where does not exist.
  2. On a closed interval, the absolute extremum may be at an endpoint, where need not be zero.
  3. A critical point can be neither a max nor a min (the second-derivative test failing). The vanishing of is necessary for an interior smooth extremum but never sufficient on its own.

Consider . Then , so — the point is critical. Yet has no extremum there: it is increasing on both sides ( for ). The second-derivative test is inconclusive because . In fact is an inflection point. This shows that does not guarantee a maximum or minimum, and that the second-derivative test can give no verdict.

Connections

Optimization and curve sketching sit at the heart of differential calculus and connect outward in several directions. They are the natural pay-off of The Derivative and the rules for computing it, especially The Chain Rule for composite functions. The justification of the first-derivative test relies on The Mean Value Theorem, which guarantees a point where instantaneous slope equals average slope. Closed-interval optimization depends on Continuity through the Extreme Value Theorem. The inverse problem — recovering a function from its rate of change, needed in applications like total cost from marginal cost — is handled by The Definite Integral and the Fundamental Theorem of Calculus. Related rate-of-change problems share the same machinery under the heading Related Rates.

Real-World Applications

  1. Manufacturing & packaging. Designing cans, boxes, and pipelines to minimize material cost for a fixed volume (the classic "soda can" problem minimizes aluminium per unit volume).
  2. Economics. Firms maximize profit by producing the quantity where marginal revenue equals marginal cost, i.e. where the derivative of the profit function is zero.
  3. Physics — projectile motion. The maximum height of a thrown object occurs when its vertical velocity (the derivative of height) is zero.
  4. Engineering — beam design. Locating the point of maximum bending stress along a loaded beam by maximizing the moment function.
  5. Logistics & navigation. Minimizing travel time or fuel by finding the optimal speed or route (e.g. the lifeguard/Snell's-law problem of crossing sand then water fastest).
  6. Medicine — drug dosing. Determining the time of peak blood concentration of a drug, where the concentration's derivative is zero.
  7. Machine learning. Training models by minimizing a loss function via gradient descent, the multivariable generalization of "follow the derivative downhill to a minimum."

Historical Development

  • c. 250 BCE — Archimedes uses tangent-like and limiting arguments on areas and the spiral, foreshadowing optimization ideas without a derivative concept.
  • 1629–1636 — Pierre de Fermat develops his method of adequality to find maxima and minima and tangents, effectively setting a derivative-like expression to zero (Fermat's Theorem).
  • 1660s — Isaac Newton develops the method of fluxions, treating rates of change systematically for problems of motion and extrema.
  • 1684 — Gottfried Wilhelm Leibniz publishes the first account of differential calculus, introducing the notation , and the rule for finding maxima/minima where the differential vanishes.
  • 1696 — L'Hôpital's Analyse des Infiniment Petits, the first textbook of differential calculus, popularizes maximum/minimum techniques.
  • 1696–1697 — The brachistochrone problem (Johann Bernoulli) launches the calculus of variations, optimization over whole curves rather than single points.
  • 1740s — Euler systematizes the second-derivative criterion for distinguishing maxima from minima.
  • 1820s — Cauchy provides rigorous limit-based foundations, making the Extreme Value and Mean Value theorems precise.
  • 1860s–1870s — Weierstrass formalizes continuity and the existence of extrema on closed intervals, completing the logical underpinning of the Extreme Value Theorem.

Subtleties & Limits

The techniques here apply cleanly to smooth, single-variable functions on nice domains, but the boundaries of the subject open onto deep territory. For functions of several variables, critical points are found by setting all partial derivatives to zero, and the classification requires the Hessian matrix (a multivariable second-derivative test) — yet saddle points proliferate and global optimization becomes genuinely hard. Non-differentiable and non-convex optimization (as in modern machine learning) has no guarantee that following the derivative reaches the global minimum; gradient descent can stall in local minima or saddle regions, and characterizing when it succeeds is an active research area. Even the innocent assumption of a closed bounded interval matters: drop it and a continuous function may have no maximum at all (e.g. on the open interval ). Constrained optimization with inequality constraints (the Karush–Kuhn–Tucker conditions) generalizes Fermat's idea but lies beyond the elementary setting.

See Also

The Mean Value Theorem · Extreme Value Theorem · Concavity and Inflection Points · Related Rates · Gradient Descent · The Fundamental Theorem of Calculus

Before this

  • The Derivative — the entire subject is built on computing and interpreting $f'(x)$.
  • Differentiation Rules — power, product, quotient, and chain rules are needed to find $f'$ and $f''$.
  • Continuity — required for the Extreme Value Theorem and for sign-analysis of derivatives.
  • Functions and Graphs — sketching presupposes familiarity with domain, intercepts, and asymptotes.
  • Limits — derivatives and end-behaviour are defined as limits.

Where this leads

  • Related Rates — applies the same differentiation machinery to interdependent changing quantities.
  • The Definite Integral — the reverse process, recovering quantities from their rates of change.
  • Optimization in Several Variables — generalizes critical points and the second-derivative test via partial derivatives and the Hessian.
  • Taylor Series — uses higher derivatives to approximate functions near a point, refining the local-shape analysis begun here.
  • Newton's Method — uses derivatives iteratively to locate roots and, by extension, critical points numerically.