BetaFree coursewareRewritten from MIT OpenCourseWareCC BY-NC-SA 4.0
Open CosmologyPhysics & cosmology, from high school to a graduate year

The mean value theorem and inequalities

Newton's method squares the error at each step, provided the start is close and the slope is not too small. Then the mean value theorem: over any interval, the average rate of change equals the derivative at some point in between. Its real use is three consequences: a positive derivative means increasing, a negative one decreasing, and a zero derivative constant. From these come inequalities such as eˣ > 1 + x.

You need this first

Full reading path (11 pages)
  1. The derivative: slope of the tangent line and rate of change (18.01)
  2. Limits and continuity (18.01)
  3. Derivatives of sine and cosine, and the product and quotient rules (18.01)
  4. The chain rule and higher derivatives (18.01)
  5. Implicit differentiation and the derivatives of inverse functions (18.01)
  6. Exponentials and logarithms: the number e and its derivatives (18.01)
  7. Linear and quadratic approximations (18.01)
  8. Curve sketching with the first and second derivative (18.01)
  9. Sketching strategy and maximum–minimum problems (18.01)
  10. More max–min, and related rates (18.01)
  11. A ring on a string, and Newton's method (18.01)
On this page · 7 sections
  1. How accurate is Newton's method?
  2. The mean value theorem
  3. Why it is true
  4. Other ways to write it
  5. The three consequences
  6. Proving inequalities
  7. Summary

The lecture finishes Newton's method by asking how accurate it is, then turns to a theoretical result, the mean value theorem, which links the derivative at single points to how a function changes over a whole interval. It prepares the second half of the course, integration.

How accurate is Newton's method?#

Recall the method from the previous lecture: from a guess xnx_n, follow the tangent line down to the axis, xn+1=xn−f(xn)/f′(xn)x_{n+1} = x_n - f(x_n)/f'(x_n), and repeat (transcript, p. 1). Call the distance from the nn-th guess to the root xx the error, En=∣x−xn∣E_n = |x - x_n| (p. 2).

Near the root, a curve and its tangent line separate quadratically, so the next error is roughly the square of the one before (p. 2):

Error of Newton's method
En+1≈En 2E_{n+1} \approx E_n^{\,2}
In words

capital E sub n plus 1 is approximately capital E sub n to the power 2

Start at E0≈10−1E_0 \approx 10^{-1} and the errors run 10−210^{-2}, 10−410^{-4}, 10−810^{-8}, 10−1610^{-16}: the number of correct digits doubles at each step, which soon outruns a calculator (p. 2). (The sign "≈" hides a constant factor, here and in the lecture.)

Worked example

Watching the error square

Find 7\sqrt7 with Newton's method on f(x)=x2−7f(x) = x^2 - 7, starting at x0=3x_0 = 3, and track the errors.

Iterate

xn+1=xn−(xn2−7)/(2xn)x_{n+1} = x_n - (x_n^2 - 7)/(2x_n) gives x1≈2.6667x_1 \approx 2.6667, x2≈2.645833x_2 \approx 2.645833, x3≈2.6457513x_3 \approx 2.6457513, while 7≈2.6457513\sqrt7 \approx 2.6457513.

Errors

E0≈0.35E_0 \approx 0.35, E1≈0.021E_1 \approx 0.021, E2≈8.2×10−5E_2 \approx 8.2\times10^{-5}, E3≈1.3×10−9E_3 \approx 1.3\times10^{-9}. Each is a fixed fraction of the square of the one before: 0.170.17 at the first step, then about 0.190.19 times the square, settling at the constant factor 1/(27)1/(2\sqrt7).

