Chapter VI · Derivatives and integrals

The sign of the derivative and Rolle’s theorem

§122 40 min

What a positive derivative says at a point and on an interval, Rolle’s theorem, and why the hypotheses are “continuous on the closed interval, differentiable on the open one”.

Why this matters

So far we have computed derivatives. Now we use them. The derivative is defined by a limit at a single point, yet we want to draw conclusions about a function on a whole interval: that it is increasing, that it is positive, that it has a turning point. §122 provides the bridge, and its key result is Rolle’s theorem: a differentiable function that takes equal values at two points has a horizontal tangent somewhere between them. The mean value theorem, the tests for maxima and minima, and Darboux’s theorem all follow from it.

The idea

Picture a smooth curve that starts and ends at the same height. Unless it is flat, it must go up and come back down (or down and back up), and at the highest (or lowest) point the tangent should be horizontal. That is the whole of Rolle’s theorem. The proof makes each part of the picture precise. A highest point exists because a continuous function on a closed interval attains its bounds (§103). At that point the derivative cannot be positive or negative, because then the curve would rise above the top on one side.

Explore Find the horizontal tangent

Try this. The curve is sin⁡x\sin x on [0,π][0, \pi], with equal end values. Drag the end points (keeping their heights equal is hard, so watch the read-out). Then use the second widget, ∣x∣|x| on [−1,1][-1, 1].

f(x)=sin⁡xf(x) = \sin x, on [0, 3.14][0,\ 3.14]
xy
  • y = f(x)
  • chord (drag its ends)
  • horizontal tangent at c
Rolle: if ff is continuous on [a,b][a,b], differentiable in (a,b)(a,b) and f(a)=f(b)f(a)=f(b), then f′(c)=0f'(c)=0 for some cc in (a,b)(a,b).
Chord slope f(b)−f(a)b−a=3.898×10−17\dfrac{f(b)-f(a)}{b-a} = 3.898 \times 10^{-17}; Rolle looks for f′(c)=0f'(c) = 0.
One point with the required tangent: c=1.571c = 1.571.
f(x)=∣x∣f(x) = |x|, on [−1, 1][-1,\ 1]
xy
  • y = f(x)
  • chord (drag its ends)
  • horizontal tangent at c
Rolle: if ff is continuous on [a,b][a,b], differentiable in (a,b)(a,b) and f(a)=f(b)f(a)=f(b), then f′(c)=0f'(c)=0 for some cc in (a,b)(a,b).
Chord slope f(b)−f(a)b−a=0\dfrac{f(b)-f(a)}{b-a} = 0; Rolle looks for f′(c)=0f'(c) = 0.
Hypothesis fails: f is not differentiable at x = 0 (corner).
No point c in (a, b) works.
What to notice

For sin⁡x\sin x the point c=12πc = \tfrac12\pi appears whenever f(a)=f(b)f(a) = f(b). If you make the end heights unequal, a point with a horizontal tangent may or may not exist: Rolle no longer promises one. For ∣x∣|x| the end values are equal and the function is continuous, yet no horizontal tangent exists. The lowest point is a corner, where there is no derivative at all.

Precise statements

Hardy uses (a,b)(a, b) for both kinds of interval and says which he means. We write [a,b][a, b] for the closed interval a≤x≤ba \le x \le b and (a,b)(a, b) for the open interval a<x<ba < x < b. The standing hypotheses of the next sections are:

  1. ϕ\phi is continuous on the closed interval [a,b][a, b] (at the ends, continuity from the inside, as in §99);
  2. ϕ′(x)\phi'(x) exists at every point of the open interval (a,b)(a, b).

The mismatch is deliberate. Continuity at the end points is needed, as the quizzes below show. A derivative at the end points is not needed, and would not even make sense if we know nothing about ϕ\phi outside [a,b][a, b].

Theorem A positive derivative at a point Hardy: Theorem A, §122

If ϕ′(x0)>0\phi'(x_0) > 0, then ϕ(x)<ϕ(x0)\phi(x) < \phi(x_0) for all x<x0x < x_0 sufficiently near x0x_0, and ϕ(x)>ϕ(x0)\phi(x) > \phi(x_0) for all x>x0x > x_0 sufficiently near x0x_0. (Similarly with the inequalities reversed if ϕ′(x0)<0\phi'(x_0) < 0.)

