4.3 The Mean Value Theorem

Let’s motivate with an example of f⁢(x)=x2⁢log⁡xf(x)=x^{2}\log x. A naive look might suggest a simple parabola-like behavior, but the logarithmic term introduces a subtle twist near the origin.

Example 4.3.1.

Consider f⁢(x)=x2⁢log⁡xf(x)=x^{2}\log x on the domain dom⁡(f)=(0,∞)\operatorname{dom}(f)=(0,\infty). We compute the derivative using the product rule:

f′⁢(x)=dd⁢x⁢(x2)⁢log⁡x+x2⁢dd⁢x⁢(log⁡x)=2⁢x⁢log⁡x+x2⋅1x=2⁢x⁢log⁡x+x=x⁢(2⁢log⁡x+1).f^{\prime}(x)=\frac{\mathrm{d}}{\mathrm{d}x}(x^{2})\log x+x^{2}\frac{\mathrm{d% }}{\mathrm{d}x}(\log x)=2x\log x+x^{2}\cdot\frac{1}{x}=2x\log x+x=x(2\log x+1).

The function f′⁢(x)f^{\prime}(x) is well-defined for all x∈(0,∞)x\in(0,\infty). Setting f′⁢(x)=0f^{\prime}(x)=0:

x⁢(2⁢log⁡x+1)=0⟹x=0⁢ (excluded)or2⁢log⁡x+1=0.x(2\log x+1)=0\implies x=0\text{ (excluded)}\quad\text{or}\quad 2\log x+1=0.

Solving for xx:

log⁡x=−12⟹x=e−1/2.\log x=-\frac{1}{2}\implies x=\mathrm{e}^{-1/2}.

Evaluating the function at this point:

f⁢(e−1/2)=(e−1/2)2⁢log⁡(e−1/2)=e−1⁢(−12)=−12⁢e.f(\mathrm{e}^{-1/2})=(\mathrm{e}^{-1/2})^{2}\log(\mathrm{e}^{-1/2})=\mathrm{e}% ^{-1}\left(-\frac{1}{2}\right)=-\frac{1}{2\mathrm{e}}.
A precise Cartesian coordinate graph of the function f(x) = x^2 ln x. The curve starts at the origin with an open circle indicating that zero is not in the domain. It dips below the horizontal axis, reaching its lowest point at the global minimum with x-coordinate e^(-1/2) and y-coordinate -1/(2e). The point is highlighted with a red dot, and dashed lines connect it to both axes. After reaching the minimum, the curve rises smoothly, crossing the x-axis at x=1 and continuing to increase into the first quadrant.
Figure 4.5: The graph of f⁢(x)=x2⁢log⁡xf(x)=x^{2}\log x defined on (0,∞)(0,\infty), illustrating its global minimum at (e−1/2,−12⁢e)\left(\mathrm{e}^{-1/2},-\frac{1}{2\mathrm{e}}\right) and the limit behavior at the origin.
Caveat.

The calculation shows x=e−1/2x=\mathrm{e}^{-1/2} is an extreme value. However, the graph in Figure 4.5 suggests it is a global minimum. As x→0+x\to 0^{+}, x2⁢log⁡x→0x^{2}\log x\to 0. As x→∞x\to\infty, x2⁢log⁡x→∞x^{2}\log x\to\infty. Since the value at the critical point is negative, it should be the global minimum. Nevertheless, to be certain that the graph does not do anything strange near infinity–which is a region we obviously can’t draw, we must ask: Does the function grow or decay at the boundaries of the domain (0,∞)(0,\infty)?

To answer this question, we first need to extend our toolbox. The Mean Value Theorem (MVT) is the foundation for the next section (Section 4.4), where we will provide the rigorous justification for understanding the function’s global behavior via the first derivative.

Theorem 4.3.2 (Mean Value Theorem).

Suppose ff is continuous on the closed interval [a,b][a,b] and differentiable on the open interval (a,b)(a,b). Then there exists a number c∈(a,b)c\in(a,b) such that

f′⁢(c)=f⁢(b)−f⁢(a)b−a.f^{\prime}(c)=\frac{f(b)-f(a)}{b-a}.
Story (A speeding problem).

Think of your morning commute to campus. If you drive 18 miles in half an hour (from 7:00 AM to 8:30 AM, for example), your average velocity is 36 mph. The MVT guarantees there was at least one instant cc where your speedometer read exactly 36 mph. If the speed limit is 35 mph, the math proves you were speeding!

A Cartesian coordinate graph illustrating the Mean Value Theorem. A smooth blue curve representing y = f(x) is plotted on the interval [a, b]. A red secant line connects the endpoint points (a, f(a)) and (b, f(b)). A parallel green tangent line touches the curve at a point (c, f(c)) located between a and b. Dashed gray projection lines extend from each of the three key points to both axes, marking their coordinates as a, c, b on the horizontal axis and f(a), f(c), f(b) on the vertical axis.
Figure 4.6: The Mean Value Theorem states that for a continuous function ff on [a,b][a,b] and differentiable on (a,b)(a,b), there exists a point c∈(a,b)c\in(a,b) where the tangent line is parallel to the secant line.

The geometric meaning of the mean value theorem is explained in Figure 4.6. This motivate the following proof:

Proof of Theorem 4.3.2.
  1. 1.
    ​

    Construct the secant line ℓ⁢(x)\ell(x) passing through (a,f⁢(a))(a,f(a)) and (b,f⁢(b))(b,f(b)).

    ℓ⁢(x)=f⁢(a)+f⁢(b)−f⁢(a)b−a⁢(x−a).\ell(x)=f(a)+\frac{f(b)-f(a)}{b-a}(x-a).
  2. 2.
    ​

    Define the difference function d⁢(x)=f⁢(x)−ℓ⁢(x)d(x)=f(x)-\ell(x). Note that d⁢(a)=0d(a)=0 and d⁢(b)=0d(b)=0.

  3. 3.
    ​

    By the Extreme Value Theorem, d⁢(x)d(x) must attain a maximum or minimum on [a,b][a,b]. Since d⁢(a)=d⁢(b)=0d(a)=d(b)=0, if dd is not identically zero, the extremum must occur at some c∈(a,b)c\in(a,b). At this point, d′⁢(c)=0d^{\prime}(c)=0, which implies f′⁢(c)=ℓ′⁢(c)=f⁢(b)−f⁢(a)b−af^{\prime}(c)=\ell^{\prime}(c)=\frac{f(b)-f(a)}{b-a}.

∎

Moral (A key of integration).

If f′⁢(x)=0f^{\prime}(x)=0 for all xx in an interval II, then ff must be constant (prove this statement using the mean value theorem). This is the cornerstone of integration theory: the derivative identifies functions up to an additive constant CC.

Here is a simple consequence of the mean value theorem:

Theorem 4.3.3 (Rolle theorem).

Suppose ff is continuous on the closed interval [a,b][a,b] and differentiable on the open interval (a,b)(a,b) with f⁢(a)=f⁢(b)f(a)=f(b). Then there exists a number c∈(a,b)c\in(a,b) such that

f′⁢(c)=0.f^{\prime}(c)=0.
Proof.

Exercise. ∎

Exercise 4.3.4.

Prove that if f′⁢(x)=g′⁢(x)f^{\prime}(x)=g^{\prime}(x) for all x∈Ix\in I, then f⁢(x)=g⁢(x)+Cf(x)=g(x)+C.

Hint: Apply the MVT to the function h⁢(x)=f⁢(x)−g⁢(x)h(x)=f(x)-g(x).

Exercise 4.3.5.

What happens if d⁢(x)d(x) in the MVT proof attains its extrema at the endpoints aa or bb?

Hint: Consider the case where d⁢(x)d(x) is constant. What does this imply about f⁢(x)f(x)?

Exercise 4.3.6.

Show that f⁢(x)=tan−1⁡(x)f(x)=\tan^{-1}(x) on ℝ\mathbb{R} has no global maximum or minimum. Hint: Consider the horizontal asymptotes at ±π/2\pm\pi/2.

Exercise 4.3.7.

Prove that if ff is continuous and f′⁢(x)≠0f^{\prime}(x)\neq 0 for all x∈(a,b)x\in(a,b), then the global extrema must occur at the endpoints. Hint: Use the Mean Value Theorem to show that ff must be strictly monotonic.