Chapter VII · Additional theorems in the differential and integral calculus

Maxima and minima: the first non-vanishing derivative

§153 25 min

When ϕ′(ξ)=ϕ′′(ξ)=0\phi'(\xi) = \phi''(\xi) = 0, Taylor's theorem still decides between maximum, minimum and neither.

Why this matters

The second-derivative test of §§123–124 says: if ϕ′(ξ)=0\phi'(\xi) = 0 and ϕ′′(ξ)<0\phi''(\xi) < 0 there is a maximum, and if ϕ′′(ξ)>0\phi''(\xi) > 0 a minimum. But it says nothing when ϕ′′(ξ)=0\phi''(\xi) = 0 as well, and that happens for very simple functions: x3x^3, x4x^4 and −x4-x^4 all have ϕ′(0)=ϕ′′(0)=0\phi'(0) = \phi''(0) = 0, and they behave in three different ways. §153 closes this gap with the first application of Taylor’s theorem. Hardy himself remarks that the result matters more for completeness than for practice; its value is that it shows clearly why the second-derivative test works.

The idea

Near a point ξ\xi where the first n−1n - 1 derivatives vanish, Taylor’s theorem says that ϕ(ξ+h)−ϕ(ξ)\phi(\xi + h) - \phi(\xi) is almost exactly its leading term hnn!ϕ(n)(ξ)\frac{h^n}{n!}\phi^{(n)}(\xi). So close to ξ\xi, the graph looks like a multiple of hnh^n, and everything depends on two facts about that term:

  • if nn is even, hn>0h^n > 0 on both sides, so ϕ(ξ+h)−ϕ(ξ)\phi(\xi + h) - \phi(\xi) has the sign of ϕ(n)(ξ)\phi^{(n)}(\xi) on both sides: a minimum if it is positive, a maximum if it is negative;
  • if nn is odd, hnh^n changes sign with hh, so ϕ\phi is above ϕ(ξ)\phi(\xi) on one side and below on the other: neither.
Explore Zoom in on a stationary point

Try this. For each function in the menu, read the table: which derivative is the first that is not zero? Predict maximum, minimum or neither, then check the graph. Then drag the zoom down to 0.050.05.

ϕ(x)=x4\phi(x) = x^4 near ξ=0\xi = 0, window ∣x∣≤1|x| \le 1
xφ
  • φ(x) = x⁴
  • leading term φ⁽⁴⁾(0)x⁴/4!
Derivatives at 0
k12345678
φ⁽ᵏ⁾(0)000240000
The first non-zero derivative has even order 4 and is positive: a minimum.
What to notice

As you zoom in, the blue curve and the dashed leading term become indistinguishable: near ξ\xi the function is, in effect, its leading term, up to a relative error that tends to 00. The parity of nn gives the shape, the sign gives the direction. For e−1/x2e^{-1/x^2} every derivative at 00 vanishes, so the test says nothing, yet there is a minimum.

Precise statements

Recall Hardy’s definition (§123): ϕ(ξ)\phi(\xi) is a maximum if ϕ(ξ)>ϕ(x)\phi(\xi) > \phi(x) for all x≠ξx \ne \xi in some interval (ξ−ε,ξ+ε)(\xi - \varepsilon, \xi + \varepsilon), and a minimum similarly. These are what we now call strict local maxima and minima.

Theorem The test of the first non-vanishing derivative Hardy: §153

Suppose that ϕ\phi has nn derivatives at ξ\xi, that

ϕ′(ξ)=ϕ′′(ξ)=⋯=ϕ(n−1)(ξ)=0,ϕ(n)(ξ)≠0.\phi'(\xi) = \phi''(\xi) = \cdots = \phi^{(n-1)}(\xi) = 0, \qquad \phi^{(n)}(\xi) \ne 0.

If nn is even, ϕ(ξ)\phi(\xi) is a maximum when ϕ(n)(ξ)<0\phi^{(n)}(\xi) < 0 and a minimum when ϕ(n)(ξ)>0\phi^{(n)}(\xi) > 0. If nn is odd, ϕ(ξ)\phi(\xi) is neither a maximum nor a minimum.