Hardy expresses this by saying that ϕ\phi is increasing at the point x0x_0. This is weaker than “increasing in an interval containing x0x_0”, as we shall see.

Theorem Rolle’s theorem Hardy: Theorem B, §122

If ϕ\phi is continuous on [a,b][a, b], differentiable in (a,b)(a, b), and ϕ(a)=ϕ(b)\phi(a) = \phi(b), then there is a point ξ\xi with a<ξ<ba < \xi < b at which ϕ′(ξ)=0\phi'(\xi) = 0.

Corollary Positive derivative ⇒ increasing Hardy: Theorem B, Cor. 1

If ϕ\phi is continuous on [a,b][a, b], differentiable in (a,b)(a, b), and ϕ′(x)>0\phi'(x) > 0 for every xx in (a,b)(a, b), then ϕ\phi is strictly increasing on [a,b][a, b]: ϕ(x1)<ϕ(x2)\phi(x_1) < \phi(x_2) whenever a≤x1<x2≤ba \le x_1 < x_2 \le b.

Corollary Positive derivative and a non-negative start Hardy: Theorem B, Cor. 2

If, in addition, ϕ(a)≥0\phi(a) \ge 0, then ϕ(x)>0\phi(x) > 0 for a<x≤ba < x \le b.

Proofs

Proof Theorem A
Strategy

A positive limit forces the quotient itself to be positive near the point. A positive quotient means that numerator and denominator have the same sign.

The quotient is eventually positive

{ϕ(x0+h)−ϕ(x0)}/h→ϕ′(x0)>0\{\phi(x_0 + h) - \phi(x_0)\}/h \to \phi'(x_0) > 0. Take ε=ϕ′(x0)\varepsilon = \phi'(x_0) in the definition of the limit: there is δ>0\delta > 0 such that for 0<∣h∣<δ0 < |h| < \delta the quotient lies within ϕ′(x0)\phi'(x_0) of ϕ′(x0)\phi'(x_0), and so is positive.

Read off the signs

For 0<h<δ0 < h < \delta the numerator has the sign of hh, so ϕ(x0+h)>ϕ(x0)\phi(x_0 + h) > \phi(x_0). For −δ<h<0-\delta < h < 0 it is negative, so ϕ(x0+h)<ϕ(x0)\phi(x_0 + h) < \phi(x_0).

Proof Rolle’s theorem
Strategy

Reduce to ϕ(a)=ϕ(b)=0\phi(a) = \phi(b) = 0. If ϕ\phi is identically zero, every point works. Otherwise ϕ\phi is somewhere positive (or somewhere negative). Take a point where the greatest (or least) value is attained, which exists by continuity on a closed interval. It is inside the interval, and Theorem A shows that the derivative there can be neither positive nor negative.

Reduce to end values 00

If ϕ(a)=ϕ(b)=k\phi(a) = \phi(b) = k, consider ϕ(x)−k\phi(x) - k instead: it has the same derivative, and end values 00.

The trivial case

If ϕ(x)=0\phi(x) = 0 throughout [a,b][a, b] then ϕ′(x)=0\phi'(x) = 0 at every point of (a,b)(a, b), and there is nothing to prove.

Otherwise, a maximum inside

Suppose ϕ\phi is positive somewhere (if it is only ever negative or zero, apply the same argument to −ϕ-\phi). Being continuous on the closed interval, ϕ\phi has an upper bound MM, and ϕ(ξ)=M\phi(\xi) = M for some ξ\xi in [a,b][a, b] (§103, Theorem 2). Since M>0=ϕ(a)=ϕ(b)M > 0 = \phi(a) = \phi(b), ξ\xi is neither aa nor bb.

The derivative there is zero

If ϕ′(ξ)>0\phi'(\xi) > 0, Theorem A gives points just to the right of ξ\xi with ϕ(x)>ϕ(ξ)=M\phi(x) > \phi(\xi) = M; if ϕ′(ξ)<0\phi'(\xi) < 0, points just to the left. Either contradicts the definition of MM. Since ϕ′(ξ)\phi'(\xi) exists (because ξ\xi is in the open interval), it must be 00.

