第 18 章

Taylor 余项与 Riemann 积分:从近似到面积

先用 Cauchy 中值定理证明洛必达法则,再回看 Taylor 余项:指数函数的近似极好,而 e^{-1/x²} 说明光滑并不保证近似有效。随后用分割、上和、下和与加细引理构造 Riemann 积分,并给出可积的定义。

Taylor Remainders and Riemann Integrals: From Approximation to Area

Cauchy's mean value theorem first proves L'Hôpital's rule. Two examples then calibrate Taylor remainders: the exponential is approximated extremely well, while e^{-1/x^2} shows that smoothness does not guarantee approximation. The lecture closes by building the Riemann integral from partitions, upper and lower sums, and a refinement lemma.

首发于 2025.09.02中 / EN
系统课程real-analysistaylor-serieslhopitalriemann-integral
语言
字号
目录
篇内目录

从余项到面积

上一讲留下了两件事:Cauchy 中值定理还没有派上用场,Taylor 余项也只是一个公式。这一讲把它们都用起来:

  • 用 Cauchy 中值定理证明洛必达法则,解决 0/00/0 型极限。
  • 用两个例子说明 Taylor 余项到底能给出多好的估计:exe^x 很好,e−1/x2e^{-1/x^2} 则完全失效。
  • 换一个话题,从「矩形面积」这一唯一已知出发,用分割与上下和构造 Riemann 积分。

前半讲是估计,后半讲是构造;两者的共同点是:都要把「无穷」变成「有限但可以任意精确」。

时间轴

时间内容
0:00回顾中值定理与 Cauchy 中值定理;取 g(x)=xg(x)=x 得到中值定理
6:20洛必达法则的陈述(0/00/0 型)
10:08用 Cauchy 中值定理证明洛必达法则
18:37学生提问:为什么 g(x)−g(y)≠0g(x)-g(y)\ne0
19:59回顾 Taylor 多项式与余项
27:32例子一:exe^x 的余项估计
34:05例子二:e−1/x2e^{-1/x^2},Taylor 多项式恒为零
37:00固定误差 ε\varepsilon,能离展开点多远
40:43Riemann 积分的基本想法与唯一已知:矩形面积
44:05分割、子分割(加细)
50:06上和与下和;x2+1x^2+1 在 [−2,2][-2,2] 上的计算
1:03:44加细引理:下和上升、上和下降
1:10:29上积分与下积分的定义
1:14:34Riemann 可积的定义;连续函数可积留到下一讲

回顾:两个中值定理

中值定理:ff 在 [a,b][a,b] 上连续、在 (a,b)(a,b) 上可导,则存在 x0∈(a,b)x_0\in(a,b) 使

f′(x0)=f(b)−f(a)b−a.f'(x_0)=\frac{f(b)-f(a)}{b-a}.

Cauchy 中值定理:f,gf,g 同样连续可导,则存在 x0∈(a,b)x_0\in(a,b) 使

f′(x0)(g(b)−g(a))=g′(x0)(f(b)−f(a)).f'(x_0)\big(g(b)-g(a)\big)=g'(x_0)\big(f(b)-f(a)\big).

取 g(x)=xg(x)=x,则 g(b)−g(a)=b−ag(b)-g(a)=b-a、g′(x0)=1g'(x_0)=1,等式化为

f′(x0)(b−a)=f(b)−f(a),f'(x_0)(b-a)=f(b)-f(a),

正是普通中值定理。所以 Cauchy 版本确实更强,只是这层关系要在具体问题里才显出来。

洛必达法则

定理(0/00/0 型)。 设 f,gf,g 在 (a,b)(a,b) 上可导,且对每个 x∈(a,b)x\in(a,b),g(x)≠0g(x)\ne0、g′(x)≠0g'(x)\ne0。若

lim⁡x→af(x)=0,lim⁡x→ag(x)=0,lim⁡x→af′(x)g′(x)=L,\lim_{x\to a}f(x)=0, \qquad \lim_{x\to a}g(x)=0, \qquad \lim_{x\to a}\frac{f'(x)}{g'(x)}=L,

则

lim⁡x→af(x)g(x)=L.\lim_{x\to a}\frac{f(x)}{g(x)}=L .

注意三个前提缺一不可:分子分母都趋于零(否则不是待定型)、分母及其导数不为零(否则商与中值定理都用不了)、导数之比有极限。

证明。 固定 x∈(a,b)x\in(a,b),取 yy 满足 a<y<xa<y<x。在 [y,x][y,x] 上对 f,gf,g 用 Cauchy 中值定理:存在 x0∈(y,x)x_0\in(y,x),使

f′(x0)(g(x)−g(y))=g′(x0)(f(x)−f(y)).f'(x_0)\big(g(x)-g(y)\big)=g'(x_0)\big(f(x)-f(y)\big).

因为 g(x)≠0g(x)\ne0,而 y→ay\to a 时 g(y)→0g(y)\to0,所以只要 yy 足够接近 aa,就有 g(x)−g(y)≠0g(x)-g(y)\ne0。于是可以相除:

f′(x0)g′(x0)=f(x)−f(y)g(x)−g(y).\frac{f'(x_0)}{g'(x_0)} = \frac{f(x)-f(y)}{g(x)-g(y)} .

现在让 y→ay\to a。右边分子分母分别趋于 f(x)f(x)、g(x)g(x),所以右边趋于 f(x)/g(x)f(x)/g(x);左边 x0x_0 落在 (y,x)(y,x) 内,当 y→ay\to a 时 x0x_0 也趋于 aa。

这里要小心:x0x_0 随 yy 变化,不能直接说它就等于 aa。正确的说法是用 ε\varepsilon 语言。给定 ε>0\varepsilon>0,由 lim⁡z→af′(z)/g′(z)=L\lim_{z\to a}f'(z)/g'(z)=L,存在 δ>0\delta>0,使 ∣z−a∣<δ|z-a|<\delta 时 ∣f′(z)/g′(z)−L∣<ε|f'(z)/g'(z)-L|<\varepsilon。若固定 xx 且 x<a+δx<a+\delta,并取 yy 也满足 a<y<a+δa<y<a+\delta,则 x0∈(y,x)x_0\in(y,x) 同样落在 (a,a+δ)(a,a+\delta) 内,因此

∣f′(x0)g′(x0)−L∣<ε.\left|\frac{f'(x_0)}{g'(x_0)}-L\right|<\varepsilon .

令 y→ay\to a,上式左边趋近 ∣f(x)g(x)−L∣\left|\frac{f(x)}{g(x)}-L\right|,故

∣f(x)g(x)−L∣≤ε.\left|\frac{f(x)}{g(x)}-L\right|\le\varepsilon .

这对所有足够接近 aa 的 xx 成立,ε\varepsilon 任意,所以 lim⁡x→af(x)/g(x)=L\lim_{x\to a}f(x)/g(x)=L。□\square

第二个版本(x→∞x\to\infty 或 ∞/∞\infty/\infty)证明类似,课程没有展开。

Taylor 余项:公式回顾

设 ff 在包含 a,xa,x 的区间上 kk 次可导,Pk−1P_{k-1} 是 k−1k-1 阶 Taylor 多项式:

Pk−1(t)=∑i=0k−1f(i)(a)i!(t−a)i.P_{k-1}(t)=\sum_{i=0}^{k-1}\frac{f^{(i)}(a)}{i!}(t-a)^i .

Taylor 公式说:存在 cc 介于 aa 与 xx 之间,使

f(x)=Pk−1(x)+Rk(x),Rk(x)=f(k)(c)k!(x−a)k.f(x)=P_{k-1}(x)+R_k(x), \qquad R_k(x)=\frac{f^{(k)}(c)}{k!}(x-a)^k .

要点是:Pk−1P_{k-1} 是多项式,取值容易;误差由 RkR_k 控制。但 cc 的位置未知,只知道它在 aa 与 xx 之间——估计余项的全部工作,就是把 cc 消掉。

例子一:指数函数

取 f(x)=exf(x)=e^x,a=0a=0。因为 f(i)=exf^{(i)}=e^x,所以 f(i)(0)=1f^{(i)}(0)=1,Taylor 多项式是

Pk−1(x)=1+x+x22!+x33!+⋯+xk−1(k−1)!.P_{k-1}(x)=1+x+\frac{x^2}{2!}+\frac{x^3}{3!}+\cdots+\frac{x^{k-1}}{(k-1)!}.

余项为

Rk(x)=eck!xk,c∈(0,x) 或 (x,0).R_k(x)=\frac{e^c}{k!}x^k, \qquad c\in(0,x)\ \text{或}\ (x,0).

在 [0,1][0,1] 上,ec≤ee^c\le e、x≤1x\le1,于是

∣Rk(x)∣≤ek!.|R_k(x)|\le \frac{e}{k!}.

k=10k=10 时 e/10!≈2.7×10−6e/10!\approx2.7\times10^{-6},k=15k=15 时约 7×10−127\times10^{-12}。收敛速度来自阶乘,非常快。这就是「指数函数在 0 附近用低阶多项式就能算得很准」的定量版本。

反过来问:给定误差 ε\varepsilon 和阶数 kk,能离 0 多远? 把余项界写成

exxkk!<ε,\frac{e^{x}x^k}{k!}<\varepsilon ,

其中已经用 c≤xc\le x 消去了 cc。现在只有一个未知量 xx,可以解出(或数值求解)允许的半径。课程强调:必须把 cc 消掉,否则无法判断。

例子二:一个光滑但无法近似的函数

定义

f(x)={0,x≤0,e−1/x2,x>0.f(x)= \begin{cases} 0, & x\le0,\\[4pt] e^{-1/x^2}, & x>0 . \end{cases}

它在 00 处连续:x→0+x\to0^+ 时 −1/x2→−∞-1/x^2\to-\infty,故 e−1/x2→0e^{-1/x^2}\to0。在 x>0x>0 处由链式法则可导,x<0x<0 处恒为零。

关键事实是:ff 无限次可导,且对每个 nn,f(n)(0)=0f^{(n)}(0)=0。

验证思路:对 x>0x>0 有

f′(x)=2x3e−1/x2,f'(x)=\frac{2}{x^3}e^{-1/x^2},

继续求导,每次结果都是「1x\frac1x 的某个多项式乘以 e−1/x2e^{-1/x^2}」。设 f(n)(x)=Pn(1/x)e−1/x2f^{(n)}(x)=P_n(1/x)e^{-1/x^2},其中 PnP_n 是多项式。则

f(n+1)(0)=lim⁡h→0f(n)(h)−0h=lim⁡h→0Pn(1/h)he−1/h2=0,f^{(n+1)}(0)=\lim_{h\to0}\frac{f^{(n)}(h)-0}{h} =\lim_{h\to0}\frac{P_n(1/h)}{h}e^{-1/h^2}=0,

因为指数衰减快于任何多项式。归纳即得所有阶导数在 00 处为零。

于是 00 处的 Taylor 多项式

Pk−1(x)=∑i=0k−10i!xi=0P_{k-1}(x)=\sum_{i=0}^{k-1}\frac{0}{i!}x^i=0

对每个 kk 都恒为零。Taylor 公式只给出

f(x)=0+Rk(x),f(x)=0+R_k(x),

也就是说,余项本身就是全部的函数值,多项式没有提供任何信息。

这个例子说明:ff 在 00 处光滑到无穷阶,却不是解析的——它在 00 处的 Taylor 级数(全零)不收敛到 ff。所以「函数光滑」绝不等于「Taylor 多项式近似得好」,近似质量取决于具体的函数。

Riemann 积分:唯一已知的量

换到积分。目标是定义「曲线下方的有向面积」:横轴上方计正,下方计负。允许的函数是 [a,b][a,b] 上的有界函数。

出发点只有一个事实:矩形的面积等于底乘高。所有定义都必须从它搭出来。

分割

区间 [a,b][a,b] 的一个分割是一组有限的分点

a=x0<x1<⋯<xk=b.a=x_0<x_1<\cdots<x_k=b .

它把 [a,b][a,b] 分成 kk 个子区间 [xi−1,xi][x_{i-1},x_i],记长度

Δxi=xi−xi−1.\Delta x_i=x_i-x_{i-1}.

注意分点个数有限,这是定义的一部分;但分割本身有无穷多个。

加细

若分割 P2P_2 包含 P1P_1 的全部分点(可能还多一些),称 P2P_2 是 P1P_1 的加细(子分割)。P1P_1 自己也算法自己的加细。

上和与下和

设 ff 在 [a,b][a,b] 上有界,PP 是一个分割。在第 ii 个子区间上令

Mi=sup⁡[xi−1,xi]f,mi=inf⁡[xi−1,xi]f.M_i=\sup_{[x_{i-1},x_i]} f, \qquad m_i=\inf_{[x_{i-1},x_i]} f .

有界性保证这两个数有限。定义

U(f,P)=∑i=1kMi Δxi,L(f,P)=∑i=1kmi Δxi.U(f,P)=\sum_{i=1}^{k}M_i\,\Delta x_i, \qquad L(f,P)=\sum_{i=1}^{k}m_i\,\Delta x_i .

几何上:UU 是用「刚好盖住图像」的矩形拼出的面积,LL 是用「刚好塞在图像下方」的矩形拼出的面积。因为 mi≤Mim_i\le M_i,立得

L(f,P)≤U(f,P).L(f,P)\le U(f,P).

一个完整的计算

取 f(x)=x2+1f(x)=x^2+1,区间 [−2,2][-2,2],分割

P={−2,−1,0,1,2}.P=\{-2,-1,0,1,2\}.

每段长度都是 11。ff 在 [−2,0][-2,0] 上递减、在 [0,2][0,2] 上递增。

子区间mim_iMiM_i
[−2,−1][-2,-1]f(−1)=2f(-1)=2f(−2)=5f(-2)=5
[−1,0][-1,0]f(0)=1f(0)=1f(−1)=2f(-1)=2
[0,1][0,1]f(0)=1f(0)=1f(1)=2f(1)=2
[1,2][1,2]f(1)=2f(1)=2f(2)=5f(2)=5

于是

U(f,P)=5+2+2+5=14,L(f,P)=2+1+1+2=6.U(f,P)=5+2+2+5=14, \qquad L(f,P)=2+1+1+2=6.

差距 88 不小,因为只用四段。加细分割会让上下和靠近。

加细引理

引理。 若 P2P_2 是 P1P_1 的加细,则

L(f,P1)≤L(f,P2)≤U(f,P2)≤U(f,P1).L(f,P_1)\le L(f,P_2)\le U(f,P_2)\le U(f,P_1).

也就是说,加细只会让下和上升、上和下降。

证明(只证上和)。 逐个比较子区间。若 P2P_2 在 P1P_1 的某个子区间 [xi−1,xi][x_{i-1},x_i] 内没有增加分点,两边贡献相同。若增加了一个分点 yy,则 P2P_2 在这一段上的贡献是

sup⁡[xi−1,y]f⋅(y−xi−1)+sup⁡[y,xi]f⋅(xi−y).\sup_{[x_{i-1},y]}f\cdot(y-x_{i-1}) + \sup_{[y,x_i]}f\cdot(x_i-y).

两个子区间都包含在 [xi−1,xi][x_{i-1},x_i] 内,所以各自的 sup 都不超过 MiM_i。于是上式

≤Mi(y−xi−1)+Mi(xi−y)=Mi(xi−xi−1),\le M_i(y-x_{i-1})+M_i(x_i-y)=M_i(x_i-x_{i-1}),

正好是 P1P_1 在这一段的贡献。对每段求和即得 U(f,P2)≤U(f,P1)U(f,P_2)\le U(f,P_1)。下和的论证把 sup 换成 inf,不等号反向。□\square

引理本身只是「子区间上的 sup 更小」,但它是后面所有构造的支点。

上积分、下积分与可积性

定义。 对 [a,b][a,b] 上的有界函数 ff,

∫abf‾=inf⁡PU(f,P),∫abf‾=sup⁡PL(f,P),\overline{\int_a^b f}=\inf_{P}U(f,P), \qquad \underline{\int_a^b f}=\sup_{P}L(f,P),

分别称为上积分与下积分。下确界与上确界取自所有分割。

这里要澄清一个说法:课程说「这是越来越细的分割的极限」,但加了引号。严格的定义只有 inf 与 sup;「极限」只是直觉,因为所有分割的集合并没有一个自然的序列结构。

可积性。 若

∫abf‾=∫abf‾,\underline{\int_a^b f}=\overline{\int_a^b f},

则称 ff 在 [a,b][a,b] 上 Riemann 可积,这个公共值记作

∫abf(x) dx.\int_a^b f(x)\,dx .

定义本身没有回答「什么时候相等」。课程指出:

  • 对任意有界函数,恒有 ∫‾≤∫‾\underline{\int}\le\overline{\int}(下一讲细讲证明)。
  • 连续函数可积,这是下一讲的主要定理。
  • 连续性只是充分条件,不是必要条件;也存在不可积的有界函数(讲义中有例子,课上未展开)。

本节结论

  • Cauchy 中值定理可以证明洛必达法则,关键是固定 xx、让 y→ay\to a,并用 ε\varepsilon 控制 x0x_0 的位置。
  • exe^x 在 [0,1][0,1] 上满足 ∣Rk(x)∣≤e/k!|R_k(x)|\le e/k!,近似极好,阶乘带来快速收敛。
  • e−1/x2e^{-1/x^2} 无限可导且各阶导数在 00 处为零,Taylor 多项式恒为零,说明光滑不蕴含可近似。
  • 分割是有限分点;加细使下和上升、上和下降。
  • 上积分是所有上和的下确界,下积分是所有下和的上确界;两者相等时称 Riemann 可积。
  • x2+1x^2+1 在 [−2,2][-2,2] 上、分割 {−2,−1,0,1,2}\{-2,-1,0,1,2\} 时,U=14U=14、L=6L=6。

理解检验

1. 证明洛必达法则时,为什么必须固定 xx、让 y→ay\to a?直接对 f/gf/g 用中值定理为什么不行?

参考答案:Cauchy 中值定理说的是两个函数在一段区间 [y,x][y,x] 上的关系,需要两个不同的端点。f/gf/g 在 aa 处没有定义(分子分母都为 00),而且在 aa 点附近也未必可导,所以不能直接对它用中值定理。固定 xx 之后,g(x)≠0g(x)\ne0 是一个非零常数,区间 [y,x][y,x] 合法;让 y→ay\to a 时,f(y),g(y)f(y),g(y) 都被消去,右边趋于 f(x)/g(x)f(x)/g(x)。最后再用 x0∈(y,x)x_0\in(y,x) 说明:只要 x,yx,y 都靠近 aa,x0x_0 也靠近 aa,于是左边趋于 LL。

2. 证明 f(x)=e−1/x2f(x)=e^{-1/x^2}(x>0x>0)、f(x)=0f(x)=0(x≤0x\le0)在 00 处的各阶导数都为零,并说明为什么它的 Taylor 多项式没有用。

参考答案:对 x>0x>0 求导,f′(x)=2x3e−1/x2f'(x)=\frac{2}{x^3}e^{-1/x^2};归纳可设 f(n)(x)=Pn(1/x)e−1/x2f^{(n)}(x)=P_n(1/x)e^{-1/x^2},PnP_n 为多项式。于是

f(n+1)(0)=lim⁡h→0Pn(1/h)he−1/h2=0,f^{(n+1)}(0)=\lim_{h\to0}\frac{P_n(1/h)}{h}e^{-1/h^2}=0,

因为当 h→0+h\to0^+ 时,e−1/h2e^{-1/h^2} 的衰减快于 1/h1/h 的任何幂。归纳得所有 f(n)(0)=0f^{(n)}(0)=0。因此 00 处的 k−1k-1 阶 Taylor 多项式是 ∑0⋅xi=0\sum 0\cdot x^i=0,对每个 kk 都是零多项式。Taylor 公式退化为 f(x)=Rk(x)f(x)=R_k(x),余项承担了全部函数值,多项式没有提供任何近似信息。这说明函数可以无限光滑,却在某点不是解析的。

3. 对 f(x)=x2+1f(x)=x^2+1、区间 [−2,2][-2,2]、分割 {−2,−1,0,1,2}\{-2,-1,0,1,2\},算出上和与下和,并说明差距来自哪里。

参考答案:每段长 11。在 [−2,−1][-2,-1] 与 [−1,0][-1,0] 上 ff 递减,在 [0,1][0,1] 与 [1,2][1,2] 上递增,所以各段的 sup 与 inf 取在端点:M=(5,2,2,5)M=(5,2,2,5),m=(2,1,1,2)m=(2,1,1,2)。于是 U=14U=14,L=6L=6。差距 88 来自每段内函数的起伏:只用四段时,每段里最高点与最低点相差最多 33(如 [−2,−1][-2,-1] 上从 55 降到 22),矩形无法贴合曲线。加细分割会减小每段的起伏,从而让 UU 下降、LL 上升。

4. 证明:若 P2P_2 是 P1P_1 的加细,则 U(f,P2)≤U(f,P1)U(f,P_2)\le U(f,P_1)。

参考答案:只需逐段比较。若 P2P_2 在 [xi−1,xi][x_{i-1},x_i] 内加了分点 yy,则 P2P_2 的贡献为 sup⁡[xi−1,y]f⋅(y−xi−1)+sup⁡[y,xi]f⋅(xi−y)\sup_{[x_{i-1},y]}f\cdot(y-x_{i-1})+\sup_{[y,x_i]}f\cdot(x_i-y)。两个子区间都含于 [xi−1,xi][x_{i-1},x_i],故两个 sup 都 ≤Mi=sup⁡[xi−1,xi]f\le M_i=\sup_{[x_{i-1},x_i]}f,贡献 ≤Mi(y−xi−1)+Mi(xi−y)=Mi(xi−xi−1)\le M_i(y-x_{i-1})+M_i(x_i-y)=M_i(x_i-x_{i-1}),恰为 P1P_1 在该段的贡献。多个分点可逐个加入,重复论证。对全部子区间求和得 U(f,P2)≤U(f,P1)U(f,P_2)\le U(f,P_1)。把 sup 换成 inf、不等号反向,即得下和的部分。

5. 为什么上积分定义为「所有分割的上和的下确界」,而不定义为「分割无限加细时的极限」?什么叫做 Riemann 可积?

参考答案:所有分割构成的集合没有天然的序列结构,「无限加细」不是一个精确的说法,无法直接取极限。而下确界对任意有下界的数集都存在,定义干净且不依赖选取顺序。由加细引理,上和随加细单调不增,所以下确界正是「最细的上和」的严格版本。ff 在有界区间上 Riemann 可积,是指下积分与上积分相等;此时把公共值定义为 ∫abf\int_a^b f。可积性是一个很强的条件:它要求用矩形从上下两侧同时逼近同一个数。

与前后课的关系

本讲补上了洛必达法则,并用两个例子校准了对 Taylor 余项的预期:余项能估计,但估计好不好取决于函数本身。积分部分只完成了定义,还没有给出任何判别法。

下一讲先证明对所有有界函数都有 ∫‾≤∫‾\underline{\int}\le\overline{\int},再给出可积的判别准则(用上下和之差),并证明连续函数可积;随后用紧性得到一致连续,这是证明的关键工具。再往后,微积分基本定理会把积分与导数接起来,而 Taylor 余项与积分余项也会在此汇合。

From remainders to areas

The previous lecture left two loose ends: Cauchy's mean value theorem had not yet been used, and the Taylor remainder was only a formula. This lecture puts both to work:

  • Cauchy's theorem proves L'Hôpital's rule for limits of the form 0/00/0.
  • Two examples calibrate how good a Taylor remainder can be: excellent for exe^x, useless for e−1/x2e^{-1/x^2}.
  • The topic then changes: starting from the one known area — a rectangle — partitions and upper/lower sums construct the Riemann integral.

The first half is estimation, the second half is construction; both turn "infinitely many" into "finitely many, but arbitrarily accurate".

Timeline

TimeTopic
0:00Recap of the mean value theorem and Cauchy's version; g(x)=xg(x)=x recovers the ordinary theorem
6:20Statement of L'Hôpital's rule (0/00/0 case)
10:08Proof via Cauchy's mean value theorem
18:37Student question: why is g(x)−g(y)≠0g(x)-g(y)\ne0?
19:59Review of Taylor polynomials and the remainder
27:32Example 1: estimating the remainder for exe^x
34:05Example 2: e−1/x2e^{-1/x^2}, whose Taylor polynomial vanishes
37:00For a fixed ε\varepsilon, how far from the expansion point can one go?
40:43The idea of the Riemann integral; the only known area
44:05Partitions and refinements
50:06Upper and lower sums; computing x2+1x^2+1 on [−2,2][-2,2]
1:03:44Refinement lemma: lower sums rise, upper sums fall
1:10:29Upper and lower integrals
1:14:34Definition of Riemann integrability; continuity left for next time

Recap: two mean value theorems

Mean value theorem: if ff is continuous on [a,b][a,b] and differentiable on (a,b)(a,b), then some x0∈(a,b)x_0\in(a,b) satisfies

f′(x0)=f(b)−f(a)b−a.f'(x_0)=\frac{f(b)-f(a)}{b-a}.

Cauchy's version: if f,gf,g are likewise continuous and differentiable, then some x0∈(a,b)x_0\in(a,b) satisfies

f′(x0)(g(b)−g(a))=g′(x0)(f(b)−f(a)).f'(x_0)\big(g(b)-g(a)\big)=g'(x_0)\big(f(b)-f(a)\big).

Take g(x)=xg(x)=x. Then g(b)−g(a)=b−ag(b)-g(a)=b-a and g′(x0)=1g'(x_0)=1, so

f′(x0)(b−a)=f(b)−f(a),f'(x_0)(b-a)=f(b)-f(a),

which is the ordinary theorem. Cauchy's form is genuinely stronger; the gain only shows up in applications.

L'Hôpital's rule

Theorem (0/00/0 case). Let f,gf,g be differentiable on (a,b)(a,b), with g(x)≠0g(x)\ne0 and g′(x)≠0g'(x)\ne0 for every x∈(a,b)x\in(a,b). If

lim⁡x→af(x)=0,lim⁡x→ag(x)=0,lim⁡x→af′(x)g′(x)=L,\lim_{x\to a}f(x)=0, \qquad \lim_{x\to a}g(x)=0, \qquad \lim_{x\to a}\frac{f'(x)}{g'(x)}=L,

then

lim⁡x→af(x)g(x)=L.\lim_{x\to a}\frac{f(x)}{g(x)}=L .

All three hypotheses matter: both functions tend to zero (otherwise the quotient is not indeterminate), the denominator and its derivative never vanish (otherwise neither the quotient nor Cauchy's theorem applies), and the ratio of derivatives has a limit.

Proof. Fix x∈(a,b)x\in(a,b) and choose yy with a<y<xa<y<x. Apply Cauchy's mean value theorem to f,gf,g on [y,x][y,x]: there is x0∈(y,x)x_0\in(y,x) with

f′(x0)(g(x)−g(y))=g′(x0)(f(x)−f(y)).f'(x_0)\big(g(x)-g(y)\big)=g'(x_0)\big(f(x)-f(y)\big).

Since g(x)≠0g(x)\ne0 and g(y)→0g(y)\to0 as y→ay\to a, for yy close enough to aa we have g(x)−g(y)≠0g(x)-g(y)\ne0. Dividing,

f′(x0)g′(x0)=f(x)−f(y)g(x)−g(y).\frac{f'(x_0)}{g'(x_0)} = \frac{f(x)-f(y)}{g(x)-g(y)} .

Now let y→ay\to a. The right side tends to f(x)/g(x)f(x)/g(x), because the numerator and denominator tend to f(x)f(x) and g(x)g(x). On the left, x0x_0 lies in (y,x)(y,x), so as y→ay\to a the point x0x_0 tends to aa as well.

Care is needed here: x0x_0 depends on yy and does not simply equal aa. The rigorous route is an ε\varepsilon argument. Given ε>0\varepsilon>0, the hypothesis on f′/g′f'/g' gives δ>0\delta>0 such that ∣z−a∣<δ|z-a|<\delta implies ∣f′(z)/g′(z)−L∣<ε|f'(z)/g'(z)-L|<\varepsilon. Fix xx with x<a+δx<a+\delta and take yy with a<y<a+δa<y<a+\delta; then x0∈(y,x)x_0\in(y,x) also lies in (a,a+δ)(a,a+\delta), so

∣f′(x0)g′(x0)−L∣<ε.\left|\frac{f'(x_0)}{g'(x_0)}-L\right|<\varepsilon .

Letting y→ay\to a turns the left side into ∣f(x)g(x)−L∣\left|\frac{f(x)}{g(x)}-L\right|, hence

∣f(x)g(x)−L∣≤ε.\left|\frac{f(x)}{g(x)}-L\right|\le\varepsilon .

This holds for every xx close enough to aa, and ε\varepsilon is arbitrary, so lim⁡x→af(x)/g(x)=L\lim_{x\to a}f(x)/g(x)=L. □\square

The second version (as x→∞x\to\infty, or ∞/∞\infty/\infty) is analogous and was skipped in class.

Taylor remainders: the formula

Let ff be kk times differentiable on an interval containing aa and xx, and let Pk−1P_{k-1} be the Taylor polynomial of degree k−1k-1:

Pk−1(t)=∑i=0k−1f(i)(a)i!(t−a)i.P_{k-1}(t)=\sum_{i=0}^{k-1}\frac{f^{(i)}(a)}{i!}(t-a)^i .

Taylor's formula says that for some cc between aa and xx,

f(x)=Pk−1(x)+Rk(x),Rk(x)=f(k)(c)k!(x−a)k.f(x)=P_{k-1}(x)+R_k(x), \qquad R_k(x)=\frac{f^{(k)}(c)}{k!}(x-a)^k .

The polynomial is easy to evaluate; the error is controlled by RkR_k. But the location of cc is unknown — only that it lies between aa and xx. All work with remainders is therefore about eliminating cc.

Example 1: the exponential

Take f(x)=exf(x)=e^x and a=0a=0. Since f(i)=exf^{(i)}=e^x, we have f(i)(0)=1f^{(i)}(0)=1, so

Pk−1(x)=1+x+x22!+x33!+⋯+xk−1(k−1)!,P_{k-1}(x)=1+x+\frac{x^2}{2!}+\frac{x^3}{3!}+\cdots+\frac{x^{k-1}}{(k-1)!},

and

Rk(x)=eck!xk,c between 0 and x.R_k(x)=\frac{e^c}{k!}x^k, \qquad c\text{ between }0\text{ and }x .

On [0,1][0,1], ec≤ee^c\le e and x≤1x\le1, hence

∣Rk(x)∣≤ek!.|R_k(x)|\le \frac{e}{k!}.

For k=10k=10 this is about 2.7×10−62.7\times10^{-6}; for k=15k=15 about 7×10−127\times10^{-12}. The factorial drives the convergence, and it is very fast. This is the quantitative statement behind "the exponential is easy to compute with a low-degree polynomial near zero".

The inverse question: given an error ε\varepsilon and a degree kk, how far from 00 can one go? Bound

exxkk!<ε,\frac{e^{x}x^k}{k!}<\varepsilon ,

where c≤xc\le x has already been used to eliminate cc. One unknown remains, so the admissible radius can be solved for, numerically if necessary. The lecture stresses that eliminating cc is mandatory; otherwise nothing can be decided.

Example 2: smooth but unapproximable

Define

f(x)={0,x≤0,e−1/x2,x>0.f(x)= \begin{cases} 0, & x\le0,\\[4pt] e^{-1/x^2}, & x>0 . \end{cases}

It is continuous at 00, since −1/x2→−∞-1/x^2\to-\infty makes e−1/x2→0e^{-1/x^2}\to0 as x→0+x\to0^+. It is differentiable for x>0x>0 by the chain rule, and identically zero for x<0x<0.

The crucial fact: ff is infinitely differentiable, and f(n)(0)=0f^{(n)}(0)=0 for every nn.

Sketch: for x>0x>0,

f′(x)=2x3e−1/x2,f'(x)=\frac{2}{x^3}e^{-1/x^2},

and every further derivative has the form "a polynomial in 1/x1/x times e−1/x2e^{-1/x^2}". Write f(n)(x)=Pn(1/x)e−1/x2f^{(n)}(x)=P_n(1/x)e^{-1/x^2} with PnP_n a polynomial. Then

f(n+1)(0)=lim⁡h→0f(n)(h)−0h=lim⁡h→0Pn(1/h)he−1/h2=0,f^{(n+1)}(0)=\lim_{h\to0}\frac{f^{(n)}(h)-0}{h} =\lim_{h\to0}\frac{P_n(1/h)}{h}e^{-1/h^2}=0,

because the exponential decays faster than any power. Induction gives the claim.

Consequently the Taylor polynomial at 00 is

Pk−1(x)=∑i=0k−10i!xi=0P_{k-1}(x)=\sum_{i=0}^{k-1}\frac{0}{i!}x^i=0

for every kk. Taylor's formula degenerates to

f(x)=0+Rk(x),f(x)=0+R_k(x),

so the remainder is the entire function; the polynomial carries no information.

The lesson: ff is smooth to all orders at 00 but not analytic there — its Taylor series at 00 (identically zero) does not converge to ff. Smoothness alone never guarantees a good polynomial approximation; the quality depends on the function.

The Riemann integral: the one known quantity

The goal is to define the signed area under a curve: positive above the axis, negative below. The functions allowed are bounded on [a,b][a,b].

Only one fact is available: the area of a rectangle is base times height. Everything must be built from it.

Partitions

A partition of [a,b][a,b] is a finite set of division points

a=x0<x1<⋯<xk=b.a=x_0<x_1<\cdots<x_k=b .

It splits [a,b][a,b] into kk subintervals [xi−1,xi][x_{i-1},x_i], whose lengths are

Δxi=xi−xi−1.\Delta x_i=x_i-x_{i-1}.

Finitely many points, by definition; but there are infinitely many partitions.

Refinements

If P2P_2 contains every point of P1P_1 (possibly more), it is a refinement of P1P_1. A partition refines itself.

Upper and lower sums

Let ff be bounded on [a,b][a,b] and PP a partition. On the ii-th subinterval set

Mi=sup⁡[xi−1,xi]f,mi=inf⁡[xi−1,xi]f.M_i=\sup_{[x_{i-1},x_i]} f, \qquad m_i=\inf_{[x_{i-1},x_i]} f .

Boundedness makes both finite. Define

U(f,P)=∑i=1kMi Δxi,L(f,P)=∑i=1kmi Δxi.U(f,P)=\sum_{i=1}^{k}M_i\,\Delta x_i, \qquad L(f,P)=\sum_{i=1}^{k}m_i\,\Delta x_i .

Geometrically, UU uses rectangles that just cover the graph and LL uses rectangles that just fit beneath it. Since mi≤Mim_i\le M_i,

L(f,P)≤U(f,P).L(f,P)\le U(f,P).

A complete computation

Take f(x)=x2+1f(x)=x^2+1 on [−2,2][-2,2] with

P={−2,−1,0,1,2}.P=\{-2,-1,0,1,2\}.

Every subinterval has length 11. The function decreases on [−2,0][-2,0] and increases on [0,2][0,2].

Subintervalmim_iMiM_i
[−2,−1][-2,-1]f(−1)=2f(-1)=2f(−2)=5f(-2)=5
[−1,0][-1,0]f(0)=1f(0)=1f(−1)=2f(-1)=2
[0,1][0,1]f(0)=1f(0)=1f(1)=2f(1)=2
[1,2][1,2]f(1)=2f(1)=2f(2)=5f(2)=5

Hence

U(f,P)=5+2+2+5=14,L(f,P)=2+1+1+2=6.U(f,P)=5+2+2+5=14, \qquad L(f,P)=2+1+1+2=6.

The gap of 88 is large because only four intervals are used. Refining shrinks the gap.

The refinement lemma

Lemma. If P2P_2 refines P1P_1, then

L(f,P1)≤L(f,P2)≤U(f,P2)≤U(f,P1).L(f,P_1)\le L(f,P_2)\le U(f,P_2)\le U(f,P_1).

Refinement only raises lower sums and lowers upper sums.

Proof (upper sums). Compare interval by interval. If P2P_2 adds no point inside [xi−1,xi][x_{i-1},x_i], the contributions agree. If it adds a point yy, the contribution of P2P_2 there is

sup⁡[xi−1,y]f⋅(y−xi−1)+sup⁡[y,xi]f⋅(xi−y).\sup_{[x_{i-1},y]}f\cdot(y-x_{i-1}) + \sup_{[y,x_i]}f\cdot(x_i-y).

Both subintervals lie inside [xi−1,xi][x_{i-1},x_i], so each supremum is at most MiM_i. Therefore the expression is

≤Mi(y−xi−1)+Mi(xi−y)=Mi(xi−xi−1),\le M_i(y-x_{i-1})+M_i(x_i-y)=M_i(x_i-x_{i-1}),

exactly the contribution of P1P_1. Summing over intervals gives U(f,P2)≤U(f,P1)U(f,P_2)\le U(f,P_1). Replacing sup by inf reverses the inequalities for lower sums. □\square

The lemma is nothing but "a supremum over a smaller interval is smaller", yet everything below rests on it.

Upper and lower integrals, and integrability

Definition. For a bounded ff on [a,b][a,b],

∫abf‾=inf⁡PU(f,P),∫abf‾=sup⁡PL(f,P),\overline{\int_a^b f}=\inf_{P}U(f,P), \qquad \underline{\int_a^b f}=\sup_{P}L(f,P),

the upper and lower integrals. The infimum and supremum range over all partitions.

One clarification: the lecture describes this as "the limit over finer and finer partitions", with quotation marks. The definition is only inf and sup; the "limit" is intuition, since the collection of partitions has no natural ordering into a sequence.

Integrability. If

∫abf‾=∫abf‾,\underline{\int_a^b f}=\overline{\int_a^b f},

then ff is Riemann integrable on [a,b][a,b], and the common value is written

∫abf(x) dx.\int_a^b f(x)\,dx .

The definition does not say when equality holds. The lecture notes:

  • For every bounded function, ∫‾≤∫‾\underline{\int}\le\overline{\int} (proved next time).
  • Continuous functions are integrable, the main theorem of the next lecture.
  • Continuity is sufficient, not necessary; bounded non-integrable functions exist (an example is in the notes but was not covered).

What this lecture establishes

  • Cauchy's theorem proves L'Hôpital's rule; fix xx, let y→ay\to a, and control x0x_0 with ε\varepsilon.
  • On [0,1][0,1], exe^x satisfies ∣Rk(x)∣≤e/k!|R_k(x)|\le e/k!; the factorial gives rapid convergence.
  • e−1/x2e^{-1/x^2} is infinitely differentiable with all derivatives vanishing at 00, so its Taylor polynomial is zero — smoothness does not imply approximability.
  • A partition is a finite set of points; refinement raises lower sums and lowers upper sums.
  • The upper integral is the infimum of all upper sums, the lower integral the supremum of all lower sums; equality defines Riemann integrability.
  • For x2+1x^2+1 on [−2,2][-2,2] with {−2,−1,0,1,2}\{-2,-1,0,1,2\}, U=14U=14 and L=6L=6.

Comprehension check

1. Why fix xx and let y→ay\to a when proving L'Hôpital's rule? Why not apply the mean value theorem directly to f/gf/g?

Reference answer: Cauchy's theorem relates two functions on an interval [y,x][y,x] and needs two distinct endpoints. The quotient f/gf/g is undefined at aa (both numerator and denominator vanish) and need not be differentiable nearby, so the theorem cannot be applied to it directly. Fixing xx makes g(x)≠0g(x)\ne0 a nonzero constant and makes [y,x][y,x] a legitimate interval; letting y→ay\to a removes f(y)f(y) and g(y)g(y) and sends the right side to f(x)/g(x)f(x)/g(x). Finally, x0∈(y,x)x_0\in(y,x) shows that if both xx and yy are close to aa, then x0x_0 is close to aa, so the left side tends to LL.

2. Show that f(x)=e−1/x2f(x)=e^{-1/x^2} for x>0x>0 and f(x)=0f(x)=0 for x≤0x\le0 has all derivatives vanishing at 00, and explain why its Taylor polynomial is useless.

Reference answer: for x>0x>0, f′(x)=2x3e−1/x2f'(x)=\frac{2}{x^3}e^{-1/x^2}, and inductively f(n)(x)=Pn(1/x)e−1/x2f^{(n)}(x)=P_n(1/x)e^{-1/x^2} for some polynomial PnP_n. Hence

f(n+1)(0)=lim⁡h→0Pn(1/h)he−1/h2=0,f^{(n+1)}(0)=\lim_{h\to0}\frac{P_n(1/h)}{h}e^{-1/h^2}=0,

because as h→0+h\to0^+ the exponential decays faster than any power of 1/h1/h. By induction every f(n)(0)=0f^{(n)}(0)=0. Thus the Taylor polynomial of degree k−1k-1 at 00 is ∑0⋅xi=0\sum 0\cdot x^i=0 for every kk. Taylor's formula collapses to f(x)=Rk(x)f(x)=R_k(x): the remainder carries the whole value of the function, and the polynomial gives no approximation. So a function can be infinitely smooth at a point and still not be analytic there.

3. For f(x)=x2+1f(x)=x^2+1 on [−2,2][-2,2] with partition {−2,−1,0,1,2}\{-2,-1,0,1,2\}, compute the upper and lower sums and explain the gap.

Reference answer: each subinterval has length 11. The function decreases on [−2,−1][-2,-1] and [−1,0][-1,0] and increases on [0,1][0,1] and [1,2][1,2], so extrema occur at endpoints: M=(5,2,2,5)M=(5,2,2,5) and m=(2,1,1,2)m=(2,1,1,2). Hence U=14U=14 and L=6L=6. The gap of 88 comes from the variation inside each interval: with only four intervals, the highest and lowest values on a piece can differ by up to 33 (as on [−2,−1][-2,-1], from 55 down to 22), so rectangles cannot follow the curve. Refining reduces the variation per piece, lowering UU and raising LL.

4. Prove: if P2P_2 refines P1P_1, then U(f,P2)≤U(f,P1)U(f,P_2)\le U(f,P_1).

Reference answer: compare interval by interval. If P2P_2 inserts a point yy in [xi−1,xi][x_{i-1},x_i], its contribution there is sup⁡[xi−1,y]f⋅(y−xi−1)+sup⁡[y,xi]f⋅(xi−y)\sup_{[x_{i-1},y]}f\cdot(y-x_{i-1})+\sup_{[y,x_i]}f\cdot(x_i-y). Both subintervals lie inside [xi−1,xi][x_{i-1},x_i], so both suprema are at most Mi=sup⁡[xi−1,xi]fM_i=\sup_{[x_{i-1},x_i]}f, and the contribution is at most Mi(y−xi−1)+Mi(xi−y)=Mi(xi−xi−1)M_i(y-x_{i-1})+M_i(x_i-y)=M_i(x_i-x_{i-1}), which is exactly P1P_1's contribution on that piece. Inserting several points is handled by repeating the argument; summing over all pieces gives U(f,P2)≤U(f,P1)U(f,P_2)\le U(f,P_1). Replacing sup by inf reverses the inequality, giving the lower-sum statement.

5. Why is the upper integral defined as the infimum of upper sums over all partitions rather than as a limit under refinement? What does Riemann integrability mean?

Reference answer: the collection of partitions has no natural sequence structure, so "refine indefinitely" is not a precise operation and no limit can be taken directly. An infimum of a set bounded below always exists, so the definition is clean and order-independent. By the refinement lemma, upper sums decrease under refinement, so the infimum is the rigorous version of "the finest upper sum". A bounded ff is Riemann integrable when its lower and upper integrals coincide; the common value is then ∫abf\int_a^b f. Integrability is a strong requirement: rectangles must squeeze the same number from above and below.

Relation to neighbouring lectures

This lecture supplies L'Hôpital's rule and calibrates expectations for Taylor remainders: remainders can be estimated, but how well depends on the function. The integral section only completes the definition; no criterion for integrability has been given yet.

The next lecture first proves ∫‾≤∫‾\underline{\int}\le\overline{\int} for every bounded function, then gives an integrability criterion in terms of the gap between upper and lower sums, and proves that continuous functions are integrable; compactness and uniform continuity are the key tools. After that, the fundamental theorem of calculus links integration back to differentiation, and Taylor remainders meet integral remainders.

来源