First Derivative Test

Type f. The page finds every x where f′ is 0 or does not exist and draws the sign of f′ between them under the graph. Classify each critical point before the page does; switch to an interval [a, b] and the ends join the candidates for the largest and smallest value.

Rising and falling f′>0 ⇒ f↗,f′<0 ⇒ f↘f'>0\ \Rightarrow\ f\nearrow,\qquad f'<0\ \Rightarrow\ f\searrow
First derivative test at a critical point c + ∣c −  ⇒  f(c) max⁡− ∣c +  ⇒  f(c) min⁡\begin{aligned}&+\ \big|_{c}\ -\ \ \Rightarrow\ \ f(c)\ \max\\&-\ \big|_{c}\ +\ \ \Rightarrow\ \ f(c)\ \min\end{aligned}
Candidates test on [a, b] max⁡[a,b]f=max⁡{f(a), f(ci), f(b)}\max_{[a,b]}f=\max\{f(a),\ f(c_i),\ f(b)\}
Loading interactive simulation...

Lesson

The theory — First Derivative Test

A critical point of f is an x where f has a value and f′(x) = 0 or f′(x) does not exist. The first derivative test: if f is continuous at a critical point c and f′ changes from + to − across it, f(c) is a local maximum; from − to +, a local minimum; if f′ keeps its sign, neither.

Where the formula comes from

  1. Find f′ and the critical points. Solve f′(x) = 0, and add every x where f has a value and f′ does not (a corner, a cusp). Where f itself has no value, an asymptote or a gap, the line is split too, but that x is not a critical point.
    f′(c)=0  ∨  ∄f′(c),∃f(c)f'(c)=0\ \ \lor\ \ \nexists f'(c),\qquad \exists f(c)
  2. Draw the sign chart. Between neighbouring split points f′ keeps one sign, so one test value in each interval decides it. On the page these are the + and − in the strip under the graph.
    xc1c2f′(x)±0±∄±\begin{array}{c|ccccc}x&&c_1&&c_2&\\\hline f'(x)&\pm&0&\pm&\nexists&\pm\end{array}
  3. Read rising and falling. Where f′ > 0 f increases and where f′ < 0 it decreases. The mean value theorem is why: any chord across the interval has the slope of some tangent inside it.
    f(x2)−f(x1)=f′(ξ) (x2−x1)f′>0 ⇒ f(x2)>f(x1)(x1<x2)\begin{aligned}&f(x_2)-f(x_1)=f'(\xi)\,(x_2-x_1)\\&f'>0\ \Rightarrow\ f(x_2)>f(x_1)\quad(x_1<x_2)\end{aligned}
  4. Classify each critical point by the signs on its two sides.
    + ∣c − ⇒ f(c) max⁡− ∣c + ⇒ f(c) min⁡+ ∣c +,  − ∣c − ⇒ ¬max⁡, ¬min⁡\begin{aligned}&+\ \big|_{c}\ -\ \Rightarrow\ f(c)\ \max\\&-\ \big|_{c}\ +\ \Rightarrow\ f(c)\ \min\\&+\ \big|_{c}\ +,\ \ -\ \big|_{c}\ -\ \Rightarrow\ \neg\max,\ \neg\min\end{aligned}
  5. On a closed interval [a, b], with f continuous there, the absolute maximum and minimum are among the candidates: f at a, at b and at every critical point inside. Compare the values; an end can win.
    xac1⋯ckbf(x)f(a)f(c1)⋯f(ck)f(b)\begin{array}{c|ccccc}x&a&c_1&\cdots&c_k&b\\\hline f(x)&f(a)&f(c_1)&\cdots&f(c_k)&f(b)\end{array}

