Tutorials › AP Calculus › Local Extrema in Mixed Function Problems

Monotonicity and Local Extrema · Tutorial 368 of 999

Local Extrema in Mixed Function Problems

Practice selecting and applying derivative tests across several function types, while checking domains and points where the derivative does not exist.

Intermediate 10 min read

What You'll Learn

  • Identify domain points where a local extremum could occur.
  • Use first-derivative signs to classify critical points in polynomial and rational functions.
  • Apply the second derivative test to periodic trigonometric functions.
  • Analyze a piecewise function at a point where its derivative does not exist.
  • Explain why a derivative sign change establishes a local extremum.
  • Avoid treating points outside a function’s domain as candidates.

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.

Definition: A function \(f\) has a local maximum at an interior domain point \(c\) if there is an interval around \(c\) on which \(f(c)\geq f(x)\). It has a local minimum there if \(f(c)\leq f(x)\) throughout such an interval. The inequalities are strict for a strict local maximum or minimum when they hold strictly for all nearby \(x\ne c\).

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.

First-derivative sign test: Suppose \(f\) is continuous at an interior point \(c\), and differentiable on each side of \(c\) sufficiently close to it. If \(f'\) changes from positive to negative at \(c\), then \(f\) has a strict local maximum there. If \(f'\) changes from negative to positive, then \(f\) has a strict local minimum. If the sign does not change, this test does not establish an extremum.

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)\),

$$ f(c)-f(x)=f'(\xi)(c-x)>0. $$

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

$$ f(x)-f(c)=f'(\xi)(x-c)<0. $$

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.

$$ f'(x)=3x^2-6x=3x(x-2). $$

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.

$$ f(0)=0^3-3(0)^2=0, \qquad f(2)=2^3-3(2)^2=8-12=-4. $$

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\),

$$ f'(x) = \frac{2x(x-1)-(x^2+1)}{(x-1)^2} = \frac{x^2-2x-1}{(x-1)^2}. $$

Step 2: Find derivative zeros and split the domain. The numerator factors using its roots:

$$ x^2-2x-1=0 \quad\Longrightarrow\quad x=1\pm\sqrt{2}. $$

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:

$$ f(x)=x+1+\frac{2}{x-1}. $$

Since \(x-1=\pm\sqrt2\) at the two critical points,

$$ f(1-\sqrt2)=2-\sqrt2-\sqrt2=2-2\sqrt2, $$
$$ f(1+\sqrt2)=2+\sqrt2+\sqrt2=2+2\sqrt2. $$

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.

Second derivative test: If \(f'(c)=0\) and \(f''(c)>0\), then \(f\) has a local minimum at \(c\). If \(f'(c)=0\) and \(f''(c)<0\), then \(f\) has a local maximum at \(c\). If \(f''(c)=0\), this test gives no classification.

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.

$$ f'(x)=\cos x-\sin x. $$

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.

$$ f''(x)=-\sin x-\cos x. $$

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

$$ f\left(\frac{\pi}{4}+k\pi\right)=(-1)^k\sqrt2, \qquad f''\left(\frac{\pi}{4}+k\pi\right)=-(-1)^k\sqrt2. $$

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

$$ f(x)= \begin{cases} -x, & x<0,\\ x, & x\geq 0. \end{cases} $$

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.

$$ f(1)=\frac{1^2+1}{1-1}=\frac{2}{0} \quad\text{is undefined.} $$

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

1
Check the domain.
Mark excluded inputs and note any endpoints or piecewise joins.
2
Locate candidates.
Find interior domain points where the derivative is zero or undefined, and include relevant joins.
3
Choose a test.
Use derivative signs when behavior on both sides is accessible; use the second derivative test when its hypotheses hold.
4
Compute and verify.
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.

  1. For \(g(x)=x^3-6x\), find its critical points and classify them using derivative signs.
  2. For \(h(x)=\dfrac{x}{x^2+1}\), find the stationary points and use derivative signs to classify them.
  3. For \(p(x)=\cos x\) on the real line, state the locations and types of its local extrema using an integer parameter.
  4. 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.
  5. Why can a point where a rational function’s denominator is zero not be a local extremum of that function?

Test yourself: AP Calculus practice exams

Ready to check what you know? Work an AP-style practice exam, then open the full solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers all of AP Calculus AB & BC: full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon