Choosing a Test for the Function in Front of You
Local-extrema problems can look quite different on the surface. A polynomial may have several stationary points, a rational function may have a vertical asymptote between critical points, a trigonometric function may repeat its behavior periodically, and a piecewise function may fail to be differentiable at a join. The common task is to identify where a local maximum or minimum occurs and justify the classification.
The key is not to apply one test mechanically. First check the domain and locate possible candidates. Then select a method suited to the information available: derivative signs are especially useful when the function’s behavior changes across a point, while the second derivative test can classify a stationary point directly when its conditions hold.
Find Candidates Before Classifying Them
At an interior point of the domain, a local extremum can occur where \(f'(c)=0\), or where \(f'(c)\) does not exist. These are candidates, not automatic extrema: the function must still be compared with its nearby values. A point where the function is not defined cannot be a local extremum of that function.
For a piecewise function, include its joining points among the candidates, even if the function is defined there but its one-sided derivatives differ. If the domain has endpoints, the appropriate comparisons are one-sided; they are not the same as the two-sided test at an interior point.
The sign test gives a direct account of what the function is doing: positive derivative means increasing, and negative derivative means decreasing. The change from increasing to decreasing produces a local peak; the reverse change produces a local valley.
Why a Derivative Sign Change Works
Here is a justification of the first-derivative sign test. Suppose \(f'(x)>0\) immediately to the left of \(c\), and \(f'(x)<0\) immediately to its right. Choose \(x<c\) close enough that the whole interval from \(x\) to \(c\) lies in the region where the derivative is positive. The Mean Value Theorem applies because \(f\) is continuous on \([x,c]\) and differentiable on \((x,c)\). Thus, for some \(\xi\in(x,c)\),
So nearby values to the left are smaller than \(f(c)\). For \(x>c\) nearby, the Mean Value Theorem gives a \(\xi\in(c,x)\) such that
So nearby values to the right are also smaller. Therefore \(c\) is a strict local maximum. Reversing the derivative signs proves the local-minimum case in the same way.
Worked Example: Classifying Two Extrema of a Polynomial
Worked Example: Classifying Two Extrema of a Polynomial
Find and classify the local extrema of \(f(x)=x^3-3x^2\).
Step 1: Differentiate and find candidates.
The derivative is zero at \(x=0\) and \(x=2\). The polynomial is defined and differentiable for every real number, so both are interior candidates.
Step 2: Check derivative signs. The factors in \(3x(x-2)\) show that \(f'(x)>0\) for \(x<0\), \(f'(x)<0\) for \(0<x<2\), and \(f'(x)>0\) for \(x>2\). The sign changes from positive to negative at \(0\), so there is a local maximum there. It changes from negative to positive at \(2\), so there is a local minimum there.
Step 3: Find the function values.
The local maximum is \((0,0)\), and the local minimum is \((2,-4)\).
Check: Differentiating the original function gives \(3x^2-6x=3x(x-2)\), which is zero at both reported inputs. The sign changes confirm the classifications, not merely the fact that the derivative is zero.
Rational Functions: Respect the Domain
For a rational function, the denominator can affect the analysis in two ways. It determines where the function is undefined, and it often appears squared in the derivative, which can make the derivative’s sign depend mainly on its numerator. Keep the domain visible while making a sign chart: a point excluded from the domain divides intervals but cannot itself be a local extremum.
Worked Example: Extrema on Both Sides of a Rational Function’s Asymptote
Find and classify the local extrema of \(f(x)=\dfrac{x^2+1}{x-1}\).
Step 1: Record the domain and differentiate. The denominator is zero at \(x=1\), so the domain is all real numbers except \(1\). By the quotient rule, for \(x\ne1\),
Step 2: Find derivative zeros and split the domain. The numerator factors using its roots:
Both points are in the domain. The point \(x=1\) is not. Since \((x-1)^2>0\) wherever the function is defined, the sign of \(f'\) is the sign of the numerator. That upward-opening quadratic is positive outside its roots and negative between them. Accounting for the excluded point, \(f'\) is positive on \((-\infty,1-\sqrt2)\), negative on \((1-\sqrt2,1)\) and \((1,1+\sqrt2)\), and positive on \((1+\sqrt2,\infty)\).
Therefore \(x=1-\sqrt2\) is a local maximum, because \(f'\) changes from positive to negative. The point \(x=1+\sqrt2\) is a local minimum, because \(f'\) changes from negative to positive.
Step 3: Compute the extremum values. Rewrite the function by division:
Since \(x-1=\pm\sqrt2\) at the two critical points,
The local maximum is \((1-\sqrt2,\,2-2\sqrt2)\), and the local minimum is \((1+\sqrt2,\,2+2\sqrt2)\).
Check: At either critical point the numerator \(x^2-2x-1\) is zero, so the derivative is zero, and neither point makes the denominator zero. The derivative signs on both sides give the stated classifications.
Trigonometric Functions: Use Periodicity Carefully
A trigonometric function on the entire real line may have infinitely many extrema. In that setting, a useful answer describes all of them with an integer parameter rather than listing only a few. Once the derivative equation identifies a repeating set of candidates, either the sign test or the second derivative test can classify them.
Worked Example: Classifying Repeating Extrema of a Trigonometric Function
Find and classify the local extrema of \(f(x)=\sin x+\cos x\) for real \(x\).
Step 1: Find stationary points.
Setting \(f'(x)=0\) gives \(\cos x=\sin x\), so the solutions are \(x=\dfrac{\pi}{4}+k\pi\), where \(k\) is any integer.
Step 2: Apply the second derivative test.
At \(x=\dfrac{\pi}{4}+k\pi\), both sine and cosine have the sign factor \((-1)^k\), and their sum is \((-1)^k\sqrt2\). Therefore
When \(k\) is even, the function value is \(\sqrt2\) and the second derivative is negative, giving a local maximum. When \(k\) is odd, the function value is \(-\sqrt2\) and the second derivative is positive, giving a local minimum.
Check: Substitution into \(f'(x)=\cos x-\sin x\) gives zero at each candidate. The second derivative is nonzero there, with the sign required for each reported classification.
Piecewise Functions: Test the Join from Each Side
A point where the formula changes deserves special attention. If the function is defined at the join but its left and right derivatives differ, the ordinary second derivative test is unavailable there. Comparing values on each side—or checking the derivative signs on the two neighboring pieces—can still establish a local extremum.
Worked Example: A Local Minimum at a Nondifferentiable Join
Classify the point \(x=0\) for the piecewise function
The function value at the join is \(f(0)=0\). For every \(x<0\), \(f(x)=-x>0\); for every \(x>0\), \(f(x)=x>0\). Thus all nearby values other than \(f(0)\) are greater than \(f(0)\), and \(x=0\) is a strict local minimum.
The left derivative is \(-1\), while the right derivative is \(1\), so \(f'(0)\) does not exist. The slopes nevertheless show the function decreases toward the join from the left and increases away from it on the right.
Check: The piece values agree at \(x=0\): the left expression approaches \(0\), and the right expression gives \(0\). Directly, \(f(x)=|x|\), which is nonnegative and equals zero at the join. This confirms the local minimum.
A Common Mistake: Calling an Excluded Point a Critical Point
Consider the rational example above. A tempting but incorrect argument is: “The derivative is undefined at \(x=1\), so \(x=1\) is a critical point and might be a local extremum.” The conclusion fails at its first step: \(f(1)\) is undefined, so \(1\) is not a point of the function’s domain and cannot be a local extremum.
The correction is to use \(x=1\) only as a boundary between intervals when analyzing derivative signs. The actual candidates are domain points where \(f'=0\) or \(f'\) does not exist. Then classify those candidates by nearby function behavior.
A Reliable Workflow for Mixed Problems
Mark excluded inputs and note any endpoints or piecewise joins.
Find interior domain points where the derivative is zero or undefined, and include relevant joins.
Use derivative signs when behavior on both sides is accessible; use the second derivative test when its hypotheses hold.
Evaluate the function at classified points, then check derivative values, signs, or second-derivative signs as appropriate.
This approach matters because a correct candidate is not automatically an extremum, and a correct classification is not complete without its function value when the problem asks for the extremum point. In mixed problems, the domain and the behavior on both sides of each candidate are as important as the derivative calculation.
Check Your Understanding
For each question, state the decisive calculation or condition that supports your conclusion.
- For \(g(x)=x^3-6x\), find its critical points and classify them using derivative signs.
- For \(h(x)=\dfrac{x}{x^2+1}\), find the stationary points and use derivative signs to classify them.
- For \(p(x)=\cos x\) on the real line, state the locations and types of its local extrema using an integer parameter.
- For \(q(x)=\begin{cases}2+x,&x<0,\\2-x^2,&x\geq0,\end{cases}\) classify the join at \(x=0\) by comparing nearby values.
- Why can a point where a rational function’s denominator is zero not be a local extremum of that function?