Hardy proves Cor. 1 directly from Rolle’s theorem. The argument is a nice example of combining the theorems of Chapter V with Rolle. (A shorter proof follows from the mean value theorem, in §126.)

Proof Cor. 1: positive derivative ⇒ increasing
Strategy

Take a<x1<x2<ba < x_1 < x_2 < b. Rule out ϕ(x1)=ϕ(x2)\phi(x_1) = \phi(x_2) and ϕ(x1)>ϕ(x2)\phi(x_1) > \phi(x_2): each would produce a point where ϕ′=0\phi' = 0. Then extend to the end points by continuity.

Equality is impossible

If ϕ(x1)=ϕ(x2)\phi(x_1) = \phi(x_2), Rolle’s theorem on [x1,x2][x_1, x_2] gives a point between them with ϕ′=0\phi' = 0, contrary to ϕ′>0\phi' > 0.

A decrease is impossible

Suppose ϕ(x1)>ϕ(x2)\phi(x_1) > \phi(x_2). Since ϕ′(x1)>0\phi'(x_1) > 0, Theorem A gives a point x3x_3 slightly to the right of x1x_1 (and before x2x_2) with ϕ(x3)>ϕ(x1)>ϕ(x2)\phi(x_3) > \phi(x_1) > \phi(x_2). By the intermediate value theorem (§101), ϕ\phi takes the value ϕ(x1)\phi(x_1) at some x4x_4 between x3x_3 and x2x_2. Then ϕ(x1)=ϕ(x4)\phi(x_1) = \phi(x_4), and Rolle on [x1,x4][x_1, x_4] gives a zero of ϕ′\phi': a contradiction again.

So ϕ(x1)<ϕ(x2)\phi(x_1) < \phi(x_2) inside

We have shown ϕ(x1)<ϕ(x2)\phi(x_1) < \phi(x_2) whenever a<x1<x2<ba < x_1 < x_2 < b.

The end points