Problems solved in full

  1. A cubic with a maximum and a minimum 3 steps

    Find the intervals on which f(x) = 2x³ − 3x² − 12x increases and decreases, and classify its critical points.

    Open this problem in the tool

    1. Differentiate and factorise, then set f′ = 0:

      f′(x)=6x2−6x−12=6(x+1)(x−2)f′(x)=0 ⇒ x=−1, 2\begin{aligned}f'(x)&=6x^{2}-6x-12\\&=6(x+1)(x-2)\\f'(x)&=0\ \Rightarrow\ x=-1,\ 2\end{aligned}
    2. Test one value in each interval, for instance f′(−2) = 24, f′(0) = −12, f′(3) = 24:

      x−12f′(x)+0−0+f(x)↗7↘−20↗\begin{array}{c|ccccc}x&&-1&&2&\\\hline f'(x)&+&0&-&0&+\\f(x)&\nearrow&7&\searrow&-20&\nearrow\end{array}
    3. Read the two critical points off the chart:

      f(−1)=−2−3+12=7f(2)=16−12−24=−20\begin{aligned}&f(-1)=-2-3+12=7\\&f(2)=16-12-24=-20\end{aligned}

    Answer

    Increasing on (−∞, −1) and (2, ∞), decreasing on (−1, 2); a local maximum f(−1) = 7 and a local minimum f(2) = −20.

    f(−1)=7 max⁡,f(2)=−20 min⁡f(-1)=7\ \max,\qquad f(2)=-20\ \min
  2. f′ = 0 without a change of sign 3 steps

    Find and classify the critical points of f(x) = x⁴ − 4x³.

    Open this problem in the tool

    Show solution
    1. Differentiate and factorise:

      f′(x)=4x3−12x2=4x2(x−3)f′(x)=0 ⇒ x=0, 3\begin{aligned}&f'(x)=4x^{3}-12x^{2}=4x^{2}(x-3)\\&f'(x)=0\ \Rightarrow\ x=0,\ 3\end{aligned}
    2. The factor x² is never negative, so f′ has the sign of x − 3 on both sides of 0:

      x034x2+0+++x−3−−−0+f′(x)−0−0+\begin{array}{c|ccccc}x&&0&&3&\\\hline 4x^{2}&+&0&+&+&+\\x-3&-&-&-&0&+\\\hline f'(x)&-&0&-&0&+\end{array}
    3. So 0 is a critical point where f only pauses, the case of x³ on the derivative page, and 3 is a turn:

      x03f(x)↘0↘−27↗\begin{array}{c|ccccc}x&&0&&3&\\\hline f(x)&\searrow&0&\searrow&-27&\nearrow\end{array}

    Answer

    x = 0 is neither; f(3) = −27 is a local minimum. f decreases on (−∞, 3) straight through 0 and increases on (3, ∞).

    f(3)=81−108=−27 min⁡f(3)=81-108=-27\ \min
  3. A cusp: f′ does not exist 3 steps

    Find and classify the critical points of f(x) = x − 3x^(2/3).

    Open this problem in the tool

    Show solution
    1. Differentiate. f′ is 0 where the numerator is, and does not exist where the denominator is 0, although f(0) = 0 exists:

      f′(x)=1−2x1/3=x1/3−2x1/3f′(8)=0,∄f′(0)\begin{aligned}&f'(x)=1-\frac{2}{x^{1/3}}=\frac{x^{1/3}-2}{x^{1/3}}\\&f'(8)=0,\qquad \nexists f'(0)\end{aligned}
    2. The sign chart, with the denominator's sign changing at 0:

      x08f′(x)+∄−0+f(x)↗0↘−4↗\begin{array}{c|ccccc}x&&0&&8&\\\hline f'(x)&+&\nexists&-&0&+\\f(x)&\nearrow&0&\searrow&-4&\nearrow\end{array}
    3. Both points are critical, and both are turns:

      f(8)=8−3⋅82/3=8−12=−4f(8)=8-3\cdot8^{2/3}=8-12=-4

    Answer

    A local maximum f(0) = 0, at a cusp where f′ does not exist, and a local minimum f(8) = −4. Solving f′ = 0 alone misses the maximum.

    f(0)=0 max⁡,f(8)=−4 min⁡f(0)=0\ \max,\qquad f(8)=-4\ \min
  4. A sign change at an asymptote 3 steps

    f(x) = x + 4/x². Find where f increases and decreases and classify every critical point.

    Open this problem in the tool

    Show solution
    1. Differentiate. f′ is 0 at x = 2 and has no value at 0, where f has none either:

      f′(x)=1−8x3=x3−8x3f′(2)=0,∄f(0)\begin{aligned}&f'(x)=1-\frac{8}{x^{3}}=\frac{x^{3}-8}{x^{3}}\\&f'(2)=0,\qquad \nexists f(0)\end{aligned}
    2. Split the line at 2 and at 0 and test each piece:

      x02f′(x)+∄−0+f(x)↗∄↘3↗\begin{array}{c|ccccc}x&&0&&2&\\\hline f'(x)&+&\nexists&-&0&+\\f(x)&\nearrow&\nexists&\searrow&3&\nearrow\end{array}
    3. f′ changes from + to − across 0, but 0 is not in the domain of f, so it is not a critical point and there is no maximum there; the graph runs up the asymptote. The only critical point is 2:

      f(2)=2+422=3f(2)=2+\frac{4}{2^{2}}=3

    Answer

    Increasing on (−∞, 0) and (2, ∞), decreasing on (0, 2); one local minimum, f(2) = 3.

    f(2)=3 min⁡f(2)=3\ \min
  5. A trigonometric function on an interval 3 steps

    Classify the critical points of f(x) = 2 sin x + sin 2x on [0, 2π] and find its absolute extremes there.

    Open this problem in the tool

    Show solution
    1. Use cos 2x = 2cos²x − 1 and factorise:

      f′(x)=2cos⁡x+2(2cos⁡2x−1)=2(2cos⁡x−1)(cos⁡x+1)\begin{aligned}f'(x)&=2\cos x+2(2\cos^{2}x-1)\\&=2(2\cos x-1)(\cos x+1)\end{aligned}
    2. cos x + 1 ≥ 0 and is 0 only at π, so the sign of f′ is the sign of 2cos x − 1, except at π itself:

      xπ3π5π3f′+0−0−0+f↗332↘0↘−332↗{\small\begin{array}{c|ccccccc}x&&\tfrac{\pi}{3}&&\pi&&\tfrac{5\pi}{3}&\\\hline f'&+&0&-&0&-&0&+\\f&\nearrow&\tfrac{3\sqrt{3}}{2}&\searrow&0&\searrow&-\tfrac{3\sqrt{3}}{2}&\nearrow\end{array}}
    3. Compare the candidates, ends included:

      f(0)=f(2π)=0f ⁣(π3)=2⋅32+32=332≈2.5981\begin{aligned}&f(0)=f(2\pi)=0\\&f\!\left(\tfrac{\pi}{3}\right)=2\cdot\tfrac{\sqrt{3}}{2}+\tfrac{\sqrt{3}}{2}=\tfrac{3\sqrt{3}}{2}\approx2{.}5981\end{aligned}

    Answer

    A local maximum f(π/3) = 3√3/2 ≈ 2.5981, a local minimum f(5π/3) = −3√3/2 ≈ −2.5981, and π is neither. Both ends give 0, so the two turns are also the absolute maximum and minimum.

    max⁡[0,2π]f=332,min⁡[0,2π]f=−332\max_{[0,2\pi]}f=\tfrac{3\sqrt{3}}{2},\qquad \min_{[0,2\pi]}f=-\tfrac{3\sqrt{3}}{2}
  6. The candidates test: the maximum at an end 2 steps

    Find the absolute maximum and minimum of f(x) = x³ − 3x on [0, 3].

    Open this problem in the tool

    Show solution
    1. f is a polynomial, continuous on [0, 3]. The critical points:

      f′(x)=3x2−3=3(x−1)(x+1)f′(x)=0 ⇒ x=±1\begin{aligned}&f'(x)=3x^{2}-3=3(x-1)(x+1)\\&f'(x)=0\ \Rightarrow\ x=\pm1\end{aligned}
    2. Only x = 1 lies inside (0, 3). Evaluate f at it and at both ends:

      x013f(x)0−218\begin{array}{c|ccc}x&0&1&3\\\hline f(x)&0&-2&18\end{array}

    Answer

    The absolute maximum is f(3) = 18, at the end; the absolute minimum is f(1) = −2. At x = 3 f′ = 24, not 0, as for the depth-limited box on the optimisation page.

    max⁡[0,3]f=f(3)=18min⁡[0,3]f=f(1)=−2\begin{aligned}&\max_{[0,3]}f=f(3)=18\\&\min_{[0,3]}f=f(1)=-2\end{aligned}
  7. No critical point inside 2 steps

    Find the absolute extremes of f(x) = x³ + 3x on [−1, 2].

    Open this problem in the tool

    Show solution
    1. Differentiate:

      f′(x)=3x2+3≥3>0f'(x)=3x^{2}+3\ge3>0
    2. So f is increasing on the whole interval, and the only candidates are the ends:

      x−12f(x)−414\begin{array}{c|cc}x&-1&2\\\hline f(x)&-4&14\end{array}

    Answer

    Absolute minimum f(−1) = −4, absolute maximum f(2) = 14.

    min⁡[−1,2]f=f(−1)=−4max⁡[−1,2]f=f(2)=14\begin{aligned}&\min_{[-1,2]}f=f(-1)=-4\\&\max_{[-1,2]}f=f(2)=14\end{aligned}
  8. Reading the intervals from a factorised f′ 2 steps

    A function f has f′(x) = (x + 2)(x − 1)²(x − 4). On which intervals is f increasing, and what are its critical points?

    Show solution
    1. The critical points are the zeros of the factors:

      f′(x)=(x+2)(x−1)2(x−4)f′(x)=0 ⇒ x=−2, 1, 4\begin{aligned}&f'(x)=(x+2)(x-1)^{2}(x-4)\\&f'(x)=0\ \Rightarrow\ x=-2,\ 1,\ 4\end{aligned}
    2. A squared factor is never negative and does not change the sign; the other two do:

      x−214f′(x)+0−0−0+f(x)↗↘↘↗\begin{array}{c|ccccccc}x&&-2&&1&&4&\\\hline f'(x)&+&0&-&0&-&0&+\\f(x)&\nearrow&&\searrow&&\searrow&&\nearrow\end{array}

    Answer

    Increasing on (−∞, −2) and (4, ∞), decreasing on (−2, 4); a local maximum at −2, a local minimum at 4, and x = 1 is neither. No formula for f was needed.

    −2 max⁡,1 ¬max⁡, ¬min⁡,4 min⁡-2\ \max,\qquad 1\ \neg\max,\ \neg\min,\qquad 4\ \min

Supplementary problems, answers only

  1. Classify the critical points of f(x) = x³ − 12x.

    Show answer

    local maximum f(−2) = 16, local minimum f(2) = −16

    f(−2)=16 max⁡,f(2)=−16 min⁡f(-2)=16\ \max,\qquad f(2)=-16\ \min
  2. Where does f(x) = x e^(−x) increase and decrease?

    Show answer

    increasing on (−∞, 1), decreasing on (1, ∞); local maximum f(1) = 1/e ≈ 0.3679

    f(1)=1e≈0.3679 max⁡f(1)=\tfrac{1}{e}\approx0{.}3679\ \max
  3. Find and classify the critical points of f(x) = |x² − 4|.

    Show answer

    local minima f(−2) = f(2) = 0, at corners; local maximum f(0) = 4

    f(±2)=0 min⁡,f(0)=4 max⁡f(\pm2)=0\ \min,\qquad f(0)=4\ \max
  4. Classify the critical points of f(x) = x/(x² + 1).

    Show answer

    local minimum f(−1) = −1/2, local maximum f(1) = 1/2

    f(−1)=−12 min⁡,f(1)=12 max⁡f(-1)=-\tfrac{1}{2}\ \min,\qquad f(1)=\tfrac{1}{2}\ \max
  5. Find the absolute extremes of f(x) = x⁴ − 2x² on [−2, 3].

    Show answer

    absolute maximum f(3) = 63; absolute minimum −1, at x = −1 and x = 1

    max⁡[−2,3]f=f(3)=63min⁡[−2,3]f=f(±1)=−1\begin{aligned}&\max_{[-2,3]}f=f(3)=63\\&\min_{[-2,3]}f=f(\pm1)=-1\end{aligned}
  6. Find the absolute extremes of f(x) = x − 2 sin x on [0, π].

    Show answer

    absolute minimum f(π/3) = π/3 − √3 ≈ −0.6849; absolute maximum f(π) = π

    min⁡[0,π]f=π3−3≈−0.6849max⁡[0,π]f=π\begin{aligned}&\min_{[0,\pi]}f=\tfrac{\pi}{3}-\sqrt{3}\approx-0{.}6849\\&\max_{[0,\pi]}f=\pi\end{aligned}

One test point per interval is enough, even when f′ is not continuous

The sign chart tests f′ at a single x in each interval and trusts it for the whole stretch. That works because a derivative that exists all along an interval cannot change sign there without passing through 0, and the reason is not continuity: Gaston Darboux proved in 1875 that every derivative takes all the values between any two of its values, whether it is continuous or not. So f′ cannot jump from −1 to 1 and skip 0, and the sign function, which does exactly that at 0, is the derivative of nothing on an interval around 0. The only places f′ can switch sign are its zeros and the points where it does not exist. Press x⁴ − 4x³: f′ touches 0 at 0 without switching, and one test point either side shows it.

The test is sufficient, not necessary

A sign change of f′ proves an extreme; a missing sign change does not rule one out. Take f(x) = x²(2 + sin(1/x)) with f(0) = 0. Every other value is at least x², so 0 is a strict minimum. Yet f′(x) = 2x(2 + sin(1/x)) − cos(1/x) swings between about −1 and 1 however close you come to 0, so there is no interval to the left where f falls and none to the right where it rises. The first derivative test has nothing to say here, and the second derivative test cannot help either: f′(0) = 0, but f″(0) does not exist. What settles it is the definition: compare f(0) with its neighbours directly.

One critical point, a local maximum, and it is the highest point: in one variable

If f is continuous on an interval and has exactly one critical point, a local maximum, then that is the absolute maximum on the interval. For f to climb higher somewhere else it would have to fall and then rise again, and the turn in between would be a second critical point. The same holds for a minimum, and the interval is part of it. Press x + 4/x²: its one critical point is the minimum f(2) = 3, yet the graph falls below 3 left of 0, because the asymptote splits the domain into two intervals and 2 is the lowest point of only one of them. In two variables the argument fails even without a gap. f(x, y) = 3xeʸ − x³ − e³ʸ has one critical point, (1, 0), a local maximum with value 1, and f(−3, 0) = 17. On a surface the climb can go round the hill without passing another flat point.

Learning path

What f′ and f″ say about a graph

References (3)