Mean value theorem

In document Basic Analysis: Introduction to Real Analysis (Page 147-155)

The Derivative

4.2 Mean value theorem

Note: 2 lectures (some applications may be skipped)

4.2.1

Relative minima and maxima

We talked about absolute maxima and minima. These are the tallest peaks and lowest valleys in the whole mountain range. We also want to talk about peaks of individual mountains and bottoms of individual valleys.

Definition 4.2.1. LetSRbe a set and let f: SRbe a function. The function f is said to have arelative maximumatcSif there exists aδ >0 such that for allx∈Swhere|x−c|<δ we have

f(x) f(c). The definition ofrelative minimumis analogous.

Lemma 4.2.2. Let f: [a,b]Rbe a function differentiable at c(a,b), and f has a relative

minimum or a relative maximum at c. Then f0(c) =0.

Proof. We prove the statement for a maximum. For a minimum the statement follows by considering the function−f.

Letcbe a relative maximum of f. In particular, as long as|x−c|<δ we have f(x)−f(c)≤0.

Then we look at the difference quotient. Ifx>cwe note that

f(x)f(c) x−c ≤0, and ify<cwe have

f(y)−f(c) yc ≥0. See for an illustration.

c y

slope= f(yy)−cf(c) 0

x

slope= f(x)xcf(c) 0

Figure 4.3:Slopes of secants at a relative maximum.

Asa<c<b, there exist sequences{xn}and{yn}, such thatxn>c, andyn<cfor alln∈N,

and such that limxn=limyn=c. Since f is differentiable atcwe know 0≥ lim n→∞ f(xn)−f(c) xn−c = f 0(c) = lim n→∞ f(yn)− f(c) yn−c ≥0.

For a differentiable function, a point where f0(c) =0 is called acritical point. When f is not differentiable at some points, it is common to also saycis a critical point if f0(c)does not exist. The theorem says that a relative minimum or maximum at an interior point of an interval must be a critical point. As you remember from calculus, finding minima and maxima of a function can be done by finding all the critical points together with the endpoints of the interval and simply checking at which of these points is the function biggest or smallest.

4.2.2

Rolle’s theorem

Suppose a function has the same value at both endpoints of an interval. Intuitively it ought to attain a minimum or a maximum in the interior of the interval, then at such a minimum or a maximum, the derivative should be zero. See for the geometric idea. This is the content of the so-called Rolle’s theorem .

c

a b

Figure 4.4:Point where tangent line is horizontal, that is f0(c) =0.

Theorem 4.2.3(Rolle). Let f: [a,b]Rbe continuous function differentiable on(a,b)such that

f(a) = f(b). Then there exists a c∈(a,b)such that f0(c) =0.

Proof. As f is continuous on[a,b]it attains an absolute minimum and an absolute maximum in

[a,b]. We wish to apply and so we need a minimum or maximum at somec(a,b).

WriteK:= f(a) = f(b). If there exists anxsuch that f(x)>K, then the absolute maximum is

bigger thanK and hence occurs atc∈(a,b), and therefore we get f0(c) =0. On the other hand if

there exists anxsuch that f(x)<K, then the absolute minimum occurs at somec∈(a,b)and we

have that f0(c) =0. If there is noxsuch that f(x)>Kor f(x)<K, then we have that f(x) =Kfor allxand then f0(x) =0 for allx[a,b], so anyc(a,b)works.

It is absolutely necessary for the derivative to exist for all x(a,b). For example take the

function f(x) =|x|on[1,1]. Clearly f(1) = f(1), but there is no point where f0(c) =0.

4.2.3

Mean value theorem

We extend to functions that attain different values at the endpoints.

Theorem 4.2.4(Mean value theorem). Let f: [a,b]→Rbe a continuous function differentiable on

(a,b). Then there exists a point c(a,b)such that

f(b)f(a) = f0(c)(ba).

For a geometric interpretation of the mean value theorem, see . The idea is that the value f(b)−f(a)

b−a is the slope of the line between the points a,f(a)

and b,f(b)

. Thencis the point such that f0(c) = f(b)−f(a)

b−a , that is, the tangent line at the point c,f(c)

has the same slope as the line between a,f(a)

and b,f(b)

. The theorem follows from , by subtracting from f the affine linear function with the derivative f(bb)−af(a) with the same values ataandbas f. That is, we subtract the function whose graph is the straight line a,f(a)

and b,f(b)

. Then we are looking for a point where this new function has derivative zero.

c (a,f(a))

(b,f(b))

Figure 4.5:Graphical interpretation of the mean value theorem.

Proof. Define the functiong: [a,b]→Rby

g(x):= f(x)−f(b)− f(b)b−f(a)

−a (x−b).

The function gis differentiable on(a,b), continuous on [a,b], such thatg(a) =0 and g(b) =0.

Thus there exists ac(a,b)such thatg0(c) =0.

0=g0(c) = f0(c)− f(b)b−f(a) −a Or in other words f0(c)(ba) = f(b)f(a).

The proof generalizes. By consideringg(x):= f(x)f(b)ϕf((bb))−ϕf((aa)) ϕ(x)−ϕ(b)one can

Theorem 4.2.5(Cauchy’s mean value theorem). Let f: [a,b]→Randϕ: [a,b]→Rbe continuous

functions differentiable on(a,b). Then there exists a point c(a,b)such that

f(b)f(a)

ϕ0(c) = f0(c) ϕ(b)−ϕ(a).

The mean value theorem has the distinction of being one of the few theorems commonly cited in court. That is, when police measure the speed of cars by aircraft, or via cameras reading license plates, they measure the time the car takes to go between two points. The mean value theorem then says that the car must have somewhere attained the speed you get by dividing the difference in distance by the difference in time.

4.2.4

Applications

We now solve our very first differential equation.

Proposition 4.2.6. Let I be an interval and let f: IR be a differentiable function such that f0(x) =0for all xI. Then f is constant.

Proof. Take arbitraryx,yIwithx<y. Then f restricted to[x,y]satisfies the hypotheses of the

. Therefore, there is ac(x,y)such that

f(y)−f(x) = f0(c)(yx).

as f0(c) =0, we have f(y) = f(x). Therefore, the function is constant.

Now that we know what it means for the function to stay constant, let us look at increasing and decreasing functions. We say f: I Ris increasing(resp. strictly increasing) ifx<yimplies

f(x) f(y)(resp. f(x)< f(y)). We definedecreasingandstrictly decreasingin the same way by

switching the inequalities for f.

Proposition 4.2.7. Let I be an interval and let f: IRbe a differentiable function. (i) f is increasing if and only if f0(x)0for all xI.

(ii) f is decreasing if and only if f0(x)0for all xI.

Proof. Let us prove the first item. Suppose f is increasing, then for allx,cIwithx6=cwe have f(x)f(c)

x−c ≥0. Taking a limit asxgoes tocwe see that f0(c)0.

For the other direction, suppose f0(x)0 for allxI. Take anyx,yIwherex<y. By the there is somec(x,y)such that

f(y)f(x) = f0(c)(yx).

As f0(c)0, andyx>0, then f(y)f(x)0 or f(x) f(y)and so f is increasing. We leave the decreasing part to the reader as exercise.

A similar but weaker statement is true for strictly increasing and decreasing functions. Proposition 4.2.8. Let I be an interval and let f: IRbe a differentiable function.

(i) If f0(x)>0for all xI, then f is strictly increasing. (ii) If f0(x)<0for all xI, then f is strictly decreasing.

The proof of is left as an exercise. Then follows from by considering−f instead. The converse of this proposition is not true. For example, f(x):=x3 is a strictly increasing function, but f0(0) =0.

Another application of the is the following result about location of extrema, sometimes called the first derivative test. The theorem is stated for an absolute minimum and maximum. To apply it to find relative minima and maxima, restrict f to an interval(cδ,c+δ).

Proposition 4.2.9. Let f: (a,b)→Rbe continuous. Let c∈(a,b)and suppose f is differentiable

on(a,c)and(c,b).

(i) If f0(x)0for x(a,c)and f0(x)0for x(c,b), then f has an absolute minimum at c. (ii) If f0(x)0for x(a,c)and f0(x)0for x(c,b), then f has an absolute maximum at c. Proof. We prove the first item leaving the second to the reader. Takex(a,c)and{yn}a sequence

such thatx<yn<cand limyn=c. By the preceding proposition, f is decreasing on(a,c) so f(x) f(yn). As f is continuous atc, we take the limit to get f(x)≥ f(c)for allx∈(a,c).

Similarly, takex(c,b)and{yn}a sequence such thatc<yn<xand limyn=c. The function is increasing on (c,b)so f(x) f(yn). By continuity of f we get f(x)≥ f(c) for allx∈(c,b). Thus f(x)≥ f(c)for allx∈(a,b).

The converse of the proposition does not hold. See below.

Another often used application of the mean value theorem you have possibly seen in calculus is the following result on differentiability at the end points of an interval. The proof is . Proposition 4.2.10.

(i) Suppose f: [a,b)Ris continuous, differentiable in(a,b), andlimx→a f0(x) =L. Then f is differentiable at a and f0(a) =L.

(ii) Suppose f: (a,b]Ris continuous, differentiable in(a,b), andlimx→b f0(x) =L. Then f is differentiable at b and f0(b) =L.

In fact, using the extension result , you do not need to assume that f is defined at the end point. See .

4.2.5

Continuity of derivatives and the intermediate value theorem

Derivatives of functions satisfy an intermediate value property.

Theorem 4.2.11 (Darboux). Let f: [a,b] R be differentiable. Suppose y∈R is such that

The proof follows by subtracting f and a linear function with derivativey. The new function g reduces the problem to the casey=0, where g0(a)>0>g0(b). That is, gis increasing at a

and decreasing atb, so it must attain a maximum inside(a,b), where the derivative is zero. See

. a g′(a)>0 c g′(c) =0 b g′(b)<0

Figure 4.6:Idea of the proof of Darboux theorem.

Proof. Suppose f0(a)<y< f0(b). Define

g(x):=yxf(x).

The functiongis continuous on[a,b], and sogattains a maximum at somec[a,b].

The functiongis also differentiable on[a,b]. Computeg0(x) =y− f0(x). Thusg0(a)>0. As the derivative is the limit of difference quotients and is positive, there must be some difference quotient that is positive. That is, there must exist anx>asuch that

g(x)−g(a) xa >0,

or g(x)>g(a). Thus gcannot possibly have a maximum ata. Similarly, asg0(b)<0, we find

anx<b(a differentx) such that g(xx)−gb(b) <0 or thatg(x)>g(b), thusgcannot possibly have a

maximum atb. Therefore,c∈(a,b), and applies: Asgattains a maximum atcwe

findg0(c) =0 and so f0(c) =y.

Similarly, if f0(a)>y> f0(b), considerg(x):= f(x)yx.

We have seen already that there exist discontinuous functions that have the intermediate value property. While it is hard to imagine at first, there also exist functions that are differentiable everywhere and the derivative is not continuous.

Example 4.2.12: Let f: RRbe the function defined by f(x):=

(

xsin(1/x)2

ifx6=0,

0 ifx=0.

We claim that f is differentiable everywhere, but f0: R R is not continuous at the origin. Furthermore, f has a minimum at 0, but the derivative changes sign infinitely often near the origin.

Figure 4.7: A function with a discontinuous derivative. The function f is on the left and f0is on the

right. Notice that f(x)x2on the left graph.

Proof: It is immediate from the definition that f has an absolute minimum at 0: we know f(x)0 for allxand f(0) =0.

The function f is differentiable forx6=0, and the derivative is 2sin(1/x) xsin(1/x)cos(1/x)

. As an exercise show that forxn= (8n+1)4 π we have lim f0(xn) =−1, and foryn= (8n+3)4 π we have lim f0(yn) =1. Hence if f0exists at 0, then it cannot be continuous.

Let us show that f0exists at 0. We claim that the derivative is zero. In other words f(x)−f(0) x−0 −0

goes to zero asxgoes to zero. Forx6=0 we have

f(x)f(0) x0 −0 = x2sin2(1/x) x =xsin2(1/x) ≤ |x|.

And, of course, as xtends to zero, then |x| tends to zero and hence f(x)−f(0) x−0 −0 goes to zero.

Therefore, f is differentiable at 0 and the derivative at 0 is 0. A key point in the above calculation is that|f(x)| ≤x2, see also Exercises and .

It is sometimes useful to assume the derivative of a differentiable function is continuous. If f: IRis differentiable and the derivative f0is continuous onI, then we say f iscontinuously differentiable. It is common to writeC1(I)for the set of continuously differentiable functions onI.

4.2.6

Exercises

Exercise4.2.1: Finish the proof of . Exercise4.2.2: Finish the proof of .

Exercise4.2.3: Suppose f:R→Ris a differentiable function such that f0is a bounded function. Prove f is

Exercise4.2.4: Suppose f:[a,b]→Ris differentiable and c∈[a,b]. Then show there exists a sequence

{xn}converging to c, xn6=c for all n, such that

f0(c) = lim

n→∞f 0(x

n).

Do note this doesnotimply that f0is continuous (why?).

Exercise4.2.5: Suppose f:R→Ris a function such that|f(x)−f(y)| ≤ |x−y|2for all x and y. Show that

f(x) =C for some constant C. Hint: Show that f is differentiable at all points and compute the derivative.

Exercise4.2.6: Finish the proof of . That is, suppose I is an interval and f:I →Ris a

differentiable function. If f0(x)>0for all xI, show that f is strictly increasing.

Exercise 4.2.7: Suppose f:(a,b)Ris a differentiable function such that f0(x)6=0for all x∈(a,b).

Suppose there exists a point c∈(a,b)such that f0(c)>0. Prove f0(x)>0for all x∈(a,b).

Exercise4.2.8: Suppose f:(a,b)→Rand g:(a,b)→Rare differentiable functions such that f0(x) =g0(x)

for all x∈(a,b), then show that there exists a constant C such that f(x) =g(x) +C.

Exercise4.2.9: Prove the following version of L’Hôpital’s rule. Suppose f:(a,b)Rand g:(a,b)→R

are differentiable functions. Suppose that at c∈(a,b), f(c) =0, g(c) =0, g0(x)6=0when x6=c, and that

the limit of f0(x)/g0(x)as x goes to c exists. Show that

lim x→c f(x) g(x) =limx→c f0(x) g0(x). Compare to .

Exercise 4.2.10: Let f: (a,b)R be an unbounded differentiable function. Show f0: (a,b)→ R is

unbounded.

Exercise4.2.11: Prove the theorem Rolle actually proved in 1691: If f is a polynomial, f0(a) = f0(b) =0

for somea<b, and there is noc(a,b)such that f0(c) =0, then there is at most one root of f in(a,b), that

is at most onex∈(a,b)such that f(x) =0. In other words, between any two consecutive roots of f0is at

most one root of f . Hint: Suppose there are two roots and see what happens.

Exercise4.2.12: Suppose a,bRand f:R→Ris differentiable, f0(x) =a for all x, and f(0) =b. Find f

and prove that it is the unique differentiable function with this property.

Exercise4.2.13:

a) Prove .

b) Suppose f:(a,b)→Ris continuous, and suppose f is differentiable everywhere except at c∈(a,b)and

limx→cf0(x) =L. Prove that f is differentiable at c and f0(c) =L.

Exercise4.2.14: Suppose f:(0,1)Ris differentiable and f0is bounded.

a) Show that there exists a continuous function g:[0,1)Rsuch that f(x) =g(x)for all x6=0.

Hint: and .

b) Find an example where the g is not differentiable at x=0.

Hint: Consider something based onsin(lnx), and assume you know basic properties ofsinandlnfrom

calculus.

c) Instead of assuming that f0is bounded, assume thatlimx

→0f0(x) =L. Prove that not only does g exist but it is differentiable at0and g0(0) =L.

In document Basic Analysis: Introduction to Real Analysis (Page 147-155)