In Hardy’s words: if there is to be a maximum or minimum, the first derivative that does not vanish must be of even order. The case n=2n = 2 is the familiar second-derivative test; the theorem says the same argument works one level further up whenever ϕ′′(ξ)=0\phi''(\xi) = 0.

Proofs

Proof The test of the first non-vanishing derivative
Strategy

Use Taylor’s theorem in the form of §151, which needs only the nn derivatives at the one point ξ\xi. All terms but the last vanish, and for small hh the last one is dominated by ϕ(n)(ξ)\phi^{(n)}(\xi), whose sign we know.

Expand about ξ\xi

Since ϕ′(ξ)=⋯=ϕ(n−1)(ξ)=0\phi'(\xi) = \dots = \phi^{(n-1)}(\xi) = 0, the theorem of §151 gives

ϕ(ξ+h)−ϕ(ξ)=hnn!{ϕ(n)(ξ)+η},η→0 as h→0.\phi(\xi + h) - \phi(\xi) = \frac{h^n}{n!}\bigl\{\phi^{(n)}(\xi) + \eta\bigr\}, \qquad \eta \to 0 \text{ as } h \to 0.

For small hh the bracket has the sign of ϕ(n)(ξ)\phi^{(n)}(\xi)

Because η→0\eta \to 0, there is an ε>0\varepsilon > 0 with ∣η∣<∣ϕ(n)(ξ)∣|\eta| < |\phi^{(n)}(\xi)| whenever 0<∣h∣<ε0 < |h| < \varepsilon. Then ϕ(n)(ξ)+η\phi^{(n)}(\xi) + \eta is non-zero and has the same sign as ϕ(n)(ξ)\phi^{(n)}(\xi).

nn even

Then hn>0h^n > 0 for every h≠0h \ne 0, so for 0<∣h∣<ε0 < |h| < \varepsilon the difference ϕ(ξ+h)−ϕ(ξ)\phi(\xi + h) - \phi(\xi) has the sign of ϕ(n)(ξ)\phi^{(n)}(\xi) on both sides of ξ\xi: negative everywhere near ξ\xi (a maximum) or positive everywhere (a minimum).

nn odd

Then hnh^n has the sign of hh, so ϕ(ξ+h)−ϕ(ξ)\phi(\xi + h) - \phi(\xi) takes one sign for small positive hh and the opposite sign for small negative hh. The value ϕ(ξ)\phi(\xi) is exceeded on one side and not reached on the other: neither a maximum nor a minimum.

Two limitations are worth stating plainly. The test needs some non-zero derivative: if all of them vanish at ξ\xi, as for e−1/x2e^{-1/x^2} at 00, it gives no information at all. And the theorem only describes ϕ\phi near ξ\xi; a local maximum need not be the largest value of ϕ\phi on its domain.

Worked examples and exercises

Exercise ●○○ Hardy: Examples LVII, 1

Verify the test for ϕ(x)=(x−a)m\phi(x) = (x - a)^m at ξ=a\xi = a, where mm is a positive integer.

Hint
Which derivatives of (x−a)m(x - a)^m vanish at aa?

Solution

The kk-th derivative is m(m−1)⋯(m−k+1)(x−a)m−km(m-1)\cdots(m-k+1)(x - a)^{m-k} for k≤mk \le m, which is 00 at x=ax = a for k<mk < m, while ϕ(m)(a)=m!>0\phi^{(m)}(a) = m! > 0. So the first non-vanishing derivative has order mm and is positive. The test predicts a minimum when mm is even and neither when mm is odd. This agrees with the graphs: (x−a)2,(x−a)4,…(x - a)^2, (x - a)^4, \dots are ≥0\ge 0 with equality only at aa, while (x−a)3,(x−a)5,…(x - a)^3, (x - a)^5, \dots change sign at aa.

Exercise ●●○ Hardy: Examples LVII, 2

Test ϕ(x)=(x−a)m(x−b)n\phi(x) = (x - a)^m (x - b)^n, where mm and nn are positive integers and a≠ba \ne b, for maxima and minima at x=ax = a and x=bx = b.

