How to Find Relative Extrema of a Function: Step by Step

Finding the relative extrema of a function comes down to three steps: take the derivative, find the critical points where that derivative is zero or undefined, then test each critical point to determine whether it’s a local maximum, local minimum, or neither. The entire process relies on one key theorem: relative extrema can only occur at critical points.

What Relative Extrema Actually Are

A relative (or local) maximum is a point where the function value is greater than or equal to all nearby function values. A relative minimum is a point where the function value is less than or equal to all nearby values. The word “relative” matters here because these are peaks and valleys in a neighborhood, not necessarily the highest or lowest points on the entire graph.

This is the main distinction between relative and absolute extrema. An absolute maximum is the single largest value a function takes over its entire domain. A relative maximum just needs to be the biggest value in its immediate vicinity. A function can have several relative maxima but only one absolute maximum. One other important detail: relative extrema cannot occur at endpoints of an interval. If you’re working on a closed interval like [a, b], the endpoints might be absolute extrema, but they’re never classified as relative extrema.

Step 1: Find the Critical Points

A critical point is any x-value in the domain of the function where the derivative equals zero or where the derivative does not exist. These are the only locations where a relative extremum can appear, so finding them is the essential first step.

To find critical points, take the first derivative of the function and then solve two problems: where does the derivative equal zero, and where is it undefined? Setting the derivative equal to zero gives you the more common type of critical point, sometimes called a stationary point, where the tangent line is perfectly horizontal. But don’t overlook points where the derivative fails to exist. Functions with sharp corners (like absolute value) or cusps (like cube root functions) can have relative extrema at those non-differentiable points.

For example, consider g(t) = t^(2/3)(2t − 1). When you differentiate and simplify, you’ll find the derivative is undefined at t = 0 and equals zero at t = 1/5. Both are critical points, and both need to be tested.

Step 2a: The First Derivative Test

The first derivative test is the most reliable method for classifying critical points. It works by checking whether the derivative changes sign as you move through each critical point.

Start by placing all your critical points on a number line. This divides the x-axis into intervals. Pick a test value from each interval and plug it into the first derivative (not the original function) to determine whether the derivative is positive or negative in that interval. A positive derivative means the function is increasing; a negative derivative means it’s decreasing. Then apply these rules:

  • Positive to negative: If the derivative switches from positive to negative at a critical point, the function goes from rising to falling. That critical point is a relative maximum.
  • Negative to positive: If the derivative switches from negative to positive, the function goes from falling to rising. That critical point is a relative minimum.
  • No sign change: If the derivative stays positive on both sides, or stays negative on both sides, there is no extremum at that point.

Here’s a complete example. Take f(x) = x³ − 3x². The derivative is f′(x) = 3x² − 6x = 3x(x − 2), which equals zero at x = 0 and x = 2. Testing a value left of 0 (say x = −1) gives a positive result, so f is increasing. Between 0 and 2 (say x = 1) the derivative is negative, so f is decreasing. To the right of 2 (say x = 3) the derivative is positive again. The derivative changes from positive to negative at x = 0, making it a local maximum. It changes from negative to positive at x = 2, making it a local minimum.

Step 2b: The Second Derivative Test

The second derivative test is a faster alternative that works well in many cases. Instead of building a full sign chart, you just plug each critical point into the second derivative and check the result.

  • f″(c) > 0: The function is concave up (shaped like a bowl) at that point. It’s a relative minimum.
  • f″(c) < 0: The function is concave down (shaped like a hill) at that point. It’s a relative maximum.
  • f″(c) = 0 or undefined: The test is inconclusive. You cannot determine from this information alone whether the point is a max, a min, or neither.

The logic is intuitive. If a function has a horizontal tangent (derivative equals zero) and it’s curving upward at that spot, it must be sitting at the bottom of a valley. If it’s curving downward, it must be at the top of a hill.

This test only works at critical points where the derivative is zero, not at points where the derivative is undefined. It also requires the second derivative to exist at that point. For many polynomial and trigonometric functions, this test is the quickest path to an answer.

When the Second Derivative Test Fails

The most common stumbling point is when both f′(c) = 0 and f″(c) = 0 at the same critical point. The second derivative test gives you no information here, and the critical point could be a maximum, a minimum, or an inflection point (a place where the curve changes concavity without any extremum).

Consider f(x) = x⁴. The first derivative is zero at x = 0, and so is the second derivative. But if you look at the graph, x = 0 is clearly a minimum since x⁴ is always greater than or equal to zero. Now consider g(x) = x³. Again, both the first and second derivatives are zero at x = 0. But this time x = 0 is an inflection point, not an extremum, because x³ passes straight through the origin.

When the second derivative test fails, fall back to the first derivative test. Build a sign chart around the critical point and check whether the first derivative actually changes sign. This method always gives a definitive answer.

Putting It All Together

Here’s the full workflow for any function:

  • Differentiate the function to get f′(x).
  • Solve f′(x) = 0 and identify any x-values where f′(x) does not exist. These are your critical points. Confirm each one is actually in the domain of the original function.
  • Classify each critical point using either the first or second derivative test.
  • Find the y-values by plugging the critical x-values back into the original function f(x). The relative extrema are reported as points: “relative maximum of f(c) at x = c.”

If you’re working on a closed interval and need absolute extrema rather than relative ones, there’s an extra step: evaluate the function at the endpoints of the interval too, then compare all the values. The largest is the absolute maximum and the smallest is the absolute minimum. But for relative extrema specifically, endpoints are excluded from consideration.

Common Mistakes to Avoid

Not every critical point produces a relative extremum. The function f(x) = x³ has a critical point at x = 0 (since f′(0) = 0), but no relative extremum there because the derivative doesn’t change sign. Always test, never assume.

Another frequent error is forgetting about critical points where the derivative is undefined. If your function involves fractional exponents, absolute values, or piecewise definitions, check for points where the derivative blows up or doesn’t exist. These are just as important as the points where the derivative is zero.

Finally, don’t confuse the derivative’s sign with the function’s sign. When you build a sign chart, you’re plugging test values into f′(x), not f(x). A positive first derivative tells you the original function is increasing in that interval, regardless of whether the function’s actual values are positive or negative.