Cauchy's Mean Value Theorem

lean4-proofcalculusvisualization
c(a,b):  (g(b)g(a))f(c)=(f(b)f(a))g(c)\exists\,c\in(a,b):\;(g(b)-g(a))f'(c)=(f(b)-f(a))g'(c)

Statement

Let f,g:RRf, g : \mathbb{R} \to \mathbb{R} both be continuous on [a,b][a, b] and differentiable on (a,b)(a, b). Then there exists c(a,b)c \in (a, b) such that

(g(b)g(a))f(c)=(f(b)f(a))g(c)(g(b) - g(a)) \cdot f'(c) = (f(b) - f(a)) \cdot g'(c)

When g(c)0g'(c) \neq 0 and g(b)g(a)g(b) \neq g(a) this rearranges to

f(c)g(c)=f(b)f(a)g(b)g(a)\frac{f'(c)}{g'(c)} = \frac{f(b) - f(a)}{g(b) - g(a)}

The ordinary Mean Value Theorem is the special case g(x)=xg(x) = x.

Visualization

Take f(x)=x2f(x) = x^2 and g(x)=x3g(x) = x^3 on [1,2][1, 2].

Values:

quantityvalue
f(1)=1f(1) = 1, f(2)=4f(2) = 4f(2)f(1)=3f(2)-f(1) = 3
g(1)=1g(1) = 1, g(2)=8g(2) = 8g(2)g(1)=7g(2)-g(1) = 7
ratio f(b)f(a)g(b)g(a)\frac{f(b)-f(a)}{g(b)-g(a)}37\frac{3}{7}

Derivatives: f(x)=2xf'(x) = 2x, g(x)=3x2g'(x) = 3x^2.

We need f(c)g(c)=2c3c2=23c=37\frac{f'(c)}{g'(c)} = \frac{2c}{3c^2} = \frac{2}{3c} = \frac{3}{7}, so:

c=1491.556(1,2)c = \frac{14}{9} \approx 1.556 \in (1, 2) \checkmark
xxf(x)f'(x)g(x)g'(x)ratio f/gf'/g'
1.02.03.00.667
1.5563.1117.2590.429 = 3/7
2.04.012.00.333

Proof Sketch

  1. Auxiliary function: Define h(x)=(g(b)g(a))f(x)(f(b)f(a))g(x)h(x) = (g(b) - g(a)) f(x) - (f(b) - f(a)) g(x).
  2. Equal endpoints: h(a)=(g(b)g(a))f(a)(f(b)f(a))g(a)h(a) = (g(b)-g(a))f(a) - (f(b)-f(a))g(a) and h(b)=(g(b)g(a))f(b)(f(b)f(a))g(b)h(b) = (g(b)-g(a))f(b) - (f(b)-f(a))g(b); direct algebra shows h(a)=h(b)h(a) = h(b).
  3. Apply Rolle's Theorem: hh is continuous on [a,b][a,b], differentiable on (a,b)(a,b), and h(a)=h(b)h(a) = h(b), so there exists c(a,b)c \in (a,b) with h(c)=0h'(c) = 0.
  4. Expand: h(c)=(g(b)g(a))f(c)(f(b)f(a))g(c)=0h'(c) = (g(b)-g(a)) f'(c) - (f(b)-f(a)) g'(c) = 0 is exactly the conclusion.

Connections

  • Mean Value TheoremMean Value Theoremc(a,b)  :  f(c)=f(b)f(a)ba\exists\, c \in (a,b)\;:\; f'(c) = \frac{f(b)-f(a)}{b-a}There exists a point where the instantaneous rate of change equals the average rate of changeRead more → — Cauchy's MVT reduces to the standard MVT when g(x)=xg(x) = x
  • L'Hôpital's RuleL'Hôpital's Rulelimxaf(x)g(x)=limxaf(x)g(x)\lim_{x \to a} \frac{f(x)}{g(x)} = \lim_{x \to a} \frac{f'(x)}{g'(x)}Evaluate indeterminate-form limits by differentiating numerator and denominatorRead more → — L’Hôpital's rule for 0/00/0 indeterminate forms is proved using Cauchy's MVT
  • Taylor's TheoremTaylor's Theoremf(x)=k=0nf(k)(x0)k!(xx0)k+Rn(x)f(x) = \sum_{k=0}^{n} \frac{f^{(k)}(x_0)}{k!}(x-x_0)^k + R_n(x)Approximate smooth functions by polynomials with explicit error boundsRead more → — higher-order Taylor remainder estimates use iterated applications of Cauchy's MVT
  • Rolle's TheoremRolle's Theoremf(a)=f(b)    c(a,b):  f(c)=0f(a)=f(b)\implies\exists\,c\in(a,b):\;f'(c)=0Between two equal values of a differentiable function there exists a point with zero derivativeRead more → — the proof constructs an auxiliary function and applies Rolle directly

Alternative name: the ratio form f(b)f(a)g(b)g(a)=f(c)g(c)\frac{f(b)-f(a)}{g(b)-g(a)} = \frac{f'(c)}{g'(c)} (when g(b)g(a)g(b) \neq g(a) and g0g' \neq 0) is also called the Generalized Mean Value Theorem; it is a direct rearrangement of the multiplicative statement above.

Lean4 Proof

import Mathlib.Analysis.Calculus.Deriv.MeanValue

/-- Cauchy's Mean Value Theorem: wraps `exists_ratio_hasDerivAt_eq_ratio_slope`. -/
theorem cauchy_mvt {f g f' g' :   } {a b : } (hab : a < b)
    (hfc : ContinuousOn f (Set.Icc a b))
    (hgc : ContinuousOn g (Set.Icc a b))
    (hff' :  x  Set.Ioo a b, HasDerivAt f (f' x) x)
    (hgg' :  x  Set.Ioo a b, HasDerivAt g (g' x) x) :
     c  Set.Ioo a b, (g b - g a) * f' c = (f b - f a) * g' c :=
  exists_ratio_hasDerivAt_eq_ratio_slope f f' hab hfc hff' g g' hgc hgg'