Hint
Near x=ax = a the factor (x−b)n(x - b)^n is close to the non-zero number (a−b)n(a - b)^n. Write ϕ(x)=(x−a)mg(x)\phi(x) = (x - a)^m g(x) and use Leibniz’s rule for the mm-th derivative.

Solution

Write ϕ(x)=(x−a)mg(x)\phi(x) = (x - a)^m g(x) with g(x)=(x−b)ng(x) = (x - b)^n. By Leibniz’s rule, every derivative of order k<mk < m at aa contains a positive power of (x−a)(x - a) in each term and so vanishes, while ϕ(m)(a)=m! g(a)=m! (a−b)n≠0\phi^{(m)}(a) = m!\,g(a) = m!\,(a - b)^n \ne 0.

So at x=ax = a: if mm is odd, neither. If mm is even, a minimum when (a−b)n>0(a - b)^n > 0 and a maximum when (a−b)n<0(a - b)^n < 0. Since (a−b)n<0(a - b)^n < 0 exactly when nn is odd and a<ba < b, the case ”mm even, nn odd, a<ba < b” gives a maximum at aa, and every other case with mm even gives a minimum.

At x=bx = b the roles swap: if nn is odd, neither; if nn is even, a minimum when (b−a)m>0(b - a)^m > 0 and a maximum when (b−a)m<0(b - a)^m < 0. For example x2(x−1)3x^2(x - 1)^3 (in the widget, with a=0a = 0, m=2m = 2, b=1b = 1, n=3n = 3) has a maximum at 00 (since (0−1)3<0(0 - 1)^3 < 0) and neither at 11.

Exercise ●●○ Hardy: Examples LVII, 3

Test sin⁡x−x\sin x - x,   sin⁡x−x+x33!\;\sin x - x + \dfrac{x^3}{3!},   …\;\dots and cos⁡x−1\cos x - 1,   cos⁡x−1+x22!\;\cos x - 1 + \dfrac{x^2}{2!},   …\;\dots for maxima and minima at x=0x = 0.

Hint
Subtracting the Maclaurin polynomial removes the corresponding derivatives at 00. What is the first one left?

Solution

Let Sk(x)=sin⁡x−(x−x33!+⋯+(−1)k−1x2k−1(2k−1)!)S_k(x) = \sin x - \bigl(x - \frac{x^3}{3!} + \cdots + (-1)^{k-1}\frac{x^{2k-1}}{(2k-1)!}\bigr). Its derivatives at 00 of order up to 2k2k vanish (those of order ≤2k−1\le 2k-1 cancel with the polynomial, and even-order derivatives of sin⁡\sin at 00 are zero). The first non-zero one is Sk(2k+1)(0)=sin⁡(2k+1)(0)=(−1)kS_k^{(2k+1)}(0) = \sin^{(2k+1)}(0) = (-1)^k, of odd order. So none of sin⁡x−x\sin x - x, sin⁡x−x+x3/6,…\sin x - x + x^3/6, \dots has a maximum or minimum at 00.

Let Ck(x)=cos⁡x−(1−x22!+⋯+(−1)k−1x2k−2(2k−2)!)C_k(x) = \cos x - \bigl(1 - \frac{x^2}{2!} + \cdots + (-1)^{k-1}\frac{x^{2k-2}}{(2k-2)!}\bigr). Its first non-zero derivative at 00 is Ck(2k)(0)=(−1)kC_k^{(2k)}(0) = (-1)^k, of even order. So CkC_k has a maximum at 00 when kk is odd (cos⁡x−1\cos x - 1, cos⁡x−1+x22−x424,…\cos x - 1 + \frac{x^2}{2} - \frac{x^4}{24}, \dots) and a minimum when kk is even (cos⁡x−1+x22,…\cos x - 1 + \frac{x^2}{2}, \dots). Check two of these in the widget.

Exercise When the test is silent ●●○ Hardy: §153 (our example)

Show that ϕ(x)=x4sin⁡2(1/x)\phi(x) = x^4 \sin^2(1/x), with ϕ(0)=0\phi(0) = 0, has ϕ′(0)=ϕ′′(0)=0\phi'(0) = \phi''(0) = 0 and ϕ(x)≥0\phi(x) \ge 0, but that ϕ(0)\phi(0) is not a maximum or a minimum in Hardy’s strict sense. What does this say about the test?

Hint
Where does ϕ\phi vanish near 00?

Solution

∣ϕ(h)∣≤h4|\phi(h)| \le h^4, so ϕ(h)/h→0\phi(h)/h \to 0 and ϕ′(0)=0\phi'(0) = 0. For x≠0x \ne 0, ϕ′(x)=4x3sin⁡2(1/x)−2x2sin⁡(1/x)cos⁡(1/x)\phi'(x) = 4x^3\sin^2(1/x) - 2x^2 \sin(1/x)\cos(1/x), so ∣ϕ′(h)∣≤6h2|\phi'(h)| \le 6h^2 and ϕ′(h)/h→0\phi'(h)/h \to 0: ϕ′′(0)=0\phi''(0) = 0. But ϕ(1/(kπ))=0=ϕ(0)\phi(1/(k\pi)) = 0 = \phi(0) for every integer kk, at points as close to 00 as we like, so ϕ(0)\phi(0) is not greater or less than all nearby values. The test cannot be applied: ϕ′′′(0)\phi'''(0) does not exist (ϕ′′\phi'' oscillates near 00), and there is no first non-vanishing derivative. The theorem needs that derivative to exist.

Check yourself

Check yourself Choose one

At ξ\xi we have ϕ′(ξ)=ϕ′′(ξ)=0\phi'(\xi) = \phi''(\xi) = 0 and ϕ′′′(ξ)=5\phi'''(\xi) = 5. Then ϕ(ξ)\phi(\xi) is

Why

The first non-vanishing derivative has odd order 33, so near ξ\xi the difference ϕ(ξ+h)−ϕ(ξ)≈56h3\phi(\xi + h) - \phi(\xi) \approx \frac56 h^3 changes sign with hh. The sign of an odd-order derivative only says on which side ϕ\phi is larger. No further derivatives are needed: the first non-zero one already decides.

Check yourself True or false?

If ϕ′(ξ)=0\phi'(\xi) = 0 and ϕ′′(ξ)=0\phi''(\xi) = 0, then ϕ\phi has neither a maximum nor a minimum at ξ\xi.

Why

False. x4x^4 has ϕ′(0)=ϕ′′(0)=0\phi'(0) = \phi''(0) = 0 and a minimum at 00. When ϕ′′(ξ)=0\phi''(\xi) = 0 the second-derivative test is merely silent; look further up, to the first derivative that is not zero.

Check yourself Choose one

The first non-vanishing derivative of ϕ\phi at ξ\xi is ϕ(6)(ξ)=−3\phi^{(6)}(\xi) = -3. What is ϕ(ξ)\phi(\xi)?

Why

Even order, negative value: ϕ(ξ+h)−ϕ(ξ)≈−3720h6<0\phi(\xi + h) - \phi(\xi) \approx -\frac{3}{720}h^6 < 0 on both sides. A maximum.

Check yourself True or false?

If every derivative of ϕ\phi at ξ\xi is zero, then ϕ\phi is constant near ξ\xi.

Why

False. e−1/x2e^{-1/x^2} (with value 00 at 00) has all derivatives zero at 00 and is positive everywhere else; it has a minimum at 00 that the test cannot detect. This is the same function that defeated Taylor’s series in the last lesson.

Hardy’s language

Summary

Summary
  • At a stationary point, look for the first derivative that is not zero, say ϕ(n)(ξ)\phi^{(n)}(\xi).
  • Near ξ\xi, ϕ(ξ+h)−ϕ(ξ)=hnn!{ϕ(n)(ξ)+η}\phi(\xi + h) - \phi(\xi) = \frac{h^n}{n!}\{\phi^{(n)}(\xi) + \eta\} with η→0\eta \to 0, so it has the sign of hnϕ(n)(ξ)h^n\phi^{(n)}(\xi).
  • nn even: maximum if ϕ(n)(ξ)<0\phi^{(n)}(\xi) < 0, minimum if >0> 0. nn odd: neither.
  • The test needs a non-vanishing derivative; for e−1/x2e^{-1/x^2} at 00 it is silent.