Local maxima and minima, the necessary condition φ′(ξ) = 0, the sign-change and second-derivative tests, and the examples of §125 that show which assumptions really matter.
Finding where a quantity is greatest or least is one of the oldest uses of the calculus. §123 and §124 give the tools: at a maximum or minimum of a differentiable function the derivative vanishes, and the sign of ϕ′ on either side, or the sign of ϕ′′ at the point, decides which it is. §125 then tests the limits of these tools. A maximum can occur where there is no derivative, and a derivative can exist everywhere without being continuous.
The idea
Hardy’s maxima and minima are local: ϕ(ξ) is a maximum if it is larger than every nearby value, whatever happens further away. A function can have many maxima and minima, and a maximum value can even be smaller than a minimum value elsewhere (Hardy’s Fig. 37). At a smooth peak the tangent is horizontal; but a horizontal tangent alone proves nothing. The reliable sign is a change in the direction of the graph: rising and then falling.
ExploreThe sign of ϕ′ around a turning point
Try this.For x3−3x+1, drag the point across x=−1 and x=1 and watch the sign of ϕ′ in the lower plot. Then switch to x3, x4 and 1−∣x∣.
ϕ(x)=x3−3x+1, ϕ′(x)=3x2−3
xφ(x)
xφ′(x)
y = φ(x)
tangent
y = φ′(x)
φ′ > 0 (shaded blue)
φ′ < 0 (shaded ochre)
At x=−2: ϕ(x)=−1, slope of the tangent ϕ′(x)=9. φ′ > 0: the graph is rising.
x = −1: maximum (φ′ changes from + to −); x = 1: minimum (φ′ changes from − to +).
What to notice
At the maximum x=−1, ϕ′ changes from + (blue shading) to − (ochre); at the minimum x=1, from − to +. For x3, ϕ′(0)=0 but ϕ′ is positive on both sides: no turning point. For x4 there is a minimum although ϕ′′(0)=0 too. For 1−∣x∣ there is a maximum at a corner, where ϕ′ does not exist, but the sign still changes from + to −.
Precise statements
DefinitionMaximum and minimumHardy: §123
ϕ(ξ) is a maximum of ϕ if there is an ε>0 such that ϕ(ξ)>ϕ(x) whenever 0<∣x−ξ∣<ε. It is a minimum if ϕ(ξ)<ϕ(x) for those x. A maximum or minimum is also called a turning value or an extremal value.
These are strict maxima. Hardy notes that one may relax the definition to ϕ(ξ)≥ϕ(x), so that a constant has a maximum at every point; the theorems below remain true.
If ϕ is differentiable at ξ and ϕ(ξ) is a maximum or a minimum, then ϕ′(ξ)=0.
The condition is not sufficient: x3 has ϕ′(0)=0 and neither a maximum nor a minimum at 0.
TheoremThe sign-change testHardy: §123
Let ϕ′(ξ)=0. If ϕ′(x)>0 for all x less than but near ξ, and ϕ′(x)<0 for all x greater than but near ξ, then ϕ(ξ) is a maximum. If the signs are the other way round, it is a minimum.
If ϕ′(ξ)=0 and ϕ′′(ξ)=0, then ϕ(ξ) is a maximum if ϕ′′(ξ)<0 and a minimum if ϕ′′(ξ)>0.
If ϕ′′(ξ)=0 as well, Theorem D says nothing. x4 (a minimum), −x4 (a maximum) and x3 (neither) all have ϕ′(0)=ϕ′′(0)=0.
Largest and smallest values on a closed interval. These are different questions from local maxima and minima. A continuous ϕ on [a,b] attains a greatest and a least value (§103). Each is attained either at an end point, where ϕ′ need not vanish, or at an interior point, where by Theorem C ϕ′=0 if ϕ′ exists. So it is enough to compare the values at the end points, at the stationary points inside, and at any points where ϕ′ fails to exist.
ExploreLargest and smallest on a closed interval
Try this.This is Examples XLVI, 8: ϕ(x)=x3−18x2+96x on [0,9]. Find the stationary points from the lower plot, then compare the values there with the values at the two ends (dashed lines).
ϕ(x)=x3−18x2+96x, ϕ′(x)=3(x−4)(x−8)
xφ(x)
xφ′(x)
y = φ(x)
tangent
y = φ′(x)
φ′ > 0 (shaded blue)
φ′ < 0 (shaded ochre)
At x=1: ϕ(x)=79, slope of the tangent ϕ′(x)=63. φ′ > 0: the graph is rising.
x = 4: maximum (φ′ changes from + to −); x = 8: minimum (φ′ changes from − to +).
On the closed interval [0, 9] the largest value is 160 (at x = 4) and the smallest is 0 (at x = 0): an end point, where φ′ need not vanish.
What to notice
ϕ′(x)=3(x−4)(x−8), so there is a maximum ϕ(4)=160 and a minimum ϕ(8)=128. The end values are ϕ(0)=0 and ϕ(9)=135. So the largest value on [0,9] is the local maximum 160, but the smallest is the end value 0, smaller than the local minimum. There ϕ′=96=0.
When the hypotheses fail (§125). The theorems so far assume that ϕ′ exists throughout. Take ϕ(x)=1−x2=1−∣x∣ on [−1,1] (Hardy’s Fig. 38). Then ϕ(−1)=ϕ(1)=0, but ϕ′=1 for x<0 and ϕ′=−1 for x>0, so Rolle’s theorem fails. And ϕ(0)=1 is a maximum at which Theorem C cannot be applied, since there is no derivative there. (The sign-change test, in the form “ϕ is continuous at ξ, rising on the left and falling on the right”, still detects it.)
The second point of §125 is subtler. All we have assumed is that ϕ′exists. We have never assumed that ϕ′ is continuous, and it need not be.
ExploreA derivative that exists everywhere but is not continuous
Try this.The solid curve is ϕ′ for ϕ(x)=x2sin(1/x) (dashed, much flatter). Drag the trace point towards 0 and read off the values of ϕ′.
y=ϕ′(x)=2xsinx1−cosx1(x=0),ϕ′(0)=0
xy
the curve
x² sin(1/x)
trace point (drag)
At x=0.05: y=−0.31679
What to notice
Arbitrarily close to 0, ϕ′ takes every value between about −1 and 1, because cos(1/x) does. Yet ϕ′(0)=0, computed from the definition in Examples XLIV, 16. A curve can have a tangent at every point whose direction does not vary continuously. What ϕ′ cannot do is jump, as you will see in Darboux’s theorem.
Proofs
ProofTheorem C
Strategy
Contrapositive of Theorem A (§122). A non-zero derivative makes the function rise through the point, so the point cannot be a maximum or a minimum.
Suppose ϕ′(ξ)>0
By Theorem A, ϕ(x)>ϕ(ξ) for x slightly greater than ξ, so ϕ(ξ) is not a maximum; and ϕ(x)<ϕ(ξ) for x slightly less than ξ, so it is not a minimum.
Suppose ϕ′(ξ)<0
The same, with the sides exchanged.
Conclude
At a maximum or minimum neither case can occur, so ϕ′(ξ)=0.
∎
ProofThe sign-change test
Strategy
Use Cor. 1 of §122 on each side: the function increases up to ξ and decreases after it.
Left of ξ
Choose ε so that ϕ′>0 on (ξ−ε,ξ). ϕ is differentiable, hence continuous, on [ξ−21ε,ξ], and ϕ′>0 inside. By Cor. 1, ϕ is strictly increasing there, so ϕ(x)<ϕ(ξ) for ξ−21ε≤x<ξ.
Right of ξ
In the same way (with ϕ′<0), ϕ is strictly decreasing on [ξ,ξ+21ε], so ϕ(x)<ϕ(ξ) for ξ<x≤ξ+21ε.
Conclude
ϕ(ξ)>ϕ(x) for all x=ξ within 21ε of ξ: a maximum. The argument uses only the continuity of ϕ at ξ, not ϕ′(ξ)=0, which is why it also handles the corner of 1−∣x∣.
∎
ProofTheorem D
Strategy
Apply Theorem A to the function ϕ′, whose derivative at ξ is ϕ′′(ξ). This produces exactly the sign change needed for the previous test.
ϕ′ exists near ξ
For ϕ′′(ξ) to exist, ϕ′ must be defined in an interval around ξ. So ϕ is differentiable, and continuous, near ξ.
Suppose ϕ′′(ξ)<0
By Theorem A applied to ϕ′ (with “<” in place of “>”), ϕ′(x)>ϕ′(ξ)=0 for x slightly less than ξ and ϕ′(x)<0 for x slightly greater.
Apply the sign-change test
ϕ′ changes from + to − at ξ, so ϕ(ξ) is a maximum. If ϕ′′(ξ)>0, the same argument gives a minimum.
∎
Proofx2sin(1/x): derivative everywhere, continuous derivative nowhere near 0
Strategy
Compute ϕ′ by the rules away from 0 and by the definition at 0, then look at ϕ′ along two sequences tending to 0.
Away from 0
For x=0, the product and chain rules give ϕ′(x)=2xsin(1/x)−cos(1/x).
At 0
{ϕ(h)−ϕ(0)}/h=hsin(1/h), and ∣hsin(1/h)∣≤∣h∣→0. So ϕ′(0)=0.
No limit at 0
At xk=1/(2kπ): ϕ′(xk)=0−1=−1. At xk′=1/{(2k+1)π}: ϕ′(xk′)=0+1=1. Both sequences tend to 0, so ϕ′(x) has no limit as x→0, and ϕ′ is discontinuous at 0. Hardy’s phrase is that ϕ′ oscillates between the “limits of indetermination” −1 and 1.
∎
Worked examples and exercises
Exercise●●○Hardy: Examples XLVI, 10
Show that (x+5)2(x3−10) has a minimum at x=1, and find its other turning values.
Hint
Factor the derivative completely: it has a factor x3+3x2−4, which vanishes at x=1.
Solution
ϕ′(x)=2(x+5)(x3−10)+3x2(x+5)2=(x+5)(5x3+15x2−20)=5(x+5)(x−1)(x+2)2. The stationary points are x=−5, −2, 1. Signs of ϕ′: positive for x<−5, negative on (−5,−2) and on (−2,1), positive for x>1. So x=−5 gives a maximum, ϕ(−5)=0; x=1 gives a minimum, ϕ(1)=36⋅(−9)=−324; and x=−2, where ϕ′ does not change sign (the factor (x+2)2), gives neither: it is a stationary point of inflexion.
Exercise●○○Hardy: Examples XLVI, 12
Show that (ax+b)/(cx+d) has no maxima or minima, whatever a, b, c, d may be.
Solution
The derivative is (cx+d)2a(cx+d)−c(ax+b)=(cx+d)2ad−bc. If ad=bc it never vanishes, and by Theorem C there is no maximum or minimum. (On each side of the pole x=−d/c the function is strictly monotonic.) If ad=bc the function is constant (where defined), and a constant has no strict maximum or minimum.
Exercise●●○Hardy: Examples XLVI, 21
Show that the maximum value of (x−1)2/(x+1)3 is 272.
Hint
Factor the derivative as (x−1)(5−x)/(x+1)4.
Solution
ϕ′(x)=(x+1)62(x−1)(x+1)3−3(x−1)2(x+1)2=(x+1)4(x−1){2(x+1)−3(x−1)}=(x+1)4(x−1)(5−x). For x>−1: ϕ′<0 on (−1,1), >0 on (1,5), <0 for x>5. So x=1 gives a minimum (0) and x=5 a maximum, ϕ(5)=16/216=2/27. For x<−1, ϕ′<0 throughout (both x−1 and 5−x have fixed signs, with product negative), so there are no other turning values.
Exercise●○○Hardy: Examples XLVI, 23
Find the maxima and minima of acosx+bsinx (with a, b not both 0), and check by writing it as Acos(x−α).
Solution
ϕ′(x)=−asinx+bcosx, which vanishes when tanx=b/a (or cosx=0 if a=0). Put A=a2+b2 and choose α with cosα=a/A, sinα=b/A. Then acosx+bsinx=Acos(x−α), with maxima A at x=α+2kπ and minima −A at x=α+(2k+1)π. Theorem D agrees: ϕ′′=−ϕ, which is −A<0 at the first set of points and A>0 at the second.
Exercise●●○Hardy: Examples XLVI, 37
Show that the greatest value of xmyn, where x,y>0, x+y=k and m, n are positive, is (m+n)m+nmmnnkm+n.
Hint
Substitute y=k−x and maximise ϕ(x)=xm(k−x)n on (0,k).
Solution
ϕ′(x)=xm−1(k−x)n−1{m(k−x)−nx}, which on (0,k) vanishes only at x=mk/(m+n), with ϕ′>0 before and <0 after. So this is a maximum. Since ϕ is continuous on [0,k] with ϕ(0)=ϕ(k)=0 and ϕ>0 inside, it is the greatest value. There y=nk/(m+n), and
xmyn=(m+n)mmmkm⋅(m+n)nnnkn=(m+n)m+nmmnnkm+n.
Check yourself
Check yourselfTrue or false?
If ϕ′(ξ)=0, then ϕ has a maximum or a minimum at ξ.
Why
False: x3 at 0. Theorem C gives a necessary condition only. You also need a sign change of ϕ′, or ϕ′′(ξ)=0.
Check yourselfEnter a number
What is the largest value of x3−18x2+96x on the closed interval [0,9]?
Why
The candidates are the ends (0 and 135) and the stationary points x=4 (160) and x=8 (128). The largest is 160. (The smallest is 0, at an end point, not at the local minimum.)
Check yourselfChoose one
For ϕ(x)=x4 at ξ=0, what does Theorem D say?
Why
ϕ′(x)=4x3 and ϕ′′(x)=12x2 both vanish at 0, so Theorem D is silent. ϕ′ changes from − to + at 0, so the sign-change test gives a minimum. So ϕ′′(ξ)=0 does not mean “neither”; and x3, which gives neither, shows that it does not mean an extremum either.
Check yourselfTrue or false?
A function can have a maximum value that is smaller than one of its minimum values.
Why
True: maxima and minima are local. In Hardy’s Fig. 37 the maximum at A3 is lower than the minimum at B1. For a concrete example, x+2sinx has a maximum at x=32π, of value about 3.83, and a minimum at x=310π, of value about 8.74.
Check yourselfChoose one
Which statement about a function ϕ that has a derivative at every point is correct?
Why
x2sin(1/x) has a discontinuous derivative, so the first option is false. But Hardy notes at the end of §125, and proves in §126 and §129, that a derivative cannot have a simple (jump) discontinuity. The last option is false too: x2sin(1/x2) is differentiable everywhere, with an unbounded derivative near 0.
Hardy’s language
Summary
Summary
Maxima and minima are local; a maximum value may be smaller than a minimum value elsewhere.
Theorem C: at a maximum or minimum of a differentiable function, ϕ′=0. Necessary, not sufficient.
Sufficient: ϕ′ changes sign (+ to −: maximum; − to +: minimum), or ϕ′(ξ)=0 with ϕ′′(ξ)=0 (Theorem D). If ϕ′′(ξ)=0, Theorem D says nothing.
On a closed interval, compare the end points, the stationary points and the points where ϕ′ fails to exist.
A derivative may exist everywhere and still be discontinuous (x2sin(1/x)), but it never has a jump.