Ten problems on the mean value theorem: Rolle's theorem on a cubic, the point c for x³ and for √x, two functions where a hypothesis fails, bounds on √101 and on sin 1.2 − sin 1.1, an equation with exactly one root, two cameras that prove a car was speeding, why equal derivatives give functions that differ by a constant, and the Lipschitz bounds of the logistic loss and its gradient, with worked solutions and the mistakes of applying the theorem to |x|, keeping a c outside the interval, calling a function constant on a domain with a gap, using a lower bound as an upper bound and saying where the car was speeding.
Before you start
The mean value theorem says that somewhere between two points a smooth function's slope equals its average slope over the whole interval. It rarely tells you where, and that is not its job: it turns a fact about the derivative everywhere into a fact about the function's values, which is how calculus proves that a function with a positive derivative is increasing, that an equation has only one root, that two antiderivatives differ by a constant, and that a loss whose gradient is bounded cannot change faster than the step that moves it. These ten problems find the point c where it can be found, check the hypotheses where they fail, and then use the theorem as a tool for bounds and proofs, ending with the Lipschitz constants of the logistic loss. The five mistakes at the end are the ones that look like valid uses of the theorem: applying it to ,∣x∣, keeping a c outside the interval, calling a function constant on a domain with a gap, using a lower bound as an upper bound, and claiming to know where the average was reached.
Rolle's theorem. If f is continuous on ,[a,b], differentiable on ,(a,b), and ,f(a)=f(b), then f′(c)=0 for some c in .(a,b).
The mean value theorem (MVT). If f is continuous on [a,b] and differentiable on ,(a,b), then f′(c)=b−af(b)−f(a) for some c in .(a,b).
The right side is the slope of the secant line from (a,f(a)) to .(b,f(b)). Rolle's theorem is the case where that slope is .0.
The theorem says some c exists, strictly between a and ;b; there may be several, and it does not say which.
Intermediate value theorem (IVT). A continuous function on [a,b] takes every value between f(a) and .f(b).
Lipschitz.f is M-Lipschitz on an interval if ∣f(x)−f(y)∣≤M∣x−y∣ for all x,y in it.
Check that Rolle's theorem applies to f(x)=x3−4x on ,[−2,2], and find every c it promises.
·
Find every c that the mean value theorem gives for f(x)=x3 on .[0,3].
··
Find c for f(x)=x on ,[1,9], and check that it lies in the interval.
··
For f(x)=∣x∣ on [−1,2] and g(x)=1/x on ,[−1,1], compute the secant slope, show that no c in the interval has that derivative, and name the hypothesis that fails.
··
Use the mean value theorem on x over [100,101] to show that
10+20.11<101<10.05.
··
Show that ∣sina−sinb∣≤∣a−b∣ for all ,a,b, and deduce sinx<x for .x>0. Then bound sin1.2−sin1.1 above and below using cos at the endpoints.
···
Show that 2x=cosx has exactly one real solution, and locate it in an interval.
··
Two speed cameras 12 km apart record a car at 10:00 and at 10:06. The limit is 100 km/h. Prove the car broke it, and state what has to be assumed about its position.
···
Show that if f′=g′ on an interval then f−g is constant there. Use this to find arctanx+arctan(1/x) for ,x>0, and say what happens for .x<0.
···
The logistic loss of a margin w is ,f(w)=log(1+ew), with .f′(w)=σ(w). Show that f is 1-Lipschitz and that f′ is 41-Lipschitz. Check both bounds for w=0 and ,w=2, and find the c the MVT gives for f on .[0,2].
Answers
c=±2/3≈±1.1547
c=3≈1.732
,c=4, inside (1,9)
:f: slope ,31, but f′=±1 because f is not differentiable at ;0;:g: slope ,1, but g′<0 because g is not continuous at 0 (not even defined there)
10+20.11≈10.049751<101<10.05
∣sina−sinb∣≤∣a−b∣ and sinx<x for ;x>0;0.0362<sin1.2−sin1.1<0.0454
exactly one solution, in ;(0,π/2); it is x≈0.4502
At some instant between 10:00 and 10:06 the car was going exactly 120 km/h, above the 100 km/h limit
arctanx+arctan(1/x)=π/2 for ,x>0, and −π/2 for x<0
f is 1-Lipschitz and f′=σ is 41-Lipschitz; ,1.4338≤2,,0.3808≤0.5, and c≈0.929 in (0,2)
Worked solutions
Problem 1
Check that Rolle's theorem applies to f(x)=x3−4x on ,[−2,2], and find every c it promises.
f is a polynomial, so it is continuous and differentiable everywhereBoth hypotheses hold on any interval.
f(−2)=−8+8=0 and f(2)=8−8=0The endpoint values agree.
f′(x)=3x2−4Power rule.
3c2−4=0 gives c=±2/3Solve .c2=4/3.
,2/3≈1.1547, inside (−2,2)Both signs are in the interval, so both count.
c=±2/3≈±1.1547Rolle promised at least one; this function has two, one at each turning point between its zeros at ,−2,0 and .2.
Problem 2
Find every c that the mean value theorem gives for f(x)=x3 on .[0,3].
Secant slope =3−027−0=9f(3)=27 and .f(0)=0.
,f′(c)=3c2=9, so c=±3Power rule, then solve .c2=3.
−3 is not in (0,3)The theorem only speaks about points strictly inside the interval.
c=3≈1.732At this one point the tangent to y=x3 is parallel to the secant from (0,0) to .(3,27).
Problem 3
Find c for f(x)=x on ,[1,9], and check that it lies in the interval.
f is continuous on [1,9] and differentiable on (1,9)x is differentiable for ;x>0; the trouble at 0 is outside this interval.
Secant slope =9−13−1=419=3 and .1=1.
f′(c)=2c1=41Power rule with exponent .21.
,c=2, so c=4Cross-multiply, then square.
,c=4, inside (1,9)The point is not the midpoint :5:x is concave, so its slope falls, and the average slope is reached left of center.
Problem 4
For f(x)=∣x∣ on [−1,2] and g(x)=1/x on ,[−1,1], compute the secant slope, show that no c in the interval has that derivative, and name the hypothesis that fails.
For :f: slope =2−(−1)2−1=31∣2∣=2 and .∣−1∣=1.
f′(x)=−1 for x<0 and 1 for ;x>0; there is no derivative at 0The two one-sided slopes at the corner differ.
So f′ never equals 31Its only values are .±1.
For :g: slope =1−(−1)1−(−1)=1g(1)=1 and .g(−1)=−1.
g′(x)=−1/x2<0 wherever it is defined, so it never equals 1Power rule; a negative number is not .1.
:f: slope ,31, but f′=±1 because f is not differentiable at ;0;:g: slope ,1, but g′<0 because g is not continuous at 0 (not even defined there)Each fails one hypothesis at one point, and that is enough for the conclusion to fail. The theorem is not wrong; it does not apply.
Problem 5
Use the mean value theorem on x over [100,101] to show that
10+20.11<101<10.05.
101−100=2c1(101−100)=2c1 for some c in (100,101)MVT; .f′(x)=1/(2x).
,c>100, so 2c1<2⋅101=0.05A larger c gives a smaller fraction.
So 101<10.05The upper bound, from the left end of the interval.
,c<101<10.05, so 2c1>20.11Use the upper bound just found on the right end.
10+20.11≈10.049751<101<10.05The true value is .10.049876. The upper bound uses c>100 and the lower bound ;c<101; which end gives which bound depends on the derivative falling.
Problem 6
Show that ∣sina−sinb∣≤∣a−b∣ for all ,a,b, and deduce sinx<x for .x>0. Then bound sin1.2−sin1.1 above and below using cos at the endpoints.
sina−sinb=cosc(a−b) for some c between a and bMVT on ,sin, which is differentiable everywhere; for a=b both sides are .0.
,∣cosc∣≤1, so ∣sina−sinb∣≤∣a−b∣sin is 1-Lipschitz.
For :x>0:sinx−sin0=xcosc with 0<c<xMVT on .[0,x].
If x≤2π then c is in ,(0,2π), so cosc<1 and ;sinx<x; if x>2π then sinx≤1<xcosc=1 only at multiples of .2π.
sin1.2−sin1.1=0.1cosc with 1.1<c<1.2MVT on .[1.1,1.2].
cos is decreasing on ,[0,π], so cos1.2<cosc<cos1.1cos′=−sin<0 there.
∣sina−sinb∣≤∣a−b∣ and sinx<x for ;x>0;0.0362<sin1.2−sin1.1<0.04540.1cos1.2≈0.03624 and .0.1cos1.1≈0.04536. The true difference is .0.04083. The crude bound 0.1 from step 2 is true but more than twice too large.
Problem 7
Show that 2x=cosx has exactly one real solution, and locate it in an interval.
Let ,f(x)=2x−cosx, continuous and differentiable everywhereA solution of the equation is a zero of .f.
f(0)=−1<0 and f(π/2)=π>0cos0=1 and .cos(π/2)=0.
By the IVT, f has a zero in (0,π/2)f is continuous and changes sign. This is existence.
f′(x)=2+sinx≥1.sinx≥−1.
If f(r)=f(s)=0 with ,r<s, Rolle gives f′(c)=0 for some c in ,(r,s), which step 4 rules outThis is uniqueness: two zeros force a flat point between them.
exactly one solution, in ;(0,π/2); it is x≈0.4502Newton's method from 0.4 gives .0.450184. The IVT says there is at least one root and Rolle says there is at most one; neither theorem alone says exactly one.
Problem 8
Two speed cameras 12 km apart record a car at 10:00 and at 10:06. The limit is 100 km/h. Prove the car broke it, and state what has to be assumed about its position.
Let s(t) be the distance traveled in km at time t in hours after 10:00, with s(0)=0 and s(0.1)=12Six minutes is 0.1 hours.
Average speed =0.1−012−0=120 km/hThe secant slope of s on .[0,0.1].
Assume s is continuous on [0,0.1] and differentiable on (0,0.1)A car's position does not jump and it has a speed at every instant.
By the MVT, s′(c)=120 for some c in (0,0.1)The speedometer reads the derivative.
At some instant between 10:00 and 10:06 the car was going exactly 120 km/h, above the 100 km/h limitThe theorem gives the instant's existence, not its time. Averaging 120 km/h without ever exceeding 100 km/h would need a position that is not differentiable, a car that teleports.
Problem 9
Show that if f′=g′ on an interval then f−g is constant there. Use this to find arctanx+arctan(1/x) for ,x>0, and say what happens for .x<0.
Let ,h=f−g, so h′=0 on the intervalDifference rule.
For any x<y in the interval, h(y)−h(x)=h′(c)(y−x)=0MVT on ,[x,y], which lies inside the interval because an interval has no gaps.
So h takes the same value everywhere: f=g+CAny two points give equal values.
Let .F(x)=arctanx+arctan(1/x). Then F′(x)=1+x21+1+1/x2−1/x2Chain rule on ,arctan(1/x), with .(1/x)′=−1/x2.
,1+1/x2−1/x2=x2+1−1, so F′(x)=0 for every x=0Multiply top and bottom by .x2.
(0,∞) is an interval, so F is constant there, and F(1)=4π+4π=2πEvaluate at a convenient point.
arctanx+arctan(1/x)=π/2 for ,x>0, and −π/2 for x<0(−∞,0) is another interval with its own constant: .F(−1)=−4π−4π. The domain of F has a gap at ,0, so the two halves need not agree. The same step is why every antiderivative of f on an interval is one antiderivative plus a constant.
Problem 10
The logistic loss of a margin w is ,f(w)=log(1+ew), with .f′(w)=σ(w). Show that f is 1-Lipschitz and that f′ is 41-Lipschitz. Check both bounds for w=0 and ,w=2, and find the c the MVT gives for f on .[0,2].
,f′(w)=1+ewew=σ(w), which lies in (0,1)Chain rule; divide top and bottom by .ew.
∣f(u)−f(v)∣=σ(c)∣u−v∣≤∣u−v∣MVT, with .0<σ(c)<1. So f is 1-Lipschitz.
f′′(w)=σ(w)(1−σ(w))≤41p(1−p) is largest at ,p=21, where it is .41.
∣σ(u)−σ(v)∣=σ′(c)∣u−v∣≤41∣u−v∣MVT applied to .f′=σ. So f′ is 41-Lipschitz.
f(2)−f(0)=log(1+e2)−log2≈2.1269−0.6931=1.4338≤2The first bound, with .∣u−v∣=2.
σ(2)−σ(0)≈0.8808−0.5=0.3808≤0.5The second bound: .41⋅2=0.5.
,σ(c)=1.4338/2=0.7169, so c=log1−0.71690.7169≈0.929Invert the sigmoid: σ(c)=p gives .c=log(p/(1−p)).
f is 1-Lipschitz and f′=σ is 41-Lipschitz; ,1.4338≤2,,0.3808≤0.5, and c≈0.929 in (0,2)The first bound says one example's loss changes by at most as much as its margin does. The second bounds how fast the gradient can change, the constant that step-size rules for gradient descent are stated in terms of.
Where this goes wrong
1. Applying the theorem to |x|
On [−1,1] the function ∣x∣ takes the value 1 at both ends, which looks like a textbook case for Rolle's theorem.
,f(x)=∣x∣,,f(−1)=f(1)=1, so the secant slope is 0Right so far: the endpoint values agree.
“Equal values at the ends, so the slope must be zero somewhere in between.”The habit that causes the mistake: checking the endpoint condition and skipping differentiability.
f′(c)=0 at c=0∣x∣ has no derivative at ,0, and elsewhere ,f′=±1, never .0. Rolle's theorem needs f differentiable on all of ,(−1,1), and one corner is enough to break it (Problem 4).
2. Keeping a c outside the interval
Setting f′(c) equal to the secant slope gives an equation, and equations often have more roots than the theorem asked for.
For f(x)=x3 on ,[1,2], the secant slope is 2−18−1=7Right so far.
“,3c2=7, so .c=±7/3.”Right as algebra; the habit that causes the mistake is reporting every root of the equation.
c=7/3≈1.5275 or c=−7/3≈−1.5275Only 1.5275 lies in .(1,2). The theorem is about points strictly inside the interval, so −1.5275 is a solution of 3c2=7 but not an answer (Problem 2).
3. Calling a function constant on a domain with a gap
Problem 9 shows that F(x)=arctanx+arctan(1/x) has F′=0 everywhere it is defined.
F′(x)=0 for every ,x=0, and F(1)=π/2Right so far.
“Zero derivative everywhere, so F is the same constant everywhere.”The habit that causes the mistake: the constant-function rule needs an interval, because its proof applies the MVT between any two points, and {x=0} is two intervals.
arctanx+arctan(1/x)=π/2 for all x=0At x=−1 it is .−π/4−π/4=−π/2. The MVT cannot be applied across ,0, where F is not defined, so each half gets its own constant.
4. Using a lower bound as an upper bound
Problem 5 squeezes 101 from both sides, and it is easy to plug in the wrong end of the interval.
101−10=2c1 with 100<c<101Right so far: Problem 5, step 1.
“,c<11, so 2c1 is at most .221.”The slip that causes the mistake: a smaller c makes the fraction larger, so c<11 gives ,2c1>221, a lower bound.
101≤10+221≈10.0455The true value is ,10.0499, above this “upper bound”. For a decreasing derivative, the left end of the interval gives the upper bound and the right end the lower one.
5. Saying where the car was speeding
Problem 8 proves the car hit 120 km/h, and the next sentence is tempting.
Average speed between the cameras =12/0.1=120 km/hRight so far.
“By the MVT the speed equals the average, so the car was doing 120 km/h at the second camera.”The habit that causes the mistake: treating the theorem's c as a particular point, such as an endpoint or the midpoint.
the car was at 120 km/h at 10:06The theorem gives some c strictly between the two times and says nothing about which. The car could have passed both cameras at 90 km/h and gone faster in between; the ticket is for the average, not for either photograph.
Print this set: mean-value-theorem.pdf (problems, answers, and worked solutions on separate pages).