If a<x<x′<ba < x < x' < b then ϕ(x)<ϕ(x′)\phi(x) < \phi(x'), and letting x→ax \to a (continuity at aa) gives ϕ(a)≤ϕ(x′)\phi(a) \le \phi(x'). Choosing a point x′′x'' between aa and x′x', we get ϕ(a)≤ϕ(x′′)<ϕ(x′)\phi(a) \le \phi(x'') < \phi(x'): strict. The end bb is treated in the same way.

Cor. 2 is immediate: ϕ(x)>ϕ(a)≥0\phi(x) > \phi(a) \ge 0 for a<x≤ba < x \le b.

Now compare Cor. 1, which assumes ϕ′>0\phi' > 0 at every point of an interval, with Theorem A, which assumes ϕ′(x0)>0\phi'(x_0) > 0 at one point. Theorem A gives ϕ(x1)<ϕ(x0)<ϕ(x2)\phi(x_1) < \phi(x_0) < \phi(x_2) for x1<x0<x2x_1 < x_0 < x_2 close to x0x_0, but only when x1x_1 and x2x_2 are on opposite sides of x0x_0. It says nothing about two points on the same side. In §125 Hardy gives an example showing that this gap is real.

Explore Increasing at a point, but on no interval

Try this. Here ϕ(x)=αx+x2sin⁡(1/x)\phi(x) = \alpha x + x^2\sin(1/x), with ϕ′(0)=α\phi'(0) = \alpha. Keep α=0.5\alpha = 0.5 and zoom in on 00 as far as the slider allows. Then raise α\alpha above 11 and zoom again.

ϕ(x)=0.5x+x2sin⁡1x,ϕ′(0)=0.5\phi(x) = 0.5x + x^2\sin\frac1x,\quad \phi'(0) = 0.5
xφ
xφ′
  • y = φ(x)
  • tangent at 0, slope α
  • y = φ′(x)
  • where φ′ < 0 (φ decreasing)
Theorem A holds: since ϕ′(0)>0\phi'(0) > 0, the graph is below 00 just to the left of the origin and above it just to the right. But ϕ′(x)=α+2xsin⁡(1/x)−cos⁡(1/x)\phi'(x) = \alpha + 2x\sin(1/x) - \cos(1/x) equals α−1=−0.5\alpha - 1 = -0.5 at every x=1/(2kπ)x = 1/(2k\pi). The plot resolves 64 shaded intervals where φ decreases, 60 of them within 0.06 of 0. Zoom in as far as you like: they never stop, so φ is increasing on no interval around 0.
What to notice

With α=0.5\alpha = 0.5, the graph crosses the origin going upward, as Theorem A promises. But the shaded intervals where ϕ′<0\phi' < 0 (and ϕ\phi decreases) never stop accumulating at 00, because ϕ′(x)=α−1<0\phi'(x) = \alpha - 1 < 0 at every x=1/(2kπ)x = 1/(2k\pi). So no interval around 00, however small, is one on which ϕ\phi increases. With α>1\alpha > 1, ϕ′\phi' stays positive near 00, and Cor. 1 applies.

Worked examples and exercises

Exercise ●○○ Hardy: Examples XLVI, 1

Verify Rolle’s theorem for ϕ(x)=(x−a)m(x−b)n\phi(x) = (x - a)^m(x - b)^n on [a,b][a, b], where mm, nn are positive integers.

Hint
Factor ϕ′(x)\phi'(x) as (x−a)m−1(x−b)n−1(x - a)^{m-1}(x - b)^{n-1} times a linear polynomial.

Solution

ϕ(a)=ϕ(b)=0\phi(a) = \phi(b) = 0, and ϕ′(x)=(x−a)m−1(x−b)n−1{m(x−b)+n(x−a)}\phi'(x) = (x - a)^{m-1}(x - b)^{n-1}\{m(x - b) + n(x - a)\}. The linear factor vanishes at ξ=(mb+na)/(m+n)\xi = (mb + na)/(m + n), a weighted average of aa and bb with positive weights, so a<ξ<ba < \xi < b. Theorem B is verified. Note that ξ\xi divides [a,b][a, b] in the ratio m:nm : n, closer to the root of lower multiplicity.

Exercise ●●○ Hardy: Examples XLVI, 2

Show that x−sin⁡xx - \sin x is increasing on the whole line, and that tan⁡x−x\tan x - x increases on (−12π,12π)(-\tfrac12\pi, \tfrac12\pi). For which aa is ax−sin⁡xax - \sin x monotonic on the whole line?

Hint
The derivatives are 1−cos⁡x1 - \cos x and tan⁡2x\tan^2 x: positive except at isolated points. Apply Cor. 1 between consecutive zeros and join the pieces.

Solution

(x−sin⁡x)′=1−cos⁡x(x - \sin x)' = 1 - \cos x, which is positive except at the points 2kπ2k\pi. On each interval [2kπ,2(k+1)π][2k\pi, 2(k + 1)\pi] the derivative is positive in the interior, so by Cor. 1 the function is strictly increasing on the closed interval. Consecutive intervals share their end points, so the function is strictly increasing on the whole line.

(tan⁡x−x)′=sec⁡2x−1=tan⁡2x(\tan x - x)' = \sec^2 x - 1 = \tan^2 x, positive on (−12π,12π)(-\tfrac12\pi, \tfrac12\pi) except at 00. Apply Cor. 1 on [c,0][c, 0] and [0,d][0, d] for any −12π<c<0<d<12π-\tfrac12\pi < c < 0 < d < \tfrac12\pi, and join.

(ax−sin⁡x)′=a−cos⁡x(ax - \sin x)' = a - \cos x. If a≥1a \ge 1 this is ≥0\ge 0, vanishing at most at isolated points, so the function increases. If a≤−1a \le -1 it decreases. If −1<a<1-1 < a < 1 the derivative takes both signs (it is a−1<0a - 1 < 0 at x=0x = 0 and a+1>0a + 1 > 0 at x=πx = \pi), and by Theorem A the function rises near some points and falls near others, so it is not monotonic.

Exercise ●●○ Hardy: Examples XLVI, 3

Show that x/sin⁡xx/\sin x increases steadily on (0,12π)(0, \tfrac12\pi).

Hint
The derivative is (sin⁡x−xcos⁡x)/sin⁡2x(\sin x - x\cos x)/\sin^2 x. Divide the numerator by cos⁡x>0\cos x > 0, and use the previous exercise.

Solution

(xsin⁡x)′=sin⁡x−xcos⁡xsin⁡2x=cos⁡x (tan⁡x−x)sin⁡2x\left(\dfrac{x}{\sin x}\right)' = \dfrac{\sin x - x\cos x}{\sin^2 x} = \dfrac{\cos x\,(\tan x - x)}{\sin^2 x}. On (0,12π)(0, \tfrac12\pi), cos⁡x>0\cos x > 0, and tan⁡x−x>0\tan x - x > 0 because tan⁡x−x\tan x - x is strictly increasing and equals 00 at x=0x = 0 (Cor. 2). So the derivative is positive and, by Cor. 1, x/sin⁡xx/\sin x is strictly increasing. Since x/sin⁡x→1x/\sin x \to 1 as x→0x \to 0, it increases from 11 to 12π\tfrac12\pi as xx goes from 00 to 12π\tfrac12\pi.

Exercise ●●○ Hardy: Examples XLVI, 5

Show that, for x>0x > 0: sin⁡x<x\sin x < x, then cos⁡x>1−12x2\cos x > 1 - \tfrac12x^2, then sin⁡x>x−16x3\sin x > x - \tfrac16x^3.

Hint
Each function in the chain vanishes at 00, and its derivative is (plus or minus) the previous function. Use Cor. 2 repeatedly.

Solution

Let f1(x)=x−sin⁡xf_1(x) = x - \sin x. Then f1(0)=0f_1(0) = 0 and f1′(x)=1−cos⁡x≥0f_1'(x) = 1 - \cos x \ge 0, vanishing only at isolated points; by the previous exercise f1f_1 is strictly increasing, so f1(x)>0f_1(x) > 0 for x>0x > 0.

Let f2(x)=cos⁡x−1+12x2f_2(x) = \cos x - 1 + \tfrac12x^2. Then f2(0)=0f_2(0) = 0 and f2′(x)=x−sin⁡x=f1(x)>0f_2'(x) = x - \sin x = f_1(x) > 0 for x>0x > 0. By Cor. 2 on [0,b][0, b], for every b>0b > 0, f2(x)>0f_2(x) > 0 for x>0x > 0.

Let f3(x)=sin⁡x−x+16x3f_3(x) = \sin x - x + \tfrac16x^3. Then f3(0)=0f_3(0) = 0 and f3′(x)=cos⁡x−1+12x2=f2(x)>0f_3'(x) = \cos x - 1 + \tfrac12x^2 = f_2(x) > 0 for x>0x > 0, so f3(x)>0f_3(x) > 0 for x>0x > 0.

Continuing in the same way gives Hardy’s general result: the partial sums of the series for cos⁡x\cos x and sin⁡x\sin x are alternately above and below the functions. These are the first error bounds for Taylor polynomials, which come in Chapter VII.

Exercise Interlacing zeros ●●● Hardy: Examples XLVI, 7

Suppose uu, vv, u′u', v′v' are continuous on an interval, and uv′−u′vuv' - u'v never vanishes there. Show that between any two zeros of uu lies a zero of vv, and conversely. Check with u=cos⁡xu = \cos x, v=sin⁡xv = \sin x.

Hint
If vv had no zero on [α,β][\alpha, \beta], where α\alpha and β\beta are consecutive zeros of uu, then u/vu/v would satisfy the hypotheses of Rolle’s theorem there.

Solution

Let α<β\alpha < \beta be zeros of uu. First, v(α)≠0v(\alpha) \ne 0: otherwise uv′−u′v=0uv' - u'v = 0 at α\alpha. Similarly v(β)≠0v(\beta) \ne 0. Suppose vv has no zero in (α,β)(\alpha, \beta). Then v≠0v \ne 0 on the closed interval [α,β][\alpha, \beta], so u/vu/v is continuous on [α,β][\alpha, \beta] and differentiable inside, and it vanishes at α\alpha and β\beta. By Rolle, (u/v)′=(u′v−uv′)/v2=0(u/v)' = (u'v - uv')/v^2 = 0 at some point inside, so uv′−u′v=0uv' - u'v = 0 there, contrary to hypothesis. Hence vv vanishes between α\alpha and β\beta. The converse follows by exchanging uu and vv (the hypothesis is symmetric up to sign).

For u=cos⁡xu = \cos x, v=sin⁡xv = \sin x: uv′−u′v=cos⁡2x+sin⁡2x=1≠0uv' - u'v = \cos^2 x + \sin^2 x = 1 \ne 0, and indeed the zeros 12π+kπ\tfrac12\pi + k\pi of cos⁡\cos and kπk\pi of sin⁡\sin alternate.

Check yourself

Check yourself True or false?

If ϕ′(x0)>0\phi'(x_0) > 0, then ϕ\phi is increasing on some interval (x0−ε,x0+ε)(x_0 - \varepsilon, x_0 + \varepsilon).

Why

False. The example αx+x2sin⁡(1/x)\alpha x + x^2\sin(1/x) with 0<α<10 < \alpha < 1 has ϕ′(0)=α>0\phi'(0) = \alpha > 0, but ϕ′\phi' is negative at points arbitrarily close to 00. Theorem A only compares ϕ(x)\phi(x) with ϕ(x0)\phi(x_0), not two values on the same side. The statement becomes true if ϕ′\phi' is continuous at x0x_0, because then ϕ′>0\phi' > 0 on a whole interval and Cor. 1 applies.

Check yourself Choose one

Let ϕ(x)=x\phi(x) = x for 0≤x<10 \le x < 1 and ϕ(1)=0\phi(1) = 0. Then ϕ(0)=ϕ(1)\phi(0) = \phi(1) and ϕ′(x)=1\phi'(x) = 1 throughout (0,1)(0, 1). Why does Rolle’s theorem not apply?

Why

ϕ\phi is differentiable at every point of the open interval, with ϕ′=1≠0\phi' = 1 \ne 0, so no ξ\xi exists. What fails is continuity at the end point 11. That is why condition (1) is imposed on the closed interval: without it the maximum of ϕ\phi need not be attained, and the proof collapses.

Check yourself Enter a number

Rolle’s theorem applies to ϕ(x)=x(x−1)2\phi(x) = x(x - 1)^2 on [0,1][0, 1]. At which ξ\xi in (0,1)(0, 1) is ϕ′(ξ)=0\phi'(\xi) = 0?

Why

ϕ′(x)=(x−1)2+2x(x−1)=(x−1)(3x−1)\phi'(x) = (x - 1)^2 + 2x(x - 1) = (x - 1)(3x - 1), which vanishes at x=1x = 1 (an end point, not allowed) and at x=13x = \tfrac13. This agrees with the formula (mb+na)/(m+n)(mb + na)/(m + n) with m=1m = 1 for the root a=0a = 0 and n=2n = 2 for the root b=1b = 1: (1⋅1+2⋅0)/3=13(1 \cdot 1 + 2 \cdot 0)/3 = \tfrac13.

Check yourself True or false?

Rolle’s theorem cannot be applied to 1−x2\sqrt{1 - x^2} on [−1,1][-1, 1], because this function has no derivative at x=±1x = \pm 1.

Why

False. Rolle needs differentiability only in the open interval (−1,1)(-1, 1), where 1−x2\sqrt{1 - x^2} is differentiable, and continuity on the closed interval, which holds. The conclusion holds with ξ=0\xi = 0, the top of the semicircle. This is exactly why the hypotheses are split between the closed and open intervals.

Hardy’s language

It may seem odd to use the closed interval in one condition and the open one in the other, but we shall find the distinction important.

— G. H. Hardy, §122

Summary

Summary
  • Hypotheses throughout: continuous on the closed interval [a,b][a, b], differentiable on the open interval (a,b)(a, b).
  • Theorem A: ϕ′(x0)>0\phi'(x_0) > 0 means ϕ\phi is below ϕ(x0)\phi(x_0) just to the left and above it just to the right. It does not make ϕ\phi increasing on an interval.
  • Rolle: equal end values ⇒ ϕ′(ξ)=0\phi'(\xi) = 0 for some interior ξ\xi. Proof: an extreme value is attained inside, and there Theorem A forces ϕ′=0\phi' = 0.
  • Cor. 1: ϕ′>0\phi' > 0 on the whole open interval ⇒ ϕ\phi strictly increasing on the closed interval. Cor. 2 turns this into inequalities such as sin⁡x<x\sin x < x.
  • Each hypothesis matters: ∣x∣|x| (no derivative at one point) and a jump at an end point are counterexamples.