这一讲要做什么
上一讲建立了导数与求导法则,这一讲把它们变成一套估计工具。整条逻辑链只有四步:
- 内点取到局部极值且可导,则导数为零(一个几乎不用证明的观察)。
- 用它推出 Rolle 定理:两端同高,则中间某处导数为零。
- 用 Rolle 定理推出中值定理:平均斜率一定在某点被取到;再推广到 Cauchy 中值定理。
- 反复使用 Rolle 定理,把函数在一点附近写成多项式加一个可估计的余项,这就是 Taylor 展开。
每一步都只是上一步的推论,但第四步已经能回答一个很实际的问题:用多项式近似函数,误差有多大?
时间轴
| 时间 | 内容 |
|---|
| 0:00 | 回顾:可导定义、可导蕴含连续、和/数乘/Leibniz/商/链式法则 |
| 5:34 | 局部极大、局部极小的定义 |
| 10:00 | 定理:内点局部极值处导数为零(证明) |
| 17:38 | 临界点;例子 x2 与 x3 |
| 20:15 | Rolle 定理及三情形证明 |
| 25:49 | 中值定理(用辅助函数证明) |
| 32:42 | Cauchy 中值定理 |
| 43:59 | Taylor 展开:先做一阶情形 |
| 1:04:07 | 一般的 k−1 阶 Taylor 多项式与余项 |
| 1:17:14 | 洛必达法则留到下一讲 |
回顾:可导与五条法则
f 在 x0 可导,是指差商
x−x0f(x)−f(x0)
在 x→x0(x=x0)时有极限,这个极限记作 f′(x0)。上一讲证明了:可导蕴含连续,并建立了五条法则——和、数乘、Leibniz 乘积法则、商法则(要求分母非零)、链式法则:
(fg)′=f′g+fg′,(gf)′=g2f′g−fg′,(g∘f)′(x)=g′(f(x))f′(x).
这些法则合起来,保证多项式、有理函数以及足够光滑的复合函数都可以放心求导。
局部极值
设 f 定义在包含 x0 的开区间上。称 f 在 x0 取局部极大值,若存在 δ>0,使得对所有满足 ∣x−x0∣<δ 的 x,
f(x)≤f(x0).
局部极小值把不等号反过来。注意两点:
- 定义只关心 x0 附近,远处函数值多大都无所谓。
- 定义不需要可导,甚至不需要连续。
课程用图说明:局部最大值只要求「在某个小窗口里最高」,窗口外可能有更高的地方。全局最大值当然也是局部最大值,反之不然。
内点极值处导数为零
定理(Fermat)。 设 f 在区间上可导,x0 是区间的内点,且 f 在 x0 取局部极大或极小值,则
f′(x0)=0.
内点这个条件是本质的:端点处函数可以「取到最大值」而斜率不为零。
证明。 只证局部极大,极小同理。取定义中的 δ。
右导数。 若 x0<x<x0+δ,则 f(x)≤f(x0),分子非正,而分母 x−x0>0,所以
x−x0f(x)−f(x0)≤0.
令 x→x0+,差商有极限 f′(x0),由极限保号性得
f′(x0)≤0.
左导数。 若 x0−δ<x<x0,分子仍非正,但分母 x−x0<0,所以
x−x0f(x)−f(x0)≥0.
令 x→x0−,得
f′(x0)≥0.
两式合起来,0≤f′(x0)≤0,故 f′(x0)=0。□
证明的关键是从两侧分别逼近:分子总是非正,分母的符号在两侧相反,于是两个单侧极限的符号相反,而它们必须相等。
若 f′(x0)=0,称 x0 是 f 的临界点。
两个例子:逆命题不成立
- f(x)=x2,f′(x)=2x,唯一临界点 x=0,确实是局部(也是全局)极小值。
- f(x)=x3,f′(x)=3x2,x=0 是临界点,但 x3 在 0 的任意两侧都取到更小和更大的值,没有极值。图像在原点变得很平,然后继续上升。
所以「导数为零」只是取极值的必要条件,不是充分条件。判断临界点是不是极值,要看导数在两侧的符号,或者用更高阶的导数。
Rolle 定理
定理。 设 f 在 [a,b] 上连续、在 (a,b) 上可导,且 f(a)=f(b),则存在 x0∈(a,b),使
f′(x0)=0.
课程把 f(a)=f(b) 写成「两端同高」,不要求等于零。
证明。 分三种情形,至少有一种发生:
- f 在 [a,b] 上为常数。此时 f′≡0,任取内点即可。
- 存在 x 使 f(x)>f(a)。
- 存在 x 使 f(x)<f(a)。
情形 2:f 连续,由极值定理(闭区间上连续函数取到最大值与最小值),f 在 [a,b] 上取到最大值。由于某点的值严格大于端点值,最大值不可能在端点取到,只能在某个内点 x0 取到。于是 x0 是局部极大值点,由 Fermat 定理 f′(x0)=0。
情形 3 同理,把最大值换成最小值。□
这里用到了两条已经建立的结果:连续函数在闭区间上取到极值,以及内点极值处导数为零。Rolle 定理本身没有新思想,它只是把这两条接在一起。
中值定理(Lagrange)
定理。 设 f 在 [a,b] 上连续、在 (a,b) 上可导,则存在 x0∈(a,b),使
f′(x0)=b−af(b)−f(a).
右端是两端点连线的斜率,也就是「平均变化率」。定理说:平均斜率一定在某一点被瞬时斜率取到。
证明。 构造辅助函数
h(x)=f(x)−b−af(b)−f(a)(x−a).
几何上,这是把函数减去连接两端点的弦:h 是函数与弦的竖直距离。
先验证 Rolle 定理的条件。h 是 f 减去一个线性函数,因此连续、可导。再算端点值:
h(a)=f(a)−b−af(b)−f(a)⋅0=f(a),
h(b)=f(b)−b−af(b)−f(a)(b−a)=f(b)−(f(b)−f(a))=f(a).
所以 h(a)=h(b)。由 Rolle 定理,存在 x0∈(a,b) 使 h′(x0)=0。而
h′(x)=f′(x)−b−af(b)−f(a),
令其为零即得结论。□
辅助函数是怎么想出来的? 目标是让 Rolle 定理能用,也就是让函数在两端相等。函数与弦在 a、b 两点的差都是零,所以「函数减弦」天然满足条件;而它的导数恰好是「f′ 减平均斜率」。这就是构造的全部动机。
Cauchy 中值定理
定理。 设 f,g 在 [a,b] 上连续、在 (a,b) 上可导,则存在 x0∈(a,b),使
f′(x0)(g(b)−g(a))=g′(x0)(f(b)−f(a)).
若 g(b)=g(a) 且 g′(x0)=0,可以写成
g′(x0)f′(x0)=g(b)−g(a)f(b)−f(a).
它看起来像「两个函数同时满足中值定理」。事实上,普通中值定理分别对 f 和 g 各给一个点,而 Cauchy 版本保证同一个点同时满足两者——这一点并不显然。
证明。 把要证的等式移项,构造
h(x)=f(x)(g(b)−g(a))−g(x)(f(b)−f(a)).
h 连续、可导,且
h′(x)=f′(x)(g(b)−g(a))−g′(x)(f(b)−f(a)),
正是要令其为零的表达式。检查端点:
h(a)=f(a)(g(b)−g(a))−g(a)(f(b)−f(a))=f(a)g(b)−g(a)f(b),
h(b)=f(b)(g(b)−g(a))−g(b)(f(b)−f(a))=f(b)g(b)−g(b)f(b)+g(b)f(a)−f(b)g(a)=f(a)g(b)−g(a)f(b).
两式相同,故 h(a)=h(b),由 Rolle 定理得 h′(x0)=0,即所欲证。□
与中值定理的关系。 取 g(x)=x,则 g(b)−g(a)=b−a,g′(x0)=1,Cauchy 公式退化为
f′(x0)(b−a)=f(b)−f(a),
正是普通中值定理。所以 Cauchy 版本是更一般的陈述。
Taylor 展开:先做一阶
设 f 可导且 f′ 也可导(即二阶可导)。在点 a 附近,用一次多项式近似:
P1(x)=f(a)+f′(a)(x−a).
它满足 P1(a)=f(a)、P1′(a)=f′(a):值与一阶导数都和 f 对上。问题是用它近似 f 的误差有多大。
定理(一阶 Taylor)。 设 f 在包含 a,b 的区间上二阶可导,则存在 c 严格介于 a 与 b 之间,使
f(b)=P1(b)+2f′′(c)(b−a)2.
余项是 2f′′(c)(b−a)2,只要知道 f′′ 的界,就能估计误差。
证明(两次 Rolle)。 固定 a,b。定义数 M 为
M=(b−a)22(f(b)−P1(b)),
于是按定义
f(b)−P1(b)−2M(b−a)2=0.
构造
h(x)=f(x)−P1(x)−2M(x−a)2.
则
h(b)=0(由 M 的定义),h(a)=f(a)−P1(a)−0=0.
注意 2M(x−a)2 在 x=a 处为零,且 P1(a)=f(a),所以 h(a)=0。
于是 h(a)=h(b),由 Rolle 定理存在 c1∈(a,b) 使 h′(c1)=0。
再算
h′(x)=f′(x)−f′(a)−M(x−a),
因为 P1′(x)=f′(a)。代入 x=a:
h′(a)=f′(a)−f′(a)−0=0.
现在在区间 [a,c1] 上对 h′ 再用一次 Rolle 定理——h′(a)=h′(c1)=0——得到 c2∈(a,c1) 使 h′′(c2)=0。
最后
h′′(x)=f′′(x)−M,
(P1 的二阶导数为零,2M(x−a)2 的二阶导数为 M),所以
0=h′′(c2)=f′′(c2)−M⟹M=f′′(c2).
把 M 代回定义即得结论,其中 c=c2∈(a,b)。□
一般的 Taylor 公式
把上面的论证重复 k 次,就得到 k 阶版本。设 f 在包含 a,b 的区间上 k 次可导。
定义 k−1 阶 Taylor 多项式
Pk−1(x)=i=0∑k−1i!f(i)(a)(x−a)i=f(a)+f′(a)(x−a)+2!f′′(a)(x−a)2+⋯+(k−1)!f(k−1)(a)(x−a)k−1.
定理(Taylor 公式,余项形式)。 存在 c 严格介于 a 与 b 之间,使
f(b)=Pk−1(b)+k!f(k)(c)(b−a)k.
最后一项称为余项(Lagrange 余项)。k=2 时正是上一节的结论,因为 P1 是 1 阶多项式、余项除以 2!。
证明思路。 与 k=2 完全相同,只是多重复几次。
- 令 M=(b−a)kk!(f(b)−Pk−1(b)),于是 h(b)=0,其中
h(x)=f(x)−Pk−1(x)−k!M(x−a)k.
-
h(a)=0,因为 Pk−1(a)=f(a),且 (a−a)k=0。
-
用 Rolle 定理得到 c1∈(a,b),h′(c1)=0。
-
对 j=1,…,k−1,Pk−1 在 a 处的 j 阶导数等于 f(j)(a),而 (x−a)k 的各阶导数在 a 处直到 k−1 阶都为零。因此
h(j)(a)=0,j=0,1,…,k−1.
- 在 [a,c1] 上对 h′ 用 Rolle,得到 c2∈(a,c1) 使 h′′(c2)=0;再在 [a,c2] 上对 h′′ 用 Rolle,如此反复。每用一次,区间右端点向左移动。第 k 次得到 ck∈(a,b) 使
h(k)(ck)=0.
- 因为 Pk−1 的 k 阶导数为零,而 k!M(x−a)k 的 k 阶导数等于 M,所以
h(k)(x)=f(k)(x)−M⟹M=f(k)(ck).
代回 M 的定义即得。□
余项的价值在于它可以估计:若已知 ∣f(k)∣≤C 在区间上成立,则
∣f(b)−Pk−1(b)∣≤k!C∣b−a∣k.
右边随 k 增长得非常快(阶乘在分母),所以对光滑函数,低阶多项式就能给出很好的局部近似——这正是 Taylor 展开的实用意义。
本节结论
- 内点局部极值 + 可导 ⇒ 导数为零;反之不成立(x3)。
- Rolle 定理:两端同高则中间有水平切线;证明靠极值定理加 Fermat。
- 中值定理:f′(x0)=b−af(b)−f(a),辅助函数是「函数减弦」。
- Cauchy 中值定理:f′(x0)(g(b)−g(a))=g′(x0)(f(b)−f(a)),取 g(x)=x 退化为中值定理。
- 一阶 Taylor:f(b)=f(a)+f′(a)(b−a)+2f′′(c)(b−a)2。
- 一般 Taylor:f(b)=Pk−1(b)+k!f(k)(c)(b−a)k,证明是把 Rolle 定理用 k 次。
- 洛必达法则在讲义中,但课上留到下一讲。
理解检验
1. 用局部极值的定义与单侧差商证明 Fermat 定理,并说明为什么 x0 必须是内点。
参考答案:设 x0 是局部极大值点,取定义中的 δ>0。当 0<x−x0<δ 时 f(x)−f(x0)≤0,分母为正,故差商 ≤0;令 x→x0+ 得 f′(x0)≤0。当 −δ<x−x0<0 时分子仍 ≤0,分母为负,故差商 ≥0;令 x→x0− 得 f′(x0)≥0。两侧极限都存在且等于 f′(x0),于是 f′(x0)=0。必须要求内点,是因为证明要在 x0 两侧都能取到点;若 x0 是端点,只有一侧可用,只能得到一个不等式。例如 f(x)=x 在 [0,1] 上于 x=1 取最大值,但 f′(1)=1=0。
2. 举一个导数为零却不是极值的例子,并说明 Rolle 定理的逆命题为什么不成立。
参考答案:f(x)=x3,f′(x)=3x2,f′(0)=0,但 x<0 时 f(x)<0=f(0),x>0 时 f(x)>0,所以 0 既不是极大也不是极小。Rolle 定理只断言「存在一点导数为零」,反过来的意思是「若某点导数为零,则函数在某个区间两端同高」,这显然不成立:可以在 x3 的原点附近取任意区间 [a,b],f(a)=f(b),却仍有 f′(0)=0。定理给出的是存在性,不给出位置,也不能倒推端点条件。
3. 中值定理的辅助函数 h(x)=f(x)−b−af(b)−f(a)(x−a) 是怎么想到的?
参考答案:要使用 Rolle 定理,必须让辅助函数在 a,b 两点取相同的值。函数 f 与弦 L(x)=f(a)+b−af(b)−f(a)(x−a) 在两端重合:L(a)=f(a),L(b)=f(b)。所以 h=f−L 满足 h(a)=h(b)=0。同时 h′=f′−b−af(b)−f(a),令 h′=0 立刻得到中值定理的结论。几何上,h 是函数图像与弦之间的竖直距离;中值定理说的正是这段距离在某点取得极值,从而切线平行于弦。
4. 证明 Cauchy 中值定理,并验证取 g(x)=x 时它退化为普通中值定理。
参考答案:令 h(x)=f(x)(g(b)−g(a))−g(x)(f(b)−f(a))。h 连续可导,且
h′(x)=f′(x)(g(b)−g(a))−g′(x)(f(b)−f(a)).
计算端点:h(a)=f(a)g(b)−g(a)f(b),h(b)=f(b)g(b)−f(b)g(a)−g(b)f(b)+g(b)f(a)=f(a)g(b)−g(a)f(b),两者相等。由 Rolle 定理存在 x0 使 h′(x0)=0,即 f′(x0)(g(b)−g(a))=g′(x0)(f(b)−f(a))。取 g(x)=x,则 g(b)−g(a)=b−a、g′(x0)=1,等式变为 f′(x0)(b−a)=f(b)−f(a),正是中值定理。
5. Taylor 定理的证明中,为什么要反复使用 Rolle 定理?M 的作用是什么?
参考答案:M 是一个待定的常数,定义成使 f(b)−Pk−1(b)−k!M(b−a)k=0,从而辅助函数 h(x)=f(x)−Pk−1(x)−k!M(x−a)k 满足 h(b)=0。又因为 Pk−1 与 f 在 a 处的值及直到 k−1 阶的导数都相同,而 (x−a)k 的低于 k 阶导数在 a 处全为零,所以 h(j)(a)=0(j=0,…,k−1)。这就给了 k 组「两端相等」的条件:(h(a),h(b))、(h′(a),h′(c1))、…每用一次 Rolle 定理,就得到一个新的内点并使导数阶数加一,同时区间右端向左收缩。第 k 次得到 h(k)(c)=0;而 h(k)=f(k)−M,于是 M=f(k)(c)。M 的作用是把未知的余项系数变成一个满足端点条件的常数,让 Rolle 定理有东西可用。
与前后课的关系
本讲把 Rolle 定理当作唯一的发动机,推出了中值定理、Cauchy 中值定理和 Taylor 公式。下一讲先用 Cauchy 中值定理证明洛必达法则(课上明确说留到下次),再转向 Taylor 多项式在具体函数上的应用,并开始构造 Riemann 积分。再往后,Taylor 余项会成为判定级数收敛、估计积分误差的基本工具。
值得注意的是证明的复用结构:一个关于极值的局部观察,经过不同辅助函数的包装,就能回答「平均斜率在哪里取到」「函数与多项式的差有多大」这两类看似无关的问题。这种「找辅助函数把问题变成 Rolle 定理」的思路,是实分析里最常见的技巧之一。
What this lecture accomplishes
The previous lecture built derivatives and the differentiation rules. This one turns them into a set of estimation tools. The whole chain has four links:
- Differentiable with an interior local extremum implies the derivative vanishes — an observation that barely needs proof.
- Rolle's theorem: equal heights at the endpoints force a horizontal tangent somewhere inside.
- The mean value theorem: the average slope is attained somewhere; then Cauchy's version.
- Applying Rolle repeatedly writes a function near a point as a polynomial plus an estimable remainder — Taylor expansion.
Each step is only a corollary of the previous one, yet the last answers a very practical question: how large is the error when a polynomial replaces a function?
Timeline
| Time | Topic |
|---|
| 0:00 | Recap: differentiability, differentiability implies continuity, sum/scalar/Leibniz/quotient/chain rules |
| 5:34 | Local maxima and local minima |
| 10:00 | Theorem: the derivative vanishes at an interior extremum (proof) |
| 17:38 | Critical points; the examples x2 and x3 |
| 20:15 | Rolle's theorem and its three-case proof |
| 25:49 | The mean value theorem via an auxiliary function |
| 32:42 | Cauchy's mean value theorem |
| 43:59 | Taylor expansion: the first-order case first |
| 1:04:07 | The general (k−1)-st Taylor polynomial and remainder |
| 1:17:14 | L'Hôpital's rule deferred to the next lecture |
Recap: differentiability and five rules
f is differentiable at x0 when the difference quotient
x−x0f(x)−f(x0)
has a limit as x→x0 with x=x0; that limit is f′(x0). The previous lecture proved that differentiability implies continuity and established five rules — sum, scalar multiple, the Leibniz product rule, the quotient rule (with nonzero denominator), and the chain rule:
(fg)′=f′g+fg′,(gf)′=g2f′g−fg′,(g∘f)′(x)=g′(f(x))f′(x).
Together these let us differentiate polynomials, rational functions and sufficiently smooth composites without further thought.
Local extrema
Let f be defined on an open interval containing x0. Say f has a local maximum at x0 if there is δ>0 such that
f(x)≤f(x0)for all x with ∣x−x0∣<δ.
A local minimum reverses the inequality. Two points matter:
- Only a neighbourhood of x0 is involved; values far away are irrelevant.
- Neither differentiability nor even continuity is required.
The picture in the lecture: a local maximum is merely the highest point in some small window, while outside that window the function may climb much higher. Every global maximum is local, but not conversely.
The derivative vanishes at an interior extremum
Theorem (Fermat). Let f be differentiable on an interval, let x0 be an interior point, and suppose f has a local maximum or minimum at x0. Then
f′(x0)=0.
The interior condition is essential: at an endpoint a function can attain its maximum with nonzero slope.
Proof. Take a local maximum; the minimum case is symmetric. Fix δ>0 from the definition.
Right-hand side. For x0<x<x0+δ we have f(x)≤f(x0), so the numerator is nonpositive while x−x0>0, hence
x−x0f(x)−f(x0)≤0.
Letting x→x0+, the quotient tends to f′(x0), and limits preserve weak inequalities, so
f′(x0)≤0.
Left-hand side. For x0−δ<x<x0 the numerator is still nonpositive, but now x−x0<0, hence
x−x0f(x)−f(x0)≥0.
Letting x→x0− gives
f′(x0)≥0.
Combining, 0≤f′(x0)≤0, so f′(x0)=0. □
The key move is to approach from both sides: the numerator is always nonpositive, while the denominator flips sign, so the two one-sided limits have opposite signs — and they must be equal.
If f′(x0)=0, call x0 a critical point of f.
Two examples: the converse fails
- f(x)=x2 has f′(x)=2x, so x=0 is the only critical point, and it is a genuine (indeed global) minimum.
- f(x)=x3 has f′(x)=3x2, so x=0 is critical, yet x3 takes smaller values to the left and larger values to the right: no extremum. The graph flattens at the origin and then keeps rising.
So vanishing derivative is only a necessary condition. To decide whether a critical point is an extremum, inspect the sign of the derivative on either side, or use higher derivatives.
Rolle's theorem
Theorem. Let f be continuous on [a,b] and differentiable on (a,b), with f(a)=f(b). Then some x0∈(a,b) satisfies
f′(x0)=0.
The hypothesis is "equal heights at the ends", not necessarily zero.
Proof. Exactly one of three cases occurs:
- f is constant on [a,b]. Then f′≡0 and any interior point works.
- Some x has f(x)>f(a).
- Some x has f(x)<f(a).
Case 2: since f is continuous, the extreme value theorem gives a maximum on [a,b]. Because some value strictly exceeds the endpoint value, the maximum cannot occur at an endpoint; it occurs at an interior point x0. That point is a local maximum, so Fermat's theorem gives f′(x0)=0.
Case 3 is the same with the minimum instead of the maximum. □
Two previously established facts do all the work: a continuous function on a closed interval attains its extrema, and the derivative vanishes at an interior extremum. Rolle's theorem introduces no new idea; it merely joins them.
The mean value theorem (Lagrange)
Theorem. Let f be continuous on [a,b] and differentiable on (a,b). Then some x0∈(a,b) satisfies
f′(x0)=b−af(b)−f(a).
The right side is the slope of the chord joining the endpoints — the average rate of change. The theorem says: the average slope is attained as an instantaneous slope somewhere.
Proof. Define the auxiliary function
h(x)=f(x)−b−af(b)−f(a)(x−a).
Geometrically this is the function minus the chord: h is the vertical gap between the graph and the chord.
Rolle's hypotheses hold: h is f minus a linear function, hence continuous and differentiable. Check the endpoints:
h(a)=f(a)−b−af(b)−f(a)⋅0=f(a),
h(b)=f(b)−b−af(b)−f(a)(b−a)=f(b)−(f(b)−f(a))=f(a).
So h(a)=h(b). Rolle gives x0∈(a,b) with h′(x0)=0. Since
h′(x)=f′(x)−b−af(b)−f(a),
setting it to zero is exactly the claim. □
Where does the auxiliary function come from? Rolle needs equal endpoint values. The graph and its chord coincide at a and at b, so "function minus chord" automatically satisfies the endpoint condition; and its derivative is "f′ minus the average slope". That is the entire motivation.
Cauchy's mean value theorem
Theorem. Let f,g be continuous on [a,b] and differentiable on (a,b). Then some x0∈(a,b) satisfies
f′(x0)(g(b)−g(a))=g′(x0)(f(b)−f(a)).
If g(b)=g(a) and g′(x0)=0, this can be written
g′(x0)f′(x0)=g(b)−g(a)f(b)−f(a).
It looks like "the mean value theorem for two functions at once". Applied separately, the ordinary theorem gives one point for f and possibly a different point for g; the Cauchy version guarantees one point satisfying both. That is not obvious.
Proof. Move everything to one side and set
h(x)=f(x)(g(b)−g(a))−g(x)(f(b)−f(a)).
Then h is continuous and differentiable, with
h′(x)=f′(x)(g(b)−g(a))−g′(x)(f(b)−f(a)),
which is precisely the expression to be made zero. At the endpoints,
h(a)=f(a)(g(b)−g(a))−g(a)(f(b)−f(a))=f(a)g(b)−g(a)f(b),
h(b)=f(b)g(b)−f(b)g(a)−g(b)f(b)+g(b)f(a)=f(a)g(b)−g(a)f(b).
They agree, so h(a)=h(b) and Rolle gives x0 with h′(x0)=0, which is the claim. □
Relation to the ordinary theorem. Take g(x)=x. Then g(b)−g(a)=b−a and g′(x0)=1, and Cauchy's identity becomes
f′(x0)(b−a)=f(b)−f(a),
the ordinary mean value theorem. The Cauchy form is therefore the more general statement.
Taylor expansion: first order
Let f be differentiable with f′ differentiable (so f is twice differentiable). Near a, approximate by the linear polynomial
P1(x)=f(a)+f′(a)(x−a).
It matches value and first derivative: P1(a)=f(a) and P1′(a)=f′(a). The question is the size of the error.
Theorem (first-order Taylor). Let f be twice differentiable on an interval containing a and b. Then some c strictly between a and b satisfies
f(b)=P1(b)+2f′′(c)(b−a)2.
The remainder 2f′′(c)(b−a)2 is controllable as soon as a bound on f′′ is known.
Proof (Rolle twice). Fix a,b and define the number
M=(b−a)22(f(b)−P1(b)),
so that, by construction,
f(b)−P1(b)−2M(b−a)2=0.
Set
h(x)=f(x)−P1(x)−2M(x−a)2.
Then h(b)=0 by the definition of M, and
h(a)=f(a)−P1(a)−0=0,
because (a−a)2=0 and P1(a)=f(a).
Thus h(a)=h(b), and Rolle gives c1∈(a,b) with h′(c1)=0.
Next,
h′(x)=f′(x)−f′(a)−M(x−a),
since P1′(x)=f′(a). At x=a,
h′(a)=f′(a)−f′(a)−0=0.
Apply Rolle to h′ on [a,c1] — both endpoints vanish — to get c2∈(a,c1) with h′′(c2)=0.
Finally,
h′′(x)=f′′(x)−M,
because P1 has zero second derivative and 2M(x−a)2 has second derivative M. Hence
0=h′′(c2)=f′′(c2)−M⟹M=f′′(c2).
Substituting back into the definition of M gives the formula, with c=c2∈(a,b). □
Repeating the argument k times gives the k-th order version. Let f be k times differentiable on an interval containing a and b, and define the Taylor polynomial of degree k−1
Pk−1(x)=i=0∑k−1i!f(i)(a)(x−a)i=f(a)+f′(a)(x−a)+2!f′′(a)(x−a)2+⋯+(k−1)!f(k−1)(a)(x−a)k−1.
Theorem (Taylor with Lagrange remainder). Some c strictly between a and b satisfies
f(b)=Pk−1(b)+k!f(k)(c)(b−a)k.
The last term is the remainder. For k=2 this is the previous result, since P1 is the polynomial of degree 1 and the remainder is divided by 2!.
Proof sketch. Identical to the case k=2, just repeated.
- Put M=(b−a)kk!(f(b)−Pk−1(b)), so that h(b)=0 for
h(x)=f(x)−Pk−1(x)−k!M(x−a)k.
-
h(a)=0, because Pk−1(a)=f(a) and (a−a)k=0.
-
Rolle gives c1∈(a,b) with h′(c1)=0.
-
For j=1,…,k−1, the j-th derivative of Pk−1 at a equals f(j)(a), while every derivative of (x−a)k of order below k vanishes at a. Hence
h(j)(a)=0,j=0,1,…,k−1.
- Apply Rolle to h′ on [a,c1] to get c2∈(a,c1) with h′′(c2)=0; then apply Rolle to h′′ on [a,c2], and so on. Each application moves the right endpoint leftward. The k-th application gives ck∈(a,b) with
h(k)(ck)=0.
- Since the k-th derivative of Pk−1 is zero and that of k!M(x−a)k is M,
h(k)(x)=f(k)(x)−M⟹M=f(k)(ck).
Substituting into the definition of M completes the proof. □
The remainder is valuable because it is estimable: if ∣f(k)∣≤C on the interval, then
∣f(b)−Pk−1(b)∣≤k!C∣b−a∣k.
The bound shrinks extremely fast in k because the factorial sits in the denominator. For smooth functions, low-degree polynomials therefore give excellent local approximations — the practical meaning of Taylor expansion.
What this lecture establishes
- Interior local extremum plus differentiability ⇒ vanishing derivative; the converse fails (x3).
- Rolle: equal endpoint heights force a horizontal tangent inside; the proof uses the extreme value theorem and Fermat.
- Mean value theorem: f′(x0)=b−af(b)−f(a), via "function minus chord".
- Cauchy: f′(x0)(g(b)−g(a))=g′(x0)(f(b)−f(a)); taking g(x)=x recovers the ordinary theorem.
- First-order Taylor: f(b)=f(a)+f′(a)(b−a)+2f′′(c)(b−a)2.
- General Taylor: f(b)=Pk−1(b)+k!f(k)(c)(b−a)k, proved by applying Rolle k times.
- L'Hôpital's rule appears in the notes but was deferred in class.
Comprehension check
1. Prove Fermat's theorem from the definition of a local extremum using one-sided difference quotients, and explain why x0 must be interior.
Reference answer: Suppose x0 is a local maximum and take δ>0 from the definition. For 0<x−x0<δ the numerator f(x)−f(x0)≤0 and the denominator is positive, so the quotient is ≤0; letting x→x0+ gives f′(x0)≤0. For −δ<x−x0<0 the numerator is still ≤0 but the denominator is negative, so the quotient is ≥0; letting x→x0− gives f′(x0)≥0. Both one-sided limits equal f′(x0), hence f′(x0)=0. Interiority is needed because the argument must approach from both sides; at an endpoint only one side is available and only one inequality survives. For instance f(x)=x on [0,1] attains its maximum at x=1, yet f′(1)=1=0.
2. Give an example of a point where the derivative vanishes but there is no extremum, and explain why Rolle's theorem cannot be run backwards.
Reference answer: f(x)=x3 has f′(x)=3x2, so f′(0)=0, but f(x)<f(0) for x<0 and f(x)>f(0) for x>0; the origin is neither a maximum nor a minimum. Rolle only asserts the existence of a point with zero derivative. Its converse would claim that a zero derivative forces equal endpoint heights on some interval, which is false: around the origin of x3 choose any [a,b]; then f(a)=f(b) while f′(0)=0 still holds. The theorem gives existence, never location, and cannot be inverted.
3. How is the auxiliary function h(x)=f(x)−b−af(b)−f(a)(x−a) discovered?
Reference answer: Rolle requires equal values at the endpoints. The graph of f and the chord L(x)=f(a)+b−af(b)−f(a)(x−a) agree there: L(a)=f(a) and L(b)=f(b). Hence h=f−L satisfies h(a)=h(b)=0. Moreover h′=f′−b−af(b)−f(a), so h′=0 is exactly the conclusion. Geometrically h is the vertical distance from the graph to the chord, and the mean value theorem says that this distance has a critical point, i.e. the tangent is parallel to the chord.
4. Prove Cauchy's mean value theorem and verify that g(x)=x recovers the ordinary one.
Reference answer: Set h(x)=f(x)(g(b)−g(a))−g(x)(f(b)−f(a)). It is continuous and differentiable, with
h′(x)=f′(x)(g(b)−g(a))−g′(x)(f(b)−f(a)).
At the endpoints, h(a)=f(a)g(b)−g(a)f(b) and h(b)=f(b)g(b)−f(b)g(a)−g(b)f(b)+g(b)f(a)=f(a)g(b)−g(a)f(b), so the values agree. Rolle yields h′(x0)=0, i.e. f′(x0)(g(b)−g(a))=g′(x0)(f(b)−f(a)). With g(x)=x we get g(b)−g(a)=b−a and g′(x0)=1, leaving f′(x0)(b−a)=f(b)−f(a).
5. Why does the proof of Taylor's theorem apply Rolle repeatedly, and what is the role of M?
Reference answer: M is a constant chosen so that f(b)−Pk−1(b)−k!M(b−a)k=0, which makes the auxiliary function h(x)=f(x)−Pk−1(x)−k!M(x−a)k vanish at b. Because Pk−1 matches f in value and in all derivatives up to order k−1 at a, and because every derivative of (x−a)k of order below k vanishes at a, we get h(j)(a)=0 for j=0,…,k−1. That supplies k pairs of equal endpoints: (h(a),h(b)), (h′(a),h′(c1)), and so on. Each Rolle application raises the derivative order by one and moves the right endpoint left; the k-th gives h(k)(c)=0. Since h(k)=f(k)−M, this forces M=f(k)(c). In short, M converts the unknown remainder coefficient into a constant that satisfies the endpoint conditions Rolle needs.
Relation to neighbouring lectures
Rolle's theorem is the single engine here, producing the mean value theorem, Cauchy's theorem and Taylor's formula. The next lecture first uses Cauchy's theorem to prove L'Hôpital's rule (explicitly postponed), then applies Taylor polynomials to concrete functions and begins constructing the Riemann integral. Later, Taylor remainders become a basic tool for testing convergence of series and bounding integration errors.
Note the reuse pattern in these proofs: one local observation about extrema, wrapped in different auxiliary functions, answers apparently unrelated questions — where the average slope is attained, and how large the gap between a function and a polynomial can be. Finding an auxiliary function that turns a problem into Rolle's theorem is one of the most common techniques in real analysis.