This works when f′f' is not too small, f′′f'' is not too large (the curve does not bend far away from its tangent line), and x0x_0 starts near the root (pp. 2–3). The ways it goes wrong (pp. 3–4):

  • The wrong root. For y=x2−5y = x^2 - 5, a start on the left of the axis leads to −5-\sqrt5 instead of 5\sqrt5. The method only knows where you started. And if the first error is large, the quadratic behaviour works against you.
  • A horizontal tangent. If f′(x0)=0f'(x_0) = 0, the tangent line never meets the axis and x1x_1 is undefined: f′f' is in the denominator. (The transcript has "f(x0)=0f(x_0) = 0"; the condition is on f′f'.)
  • A cycle. For a wiggly curve, x0x_0 can lead to x1x_1 and x1x_1 straight back to x0x_0, forever: "the grass is always greener".

For example, f(x)=x3−2x+2f(x) = x^3 - 2x + 2 started at x0=0x_0 = 0 gives x1=0−2/(−2)=1x_1 = 0 - 2/(-2) = 1, and then x2=1−1/1=0x_2 = 1 - 1/1 = 0 again. Even so, Newton's method solves almost any equation numerically (p. 4).

The mean value theorem#

In words: drive 3000 miles from Boston to Los Angeles in 6 hours and your average speed is 3000/6=5003000/6 = 500 miles per hour. Some of the time you went faster, some of the time slower, so at some moment you were going exactly 500 miles per hour (transcript, pp. 4–5). (The transcript says "3,000 miles times 6 hours"; it is divided by.) "Mean" means average. The notes make the same point with a 1000-mile, 3-hour drive from Boston to Chicago: at some moment the speed was exactly 1000/31000/3 mph (notes, p. 2).

In symbols (notes, p. 1; transcript, p. 5):

Mean value theorem
f(b)−f(a)b−a=f′(c)for some c, a<c<b\frac{f(b) - f(a)}{b - a} = f'(c) \quad \text{for some } c,\ a < c < b
In words

the quantity f(b) minus f(a), all over the quantity b minus a, equals f prime (c) for some c, a less than c less than b

The left side is the slope of the secant line from (a,f(a))(a, f(a)) to (b,f(b))(b, f(b)), the average rate of change; the right side is the slope of a tangent line. The theorem has two hypotheses (transcript, p. 5): ff is differentiable for a<x<ba < x < b, so there is a rate of change at every point in between, and continuous for a≤x≤ba \le x \le b, so the end values are tied to what happens in between.

The graph of f(x)=x3f(x) = x^3 on [0,2][0, 2], with the secant from a=0a = 0 to b=2b = 2 (slope 4) and the tangent line at c=2/3≈1.15c = 2/\sqrt{3} \approx 1.15, where f′(c)=3c2=4f'(c) = 3c^2 = 4. All three are computed from the formulas; the tangent is parallel to the secant.

Why it is true#

The proof is a picture (transcript, pp. 5–6; notes, p. 1). Draw the secant line. Take a line parallel to it, below the graph, and slide it up, keeping it parallel, until it first touches the graph between aa and bb (ignore the graph outside). Where it touches, it is a tangent line, so its slope f′(c)f'(c) equals the secant's slope. If the graph lies entirely above the secant, so that nothing is touched from below, bring the parallel line down from above instead (p. 6).

The line may touch at several points; then there are several good values of cc, and any one will do (p. 8). That a touching point always exists is a geometric fact whose full proof needs more analysis than the course covers (p. 8).

Every hypothesis matters. Take a graph made of two straight pieces meeting at a corner, like y=∣x∣y = |x|. The sliding line touches at the corner, where there is no tangent line and no derivative (transcript, p. 6). The notes add that for ∣x∣|x| the line touches first at x=0x = 0 whatever its slope, and f′(0)f'(0) does not exist (notes, p. 1). One bad point is enough to break the theorem. Continuity matters too: let f(x)=0f(x) = 0 for 0≤x<10 \le x < 1 but f(1)=1f(1) = 1. The secant from x=0x = 0 to x=1x = 1 has slope 1, yet f′=0f' = 0 everywhere in between, because the end value has nothing to do with the rest of the graph.

Other ways to write it#

Multiply through by b−ab - a (transcript, p. 7; notes, p. 2):

Second form
f(b)=f(a)+f′(c) (b−a)for some c, a<c<bf(b) = f(a) + f'(c)\,(b - a) \quad \text{for some } c,\ a < c < b
In words

f(b) equals f(a) plus f prime (c) the quantity b minus a, for some c, a less than c less than b

Renaming bb as xx gives a third form, f(x)=f(a)+f′(c)(x−a)f(x) = f(a) + f'(c)(x - a) for some cc between aa and xx; cc depends on ff, aa and xx (notes, p. 2). Compare it with the linear approximation (notes, pp. 2–3; transcript, pp. 8–9):

Linear approximation, for comparison
f(x)≈f(a)+f′(a) (x−a)(x near a)f(x) \approx f(a) + f'(a)\,(x - a) \quad (x \text{ near } a)
In words

f(x) is approximately f(a) plus f prime (a) the quantity x minus a, (x near a)

The approximation uses a definite slope, f′(a)f'(a), and is only approximate. The mean value theorem is exact, but hides what it does not know in cc, which could be any point between aa and xx.

What you can always say is that f′(c)f'(c) lies between the smallest value mm and the largest value MM of f′f' on the whole interval a≤x≤ba \le x \le b, ends included (transcript, p. 9):

Average rate between min and max
m  ≤  f(b)−f(a)b−a  ≤  Mm \;\le\; \frac{f(b) - f(a)}{b - a} \;\le\; M
In words

m is less than or equal to the quantity f(b) minus f(a), all over the quantity b minus a, is less than or equal to capital M

The average speed lies between the minimum and maximum speed. Nobody doubted it, though it was not properly proved in Newton's and Leibniz's time (p. 9). The linear approximation instead uses the speed at one end, which is close on a short interval because the maximum and minimum are then close together.

Worked example

Pinning down √101

Without a calculator, how big is 101−10\sqrt{101} - 10?

Apply the theorem

For f(x)=xf(x) = \sqrt x on [100,101][100, 101]: 101−100=f′(c)×1=12c\sqrt{101} - \sqrt{100} = f'(c) \times 1 = \dfrac{1}{2\sqrt c} for some cc between 100 and 101.

Bound f′(c)

10<c<1110 < \sqrt c < 11 (since 112=12111^2 = 121), so 122<12c<120\dfrac{1}{22} < \dfrac{1}{2\sqrt c} < \dfrac{1}{20}, that is 0.045<101−10<0.050.045 < \sqrt{101} - 10 < 0.05. (In fact it is 0.049880.04988.)

Worked example

Average-speed cameras

Two cameras 12 km apart on a motorway time a car at exactly 6 minutes between them. The limit is 100 km/h. Can the driver argue they never broke it?

Average speed

12 km/0.1 h=12012\ \text{km} / 0.1\ \text{h} = 120 km/h.

Mean value theorem

Position is a differentiable function of time, so at some moment the speed was exactly 120 km/h, above the limit, even if no camera saw it.

The three consequences#

The lecture's main point is not finding cc (problem-set questions that ask for one are only there to make you read the statement, p. 10) but three consequences, which you will use far more than the theorem itself (transcript, pp. 6, 10–11; notes, p. 3):

  1. If f′>0f' > 0 on an interval, ff is increasing.
  2. If f′<0f' < 0, ff is decreasing.
  3. If f′=0f' = 0 everywhere, ff is constant.

Proof. Take a<ba < b, so b−a>0b - a > 0, and use the second form f(b)=f(a)+f′(c)(b−a)f(b) = f(a) + f'(c)(b - a) (transcript, p. 7; notes, p. 3). If f′>0f' > 0, the last term is positive, so f(b)>f(a)f(b) > f(a). If f′<0f' < 0, it is negative, so f(b)<f(a)f(b) < f(a). If f′=0f' = 0, it is zero, so f(b)=f(a)f(b) = f(a); true for every pair of points, so ff never changes value. (The notes' definition of decreasing has a slip: it should read a<b⇒f(a)>f(b)a < b \Rightarrow f(a) > f(b).)

These look obvious, but they are not: the derivative is defined by a limit, a statement about infinitesimally small changes, and it is not automatic that it controls how the function changes over a finite interval (notes, p. 3). The mean value theorem is that link: the difference quotient is not just approximately a derivative, it equals one, at some point in between (transcript, p. 7).

Proving inequalities#

The consequences give a method for inequalities between functions (transcript, p. 11; notes, p. 4). To show ex>1+xe^x > 1 + x for x>0x > 0, look at the difference:

Proving eˣ > 1 + x
f(x)=ex−(1+x),f(0)=0,f′(x)=ex−1>0  (x>0)f(x) = e^x - (1 + x), \quad f(0) = 0, \quad f'(x) = e^x - 1 > 0 \ \ (x > 0)
In words

f(x) equals e to the power x minus the quantity 1 plus x, f(0) equals 0, f prime (x) equals e to the power x minus 1 greater than 0 (x greater than 0)

The step ex−1>0e^x - 1 > 0 for x>0x > 0 is itself proved the same way from ex>0e^x > 0 (notes, p. 4). So ff is increasing, f(x)>f(0)=0f(x) > f(0) = 0, and that says ex>1+xe^x > 1 + x. Repeat with g(x)=ex−(1+x+x2/2)g(x) = e^x - (1 + x + x^2/2): g(0)=0g(0) = 0 and g′(x)=ex−(1+x)g'(x) = e^x - (1 + x), positive by the previous step, so ex>1+x+x2/2e^x > 1 + x + x^2/2 (p. 11). Keep going and

Ever better lower bounds
ex>1+x+x22+x33⋅2+x44⋅3⋅2(x>0)e^x > 1 + x + \frac{x^2}{2} + \frac{x^3}{3\cdot 2} + \frac{x^4}{4\cdot 3\cdot 2} \quad (x > 0)
In words

e to the power x greater than 1 plus x plus x squared over 2 plus x cubed over the quantity 3 times 2, plus x to the power 4 over the quantity 4 times 3 times 2, (x greater than 0)

Like the tortoise and the hare, exe^x stays ahead of every finite sum, but the infinite sum catches it exactly: this is the Taylor series, near the end of the course (p. 11; notes, p. 4). At x=0.5x = 0.5: e0.5≈1.6487e^{0.5} \approx 1.6487, against 1.51.5 and 1.6251.625 for the first two bounds.

Worked example

ln(1 + x) < x

Show that ln⁡(1+x)<x\ln(1 + x) < x for x>0x > 0.

The difference

Let f(x)=x−ln⁡(1+x)f(x) = x - \ln(1 + x). Then f(0)=0−ln⁡1=0f(0) = 0 - \ln 1 = 0.

Its derivative

f′(x)=1−11+x=x1+x>0f'(x) = 1 - \dfrac{1}{1 + x} = \dfrac{x}{1 + x} > 0 for x>0x > 0. So ff is increasing, f(x)>0f(x) > 0, and ln⁡(1+x)<x\ln(1 + x) < x. Check: ln⁡1.5≈0.405<0.5\ln 1.5 \approx 0.405 < 0.5.

Summary#

  • Newton's method: near the root, En+1≈En2E_{n+1} \approx E_n^2, so correct digits double. It needs a start near the root, f′f' not too small and f′′f'' not too large; it can find the wrong root, stop at a horizontal tangent, or cycle.
  • Mean value theorem: if ff is differentiable on a<x<ba < x < b and continuous on a≤x≤ba \le x \le b, then f(b)−f(a)b−a=f′(c)\frac{f(b) - f(a)}{b - a} = f'(c) for some cc between aa and bb. Proof: slide a line parallel to the secant until it touches the graph. One kink breaks it.
  • Forms: f(b)=f(a)+f′(c)(b−a)f(b) = f(a) + f'(c)(b - a), exact, unlike the linear approximation with f′(a)f'(a). The average rate lies between the minimum and maximum of f′f'.
  • Consequences: f′>0f' > 0 increasing, f′<0f' < 0 decreasing, f′=0f' = 0 constant.
  • Inequalities: to show one function stays above another for x>0x > 0, check that their difference starts at 0 and has a positive derivative. Hence ex>1+x>…e^x > 1 + x > \dots and ln⁡(1+x)<x\ln(1 + x) < x.

Symbols on this page

Show the 38 symbols used here
≈\approx approximately equal.
Is approximately equal to. Say it: “is approximately”.
≤\le less than or equal.
Is less than or equal to. Say it: “is less than or equal to”.
⇒\Rightarrow implies.
Implies: what follows is a consequence of what came before. Say it: “which gives”.
×\times times.
Times (multiplication). Between two vectors: the cross product. Say it: “times”.
⋅\cdot dot.
Times (multiplication). Between two vectors: the dot product. Say it: “times”.
ln⁡\ln natural logarithm.
Natural logarithm (base e ≈ 2.718). Say it: “log”.
aa a.
The left end of the interval a ≤ x ≤ b; in the third form of the theorem and in the linear approximation, the base point. In the cosmology note, a(t) is the scale factor of the universe. Say it: “a”.
cc c.
The point between a and b (or between a and x) where the tangent slope f′(c) equals the secant slope; in the cosmology note, an earlier time. Say it: “c”.
H0H_{0} Hubble constant.
The Hubble constant: today's value of H, about 67–73 km/s/Mpc. Unit: 1/s (usually km/s/Mpc). Say it: “H nought”.
t0t_{0} today.
Today: the present time, about 13.8 billion years after the Big Bang in the real universe (simple models on some pages give other ages). Unit: s (usually billions of years). Say it: “t nought”.
xx x.
The variable; in Newton's method, also the root being sought. In the third form of the theorem, x takes the place of b. Say it: “x”.
yy y.
The vertical coordinate of a graph, as in y = x² − 5 and y = |x|. Say it: “y”.
tt t.
Time: in the speed examples, the time of travel; in the cosmology note, cosmic time since the big bang. Say it: “t”.
nn n.
The step number in Newton's method. Say it: “n”.
ee e.
Euler's number, e ≈ 2.718, the base of the exponential eˣ. Say it: “e”.
mm m.
The smallest value of f′ on the interval a ≤ x ≤ b. Say it: “m”.
ff f.
A function: in Newton's method, the one whose zero is sought; in the mean value theorem, any function differentiable between a and b and continuous at the ends. Say it: “f”.
gg g.
The difference eˣ − (1 + x + x²/2), used to prove the second inequality. Say it: “g”.
bb b.
The right end of the interval a ≤ x ≤ b. Say it: “b”.
MM M.
The largest value of f′ on the interval a ≤ x ≤ b. Say it: “capital M”.
f′f' f prime.
The derivative of f: the slope of the tangent line; f′(c) is the tangent slope that equals the secant slope. Say it: “f prime”.
x0x_{0} x nought.
The starting guess for Newton's method. Say it: “x nought”.
x1x_{1} x 1.
The first Newton iterate. Say it: “x one”.
x2x_{2} x 2.
The second Newton iterate. Say it: “x two”.
E0E_{0} E nought.
The error of the starting guess x₀. Say it: “capital E nought”.
a0a_{0} a nought.
The scale factor today. Say it: “a nought”.
a˙\dot{a} a dot.
The rate of change of a with time, ȧ = da/dt: how fast the scale factor grows. Say it: “a dot”.
g′g' g prime.
The derivative of g. Say it: “g prime”.
f′′f'' f double prime.
The second derivative of f: how strongly the graph bends away from its tangent line. Say it: “f double prime”.
xn+1x_{n+1} x n plus 1.
The next Newton iterate, where the tangent line at x_n crosses zero. Say it: “x sub n plus 1”.
xnx_{n} x n.
The n-th Newton iterate (the current guess). Say it: “x sub n”.
x3x_{3} x three.
The third Newton iterate. Say it: “x three”.
EnE_{n} E n.
The error of the n-th Newton iterate: its distance from the root, |x − x_n|. Say it: “capital E sub n”.
En+1E_{n+1} E n plus 1.
The error of the next Newton iterate, |x − x_n+1|. Say it: “capital E sub n plus 1”.
E1E_{1} E one.
The error of the first Newton iterate x₁. Say it: “capital E one”.
E2E_{2} E two.
The error of the second Newton iterate x₂. Say it: “capital E two”.
E3E_{3} E three.
The error of the third Newton iterate x₃. Say it: “capital E three”.
a˙0\dot{a}_{0} a dot nought.
Today's rate of expansion, ȧ at t₀; ȧ₀/a₀ = H₀. Say it: “a dot nought”.

Tap or click a symbol in a formula to see the same explanation. All symbols: symbols and notation.

Words on this page

Show the 31 words used here

New here

mean value theorem.
If a function is smooth between two points, somewhere between them its slope equals its average slope over the whole interval.
differentiable.
Having a derivative: at that point the graph has a single, definite, non-vertical tangent line, with no corner or break.

Also used

Newton's method.
A way to solve f(x) = 0: make a guess, follow the tangent line to where it crosses zero, and repeat from there. Explained in A ring on a string, and Newton's method.
derivative.
The rate at which a function changes as its input changes: the slope of its graph at a point. Explained in Position and velocity in one dimension.
interval.
A stretch between two values or two moments; in maths, all the numbers between two end points. Explained in Time dilation, length contraction and the interval.
integration.
Finding an integral: adding up very many small pieces, or finding an antiderivative. Explained in Differentials and antiderivatives.
tangent.
A straight line that touches a curve at a point and runs in the same direction as the curve there. Explained in Angles, radians and trigonometry.
p..
Page, in a reference to a source; pp. means pages, as in pp. 3–5.
secant.
A straight line through two points of a curve; its slope is the average rate of change between them. Explained in Rates of change and area under a graph.
rate of change.
How fast one quantity changes compared with another, often time: the change in the first divided by the change in the second. Explained in Rates of change and area under a graph.
theorem.
A statement that has been proved true, step by step, from definitions and earlier results. Explained in Limits and continuity.
continuous.
Without breaks, gaps or jumps: a continuous graph can be drawn without lifting the pen; a continuous quantity can take every value in a range. Explained in The rocket equation.
proof.
A chain of reasoning showing beyond doubt that a statement follows from definitions and results already known. Explained in Limits and continuity.
graph.
The picture of a function: the curve y = f(x) for one variable, or the surface z = f(x, y) for two. Explained in Graphs, straight lines and slope.
linear approximation.
Replacing a function near a point by the straight line, or flat plane, that best matches it there, using its first derivatives. Explained in Change of variables in double integrals.
limit.
A bound: the largest or smallest possible or allowed value, such as the most mass a white dwarf can have. Explained in Constant-density stars, Buchdahl's limit, and the puzzles of the Schwarzschild spacetime.
difference quotient.
The change in a function divided by the change in its input, the slope of a secant line: [f(x + Δx) − f(x)]/Δx. Explained in The derivative: slope of the tangent line and rate of change.
Taylor series.
A power series built from a function's derivatives at one point; its first few terms, a Taylor polynomial, approximate the function near that point. Explained in Stacking blocks and Taylor series.
scale factor.
The number a(t) that tells how much distances in the universe have stretched: when it doubles, every distance between galaxies doubles. Explained in Towards the universe: an expanding gas cools.
Big Bang.
The hot, dense early state from which the whole observable universe has been expanding for about 13.8 billion years. Explained in The Big Bang.
Hubble time.
One divided by the Hubble expansion rate: the rough time scale over which the universe changes size noticeably. Explained in Towards the universe: from atoms to the observable universe.
flat universe.
A universe with exactly the critical density, whose space has no curvature and which expands forever, ever more slowly. Explained in Open, closed and flat universes.
acceleration.
How fast velocity changes: the change in velocity in each unit of time. Explained in Rates of change and area under a graph.
kink.
A sharp bend or corner in a line or curve. Explained in The liquid–gas transition of the van der Waals gas.

Academic

accuracy.
Closeness to the true value: an accurate measurement or calculation gives a result near the right answer.
transcript.
A written record of exactly what was said in a recorded lecture, word for word.
error.
The difference between a measured or computed value and the true one; often how large that difference may be.
numerically.
In terms of actual numbers rather than symbols; often worked out step by step, by computer, instead of from an exact formula.
hypothesis.
In mathematics, a condition a theorem assumes; or a statement not yet proved, such as the Riemann hypothesis.
approximation.
Close to, but not exactly, the true value; an approximation is such a value or formula, chosen because it is simpler.
hence.
For this reason; as a result of what was just said.

Tap or click a word, here or in the text, for its meaning in this lesson. All words: the glossary. How many words are marked in the text: Reading options (the “Aa” button).

Where this leads

In cosmology

33 more cosmology pages that build on this

Pages that build on this

Practise

Check your understanding

  1. Newton's method has error 10−310^{-3} after one step. Roughly what error do you expect after the next step?
  2. Which hypotheses does the mean value theorem need on [a,b][a, b]?
  3. For f(x)=x3f(x) = x^3 on [0,2][0, 2], the mean value theorem's point cc is…
  4. Two cameras 12 km apart time a car at 6 minutes between them. What follows?
  5. To prove ln⁡(1+x)<x\ln(1 + x) < x for x>0x > 0, which function is it best to look at?
0 of 5 answered

Flashcards

1 / 4