Finding the highest highs and lowest lows
A farmer wants the dimensions of the cheapest fence that encloses a fixed area, which means minimizing a cost function. A product team wants the price that maximizes revenue, which means finding the top of a curve. These are optimization problems, and they all start the same way: locate the extreme points, the local maxima and minima where a function turns around. This calculator finds those turning points and tells you which is which.
The formula, in plain terms
Formula: critical points occur where f'(x) = 0 or f'(x) is undefined; the second derivative f''(x) classifies them
Extreme points can only hide where the slope is zero (flat spots) or where the slope breaks down (corners, cusps). Those candidates are called critical points. The second derivative then acts as a referee: if f'' is positive at a critical point, the curve cups upward and you have a local minimum; if f'' is negative, the curve frowns downward and you have a local maximum.
How to use the calculator
- Enter the function you want to optimize.
- Note the critical points reported, each a candidate for an extreme point.
- Read the classification: local maximum, local minimum, or neither.
- Evaluate the function at each extreme point to get the actual max or min values.
Worked example: f(x) = x^3 - 3x
Differentiate: f'(x) = 3x^2 - 3, which factors as 3(x^2 - 1). Setting it to zero gives x = 1 and x = -1, the two critical points. The second derivative is f''(x) = 6x:
- At x = 1: f''(1) = 6, which is positive, so this is a local minimum. Its value is f(1) = 1 - 3 = -2.
- At x = -1: f''(-1) = -6, which is negative, so this is a local maximum. Its value is f(-1) = -1 + 3 = 2.
A quick sketch confirms it: the curve rises to (minus 1, 2), falls through the origin region, and bottoms out at (1, minus 2) before climbing again. The algebra and the picture agree.
Where extreme points turn up
Businesses maximize profit and minimize cost, engineers minimize material and weight, and data scientists tune parameters until an error function bottoms out. The derivatives involved often need the quotient rule calculator or the product rule calculator when the function is built from fractions or products, and the curved line slope calculator confirms the slope really is zero at each candidate.
Mistakes to avoid
- Assuming every critical point is an extreme point. For f(x) = x^3, x = 0 is critical but the curve just flattens and keeps climbing; it is an inflection point, not a max or min.
- Forgetting the endpoints. On a closed interval, the absolute maximum or minimum often sits at an endpoint, which the derivative never flags. Always check the boundaries.
- Trusting the second derivative test when f'' = 0. The test is silent there; use the first derivative sign change around the point instead.
What to keep in mind
Local extremes are not global extremes: a function can have a small local peak while its true maximum lives far away or at an endpoint. For the biggest or smallest value over a whole domain, compare every local extreme against the endpoints and the behavior as x goes to infinity before declaring a winner.