第 16 章

导数:从差商到链式法则

用差商定义导数,证明可导蕴含连续,用三个例子区分连续与可导,并完整证明和法则、Leibniz 法则、商法则与链式法则,最后给出局部极值的必要条件。

Derivatives: From Difference Quotients to the Chain Rule

Defining the derivative through difference quotients, proving differentiability implies continuity, using three examples to separate continuity from differentiability, then proving the sum, Leibniz, quotient and chain rules in full, and closing with the necessary condition at a local extremum.

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

问题:用一个极限刻画「瞬时变化率」

前面几讲都在度量空间里讨论「点与点有多远」。这一讲离开度量空间,回到 R\mathbb R,开始做微分学。

导数的想法很朴素:想知道 ff 在 x0x_0 附近的瞬时变化率,就取 x0x_0 附近的一点 xx,算割线斜率

f(x)−f(x0)x−x0,\frac{f(x)-f(x_0)}{x-x_0},

再让 x→x0x\to x_0。这个商叫差商(difference quotient),定义时自然要求 x≠x0x\ne x_0,否则分母为零。

于是定义:若极限

lim⁡x→x0f(x)−f(x0)x−x0\lim_{x\to x_0}\frac{f(x)-f(x_0)}{x-x_0}

存在,则称 ff 在 x0x_0 可导,该极限称为 ff 在 x0x_0 的导数,记 f′(x0)f'(x_0)。

注意这是双侧极限:函数要在 x0x_0 的某个邻域内有定义,从左边和右边逼近必须得到同一个数。这解释了为什么 ∣x∣|x| 在 00 处不可导——两侧的差商分别是 −1-1 与 11。

时间轴

时间内容
0:00差商与导数的定义
2:19常数函数与恒等函数的导数
5:10四条求导法则的总览
7:02和法则(证明)
10:52Leibniz 法则的陈述
13:12可导 ⟹ 连续(证明)
21:01三个例子:$
36:54Leibniz 法则(证明)
42:58商法则(证明)
53:50用法则计算多项式与有理函数的导数
1:00:07链式法则(分情形证明)
1:16:06局部极值的必要条件(陈述)

两个最基本的导数

常数函数

若 f(x)≡Cf(x)\equiv C,则对任意 x≠x0x\ne x_0,

f(x)−f(x0)x−x0=C−Cx−x0=0.\frac{f(x)-f(x_0)}{x-x_0}=\frac{C-C}{x-x_0}=0 .

差商恒为 00,故 f′(x0)=0f'(x_0)=0 对一切 x0x_0 成立。

恒等函数

若 f(x)=xf(x)=x,则

f(x)−f(x0)x−x0=x−x0x−x0=1,\frac{f(x)-f(x_0)}{x-x_0}=\frac{x-x_0}{x-x_0}=1,

故 f′(x0)=1f'(x_0)=1 对一切 x0x_0 成立。

这两个例子是整条推导链的起点:后面的多项式、有理函数都由它们通过法则拼出来。

可导蕴含连续

定理。 若 ff 在 x0x_0 可导,则 ff 在 x0x_0 连续。

证明。 记 L=f′(x0)L=f'(x_0)。由导数定义,取 ε=1\varepsilon=1,存在 δ>0\delta>0,使得当 0<∣x−x0∣<δ0<|x-x_0|<\delta 时

∣f(x)−f(x0)x−x0−L∣<1.\left|\frac{f(x)-f(x_0)}{x-x_0}-L\right|<1 .

两边乘以 ∣x−x0∣|x-x_0|:

∣f(x)−f(x0)−L(x−x0)∣<∣x−x0∣.\left|f(x)-f(x_0)-L(x-x_0)\right|<|x-x_0| .

拆开并用三角不等式:

∣f(x)−f(x0)∣≤∣f(x)−f(x0)−L(x−x0)∣+∣L∣ ∣x−x0∣<(1+∣L∣) ∣x−x0∣.|f(x)-f(x_0)|\le\left|f(x)-f(x_0)-L(x-x_0)\right|+|L|\,|x-x_0|<(1+|L|)\,|x-x_0| .

现在任给 ε>0\varepsilon>0,令

δ1=min⁡{δ, ε1+∣L∣}>0.\delta_1=\min\left\{\delta,\ \frac{\varepsilon}{1+|L|}\right\}>0 .

则 0<∣x−x0∣<δ10<|x-x_0|<\delta_1 时,

∣f(x)−f(x0)∣<(1+∣L∣)⋅ε1+∣L∣=ε.|f(x)-f(x_0)|<(1+|L|)\cdot\frac{\varepsilon}{1+|L|}=\varepsilon .

而 x=x0x=x_0 时左边为 00,当然也小于 ε\varepsilon。所以 ff 在 x0x_0 连续。□\square

这个证明值得细看:它先把差商「近似等于导数」翻译成「函数差近似等于 L(x−x0)L(x-x_0)」,再用三角不等式把误差和线性项分开。后面证明乘积法则时还会用同样的分解。

逆命题不成立。 连续不一定可导,下面三个例子按「坏」到「好」排列。

三个例子

例一:f(x)=∣x∣f(x)=|x| 在 00 处

∣x∣|x| 处处连续。在 x0=0x_0=0 处,差商为

∣x∣−0x−0=∣x∣x={1,x>0,−1,x<0.\frac{|x|-0}{x-0}=\frac{|x|}{x}= \begin{cases} 1, & x>0,\\ -1, & x<0. \end{cases}

右极限是 11,左极限是 −1-1,二者不等,故极限不存在,ff 在 00 不可导。

这个例子说明:可导要求两侧斜率一致,尖角处不行。

例二:f(x)=xsin⁡1xf(x)=x\sin\dfrac1x 在 00 处

补充定义 f(0)=0f(0)=0,x≠0x\ne0 时 f(x)=xsin⁡(1/x)f(x)=x\sin(1/x)。

连续性。 因为 ∣sin⁡(1/x)∣≤1|\sin(1/x)|\le1,

∣f(x)−f(0)∣=∣x∣∣sin⁡1x∣≤∣x∣→0,|f(x)-f(0)|=|x|\left|\sin\frac1x\right|\le|x|\to0,

所以 ff 在 00 连续(实际上处处连续)。

不可导。 在 00 处的差商为

f(x)−f(0)x−0=xsin⁡(1/x)x=sin⁡1x.\frac{f(x)-f(0)}{x-0}=\frac{x\sin(1/x)}{x}=\sin\frac1x .

当 x→0x\to0 时,sin⁡(1/x)\sin(1/x) 在 −1-1 与 11 之间无穷次振荡,没有极限。所以 ff 在 00 不可导。

这个例子比 ∣x∣|x| 更坏:∣x∣|x| 只要把定义域限制在 x>0x>0 一侧就变得可导(右侧导数存在),而 xsin⁡(1/x)x\sin(1/x) 无论限制在左还是右都不可导——振荡发生在任意小的邻域内,与方向无关。

例三:f(x)=x2sin⁡1xf(x)=x^2\sin\dfrac1x 在 00 处

同样补充 f(0)=0f(0)=0。此时差商为

x2sin⁡(1/x)x=xsin⁡1x.\frac{x^2\sin(1/x)}{x}=x\sin\frac1x .

而 ∣xsin⁡(1/x)∣≤∣x∣→0|x\sin(1/x)|\le|x|\to0,所以差商极限为 00,即 f′(0)=0f'(0)=0。

同一个振荡被多乘一个 xx 就「压平」了。这两个例子精确地说明:连续只控制函数值的大小,可导还控制差商的振荡;乘上 xx 恰好把差商里的分母消掉,振荡幅度随 ∣x∣|x| 衰减。

和法则

定理。 若 ff、gg 在 x0x_0 可导,则 f+gf+g 在 x0x_0 可导,且

(f+g)′(x0)=f′(x0)+g′(x0).(f+g)'(x_0)=f'(x_0)+g'(x_0).

证明。 直接算差商:

(f+g)(x)−(f+g)(x0)x−x0=f(x)+g(x)−f(x0)−g(x0)x−x0.\frac{(f+g)(x)-(f+g)(x_0)}{x-x_0} = \frac{f(x)+g(x)-f(x_0)-g(x_0)}{x-x_0}.

重新分组:

=f(x)−f(x0)x−x0+g(x)−g(x0)x−x0.= \frac{f(x)-f(x_0)}{x-x_0}+\frac{g(x)-g(x_0)}{x-x_0}.

当 x→x0x\to x_0 时,两个差商分别收敛到 f′(x0)f'(x_0) 与 g′(x0)g'(x_0),由极限的加法性质,和收敛到 f′(x0)+g′(x0)f'(x_0)+g'(x_0)。□\square

这个证明几乎是定义平移,后面的法则才是真正需要技巧的。

Leibniz 法则(乘积法则)

定理。 若 ff、gg 在 x0x_0 可导,则 fgfg 在 x0x_0 可导,且

(fg)′(x0)=f′(x0)g(x0)+f(x0)g′(x0).(fg)'(x_0)=f'(x_0)g(x_0)+f(x_0)g'(x_0).

证明的关键是插入中间项再把差商拆成两部分:

f(x)g(x)−f(x0)g(x0)x−x0=f(x)g(x)−f(x0)g(x)+f(x0)g(x)−f(x0)g(x0)x−x0.\frac{f(x)g(x)-f(x_0)g(x_0)}{x-x_0} = \frac{f(x)g(x)-f(x_0)g(x)+f(x_0)g(x)-f(x_0)g(x_0)}{x-x_0}.

中间两项一减一加,值不变。拆成两个分式:

=g(x)⋅f(x)−f(x0)x−x0+f(x0)⋅g(x)−g(x0)x−x0.= g(x)\cdot\frac{f(x)-f(x_0)}{x-x_0} + f(x_0)\cdot\frac{g(x)-g(x_0)}{x-x_0}.

现在逐项看极限。由可导得 ff 在 x0x_0 连续,所以 g(x)→g(x0)g(x)\to g(x_0);第一个差商趋于 f′(x0)f'(x_0)。第二项中 f(x0)f(x_0) 是常数,差商趋于 g′(x0)g'(x_0)。因此

lim⁡x→x0f(x)g(x)−f(x0)g(x0)x−x0=g(x0)f′(x0)+f(x0)g′(x0).\lim_{x\to x_0}\frac{f(x)g(x)-f(x_0)g(x_0)}{x-x_0} = g(x_0)f'(x_0)+f(x_0)g'(x_0).

□\square

为什么必须先证「可导 ⟹ 连续」? 因为这里需要 g(x)→g(x0)g(x)\to g(x_0),而 gg 只被假设为可导。这正是前面那条定理的用处——它不是装饰,是这一行证明的前提。

同样的技巧在证明「两个收敛数列之积收敛」时已经用过:把 anbn−aba_nb_n-ab 拆成 an(bn−b)+b(an−a)a_n(b_n-b)+b(a_n-a)。两处是同一个想法。

商法则

定理。 若 ff、gg 在 x0x_0 可导,且 gg 在 x0x_0 附近处处不为零,则 f/gf/g 在 x0x_0 可导,且

(fg)′(x0)=f′(x0)g(x0)−f(x0)g′(x0)g(x0)2.\left(\frac fg\right)'(x_0)=\frac{f'(x_0)g(x_0)-f(x_0)g'(x_0)}{g(x_0)^2}.

证明。 先通分:

f(x)g(x)−f(x0)g(x0)x−x0=f(x)g(x0)−f(x0)g(x)(x−x0) g(x)g(x0).\frac{\dfrac{f(x)}{g(x)}-\dfrac{f(x_0)}{g(x_0)}}{x-x_0} = \frac{f(x)g(x_0)-f(x_0)g(x)}{(x-x_0)\,g(x)g(x_0)} .

分子同样插入中间项 f(x0)g(x0)f(x_0)g(x_0):

f(x)g(x0)−f(x0)g(x)=(f(x)g(x0)−f(x0)g(x0))+(f(x0)g(x0)−f(x0)g(x)).f(x)g(x_0)-f(x_0)g(x) = \bigl(f(x)g(x_0)-f(x_0)g(x_0)\bigr)+\bigl(f(x_0)g(x_0)-f(x_0)g(x)\bigr).

分成两项:

=1g(x)⋅f(x)−f(x0)x−x0⋅g(x0)g(x0)−f(x0)g(x)g(x0)⋅g(x)−g(x0)x−x0.=\frac{1}{g(x)}\cdot\frac{f(x)-f(x_0)}{x-x_0}\cdot\frac{g(x_0)}{g(x_0)} -\frac{f(x_0)}{g(x)g(x_0)}\cdot\frac{g(x)-g(x_0)}{x-x_0}.

具体地,第一项整理为

g(x0)g(x)g(x0)⋅f(x)−f(x0)x−x0=1g(x)⋅f(x)−f(x0)x−x0,\frac{g(x_0)}{g(x)g(x_0)}\cdot\frac{f(x)-f(x_0)}{x-x_0} =\frac{1}{g(x)}\cdot\frac{f(x)-f(x_0)}{x-x_0},

第二项整理为

f(x0)g(x)g(x0)⋅g(x)−g(x0)x−x0.\frac{f(x_0)}{g(x)g(x_0)}\cdot\frac{g(x)-g(x_0)}{x-x_0}.

令 x→x0x\to x_0。由 gg 可导因而连续,g(x)→g(x0)g(x)\to g(x_0),且 g(x0)≠0g(x_0)\ne0,于是

1g(x)→1g(x0).\frac{1}{g(x)}\to\frac{1}{g(x_0)} .

两个差商分别趋于 f′(x0)f'(x_0) 与 g′(x0)g'(x_0)。所以极限为

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

□\square

课程提了一句:可以先证 1/g1/g 的特殊情形(取 f≡1f\equiv1),再用 Leibniz 法则得到一般情形。两种做法都行,直接通分的版本一次完成,但代数更长。

用法则造出整类函数

有了四条法则,就能从两个基本导数出发,机械地算出大量函数的导数。

多项式。 由 x↦xx\mapsto x 的导数为 11,用 Leibniz 法则归纳得

(xn)′=nxn−1.(x^n)'=nx^{n-1}.

具体地,x2=x⋅xx^2=x\cdot x 给出 (x2)′=1⋅x+x⋅1=2x(x^2)'=1\cdot x+x\cdot1=2x;再乘一个 xx 继续归纳。于是对

P(x)=anxn+an−1xn−1+⋯+a1x+a0,P(x)=a_nx^n+a_{n-1}x^{n-1}+\cdots+a_1x+a_0,

和法则逐项求导:

P′(x)=nanxn−1+(n−1)an−1xn−2+⋯+a1.P'(x)=na_nx^{n-1}+(n-1)a_{n-1}x^{n-2}+\cdots+a_1 .

常数项导数为 00。

有理函数。 若 R(x)=P(x)/Q(x)R(x)=P(x)/Q(x),PP、QQ 是多项式,则在 Q(x)≠0Q(x)\ne0 处由商法则,

R′(x)=P′(x)Q(x)−P(x)Q′(x)Q(x)2.R'(x)=\frac{P'(x)Q(x)-P(x)Q'(x)}{Q(x)^2}.

于是所有多项式与有理函数在分母不为零处都可导,而且导数可以用同样的方式继续算下去。

链式法则

前面三条法则处理加、乘、除;链式法则处理复合。

设 ff 定义在区间上、gg 定义在 ff 的像所在区间上,复合为

(g∘f)(x)=g(f(x)).(g\circ f)(x)=g(f(x)).

定理。 若 ff 在 x0x_0 可导,gg 在 y0=f(x0)y_0=f(x_0) 可导,则 g∘fg\circ f 在 x0x_0 可导,且

(g∘f)′(x0)=g′(y0) f′(x0).(g\circ f)'(x_0)=g'(y_0)\,f'(x_0).

证明:先处理导数非零的情形

记 y=f(x)y=f(x)、y0=f(x0)y_0=f(x_0)。若 y≠y0y\ne y_0,可以把差商写成

g(f(x))−g(f(x0))x−x0=g(y)−g(y0)y−y0⋅f(x)−f(x0)x−x0.\frac{g(f(x))-g(f(x_0))}{x-x_0} = \frac{g(y)-g(y_0)}{y-y_0}\cdot\frac{f(x)-f(x_0)}{x-x_0}.

这是单纯的代数恒等式:分子分母同乘 y−y0y-y_0。

假设 f′(x0)≠0f'(x_0)\ne0。 此时 xx 充分接近 x0x_0(且 x≠x0x\ne x_0)时,差商 f(x)−f(x0)x−x0\dfrac{f(x)-f(x_0)}{x-x_0} 靠近 f′(x0)f'(x_0),因而不为零,于是 y≠y0y\ne y_0,上面的分解合法。

令 x→x0x\to x_0:

  • 由 ff 可导,ff 连续,故 y→y0y\to y_0;
  • 于是第一个因子 g(y)−g(y0)y−y0→g′(y0)\dfrac{g(y)-g(y_0)}{y-y_0}\to g'(y_0);
  • 第二个因子 →f′(x0)\to f'(x_0)。

乘积的极限为 g′(y0)f′(x0)g'(y_0)f'(x_0)。

剩下导数等于零的情形

若 f′(x0)=0f'(x_0)=0,分两种子情形。

  • y=y0y=y_0: 复合函数的差商分子为 g(y0)−g(y0)=0g(y_0)-g(y_0)=0,差商恒为 00,极限为 0=g′(y0)⋅00=g'(y_0)\cdot0。
  • y≠y0y\ne y_0: 仍用上面的分解。第二个因子趋于 f′(x0)=0f'(x_0)=0;第一个因子 g(y)−g(y0)y−y0\dfrac{g(y)-g(y_0)}{y-y_0} 在 y0y_0 附近有界——因为它收敛到有限数 g′(y0)g'(y_0),收敛数列必有界。有界乘趋于零,乘积趋于 00。

两种子情形都得到极限 0=g′(y0)f′(x0)0=g'(y_0)f'(x_0)。□\square

为什么不能一开始就除以 y−y0y-y_0? 因为可能出现 f(x)=f(x0)f(x)=f(x_0) 而 x≠x0x\ne x_0 的情况,此时分母为零,分解无意义。先假设 f′(x0)≠0f'(x_0)\ne0 可以排除这种可能(差商远离零意味着函数在附近严格地区分开),再单独处理 f′(x0)=0f'(x_0)=0。这是分析里常见的策略:先用一个额外假设把技术障碍挪开,最后回来补上。

局部极值的必要条件

课程最后陈述了下一个定理,证明留到下一讲。

定义。 x0x_0 是 ff 的局部极大值点,指存在 δ>0\delta>0,使得在 (x0−δ,x0+δ)(x_0-\delta,x_0+\delta) 上 f(x)≤f(x0)f(x)\le f(x_0)。局部极小值点同理,只把不等号反过来。

定理(费马引理)。 若 ff 在 x0x_0 可导且 x0x_0 是局部极大或极小值点,则 f′(x0)=0f'(x_0)=0。

直观上,极值点处的切线必须是水平的:若斜率为正,往右一点函数值更大;若斜率为负,往左一点函数值更大,都不可能是极值。

这条定理是 Rolle 定理的起点,进而推出中值定理,再推出洛必达法则与泰勒展开——这是下一讲的主线。

本节结论

  • 导数 = 差商的(双侧)极限;定义时要求 x≠x0x\ne x_0,且函数在 x0x_0 的邻域内有定义。
  • 常数导数为 00,恒等函数导数为 11。
  • 可导 ⟹ 连续;连续 ⇏ 可导。∣x∣|x|、xsin⁡(1/x)x\sin(1/x) 连续但不可导,x2sin⁡(1/x)x^2\sin(1/x) 则可导。
  • 和法则、Leibniz 法则、商法则都能用「插入中间项 + 三角不等式/极限运算」证明;Leibniz 与商法则依赖「可导 ⟹ 连续」。
  • 链式法则的证明要分 f′(x0)≠0f'(x_0)\ne0 与 f′(x0)=0f'(x_0)=0 两种情形,后者要单独处理 f(x)=f(x0)f(x)=f(x_0) 的退化情况。
  • 由这些法则,所有多项式与有理函数都可导,且导数可显式计算。
  • 局部极值点处导数为零(费马引理),这是下一讲中值定理的种子。

理解检验

1. 用定义证明 f(x)=x2f(x)=x^2 在任意点 x0x_0 可导,并求导数。

参考答案:差商为

x2−x02x−x0=(x−x0)(x+x0)x−x0=x+x0(x≠x0).\frac{x^2-x_0^2}{x-x_0}=\frac{(x-x_0)(x+x_0)}{x-x_0}=x+x_0 \qquad (x\ne x_0).

令 x→x0x\to x_0,极限为 2x02x_0。所以 f′(x0)=2x0f'(x_0)=2x_0,即 f′(x)=2xf'(x)=2x。这里用到了因式分解消去分母,这是计算多项式导数最直接的办法。

2. 证明:可导蕴含连续。(写出 δ1\delta_1 的取法)

参考答案:设 f′(x0)=Lf'(x_0)=L。取 ε=1\varepsilon=1,存在 δ>0\delta>0,使 0<∣x−x0∣<δ0<|x-x_0|<\delta 时 ∣f(x)−f(x0)x−x0−L∣<1\left|\frac{f(x)-f(x_0)}{x-x_0}-L\right|<1。乘开得 ∣f(x)−f(x0)−L(x−x0)∣<∣x−x0∣|f(x)-f(x_0)-L(x-x_0)|<|x-x_0|,于是

∣f(x)−f(x0)∣≤∣f(x)−f(x0)−L(x−x0)∣+∣L∣∣x−x0∣<(1+∣L∣)∣x−x0∣.|f(x)-f(x_0)|\le|f(x)-f(x_0)-L(x-x_0)|+|L||x-x_0|<(1+|L|)|x-x_0|.

给定 ε>0\varepsilon>0,取 δ1=min⁡{δ,ε/(1+∣L∣)}\delta_1=\min\{\delta,\varepsilon/(1+|L|)\},则 0<∣x−x0∣<δ10<|x-x_0|<\delta_1 时 ∣f(x)−f(x0)∣<ε|f(x)-f(x_0)|<\varepsilon;x=x0x=x_0 时左边为 00。故连续。

3. 为什么 ∣x∣|x| 在 00 处不可导,而 x2sin⁡(1/x)x^2\sin(1/x) 在 00 处可导?

参考答案:两者的差别在差商。∣x∣|x| 的差商是 sgn⁡(x)\operatorname{sgn}(x),右极限为 11、左极限为 −1-1,双侧极限不存在。x2sin⁡(1/x)x^2\sin(1/x) 的差商是 xsin⁡(1/x)x\sin(1/x),虽然 sin⁡(1/x)\sin(1/x) 在 −1-1 与 11 之间振荡,但被因子 xx 压住,∣xsin⁡(1/x)∣≤∣x∣→0|x\sin(1/x)|\le|x|\to0,极限存在且为 00。前者是尖角导致的单侧斜率不同;后者是振荡被振幅衰减压平。

4. 证明 Leibniz 法则,并指出哪一步用到了连续性。

参考答案:差商写成

f(x)g(x)−f(x0)g(x0)x−x0=g(x)f(x)−f(x0)x−x0+f(x0)g(x)−g(x0)x−x0,\frac{f(x)g(x)-f(x_0)g(x_0)}{x-x_0} = g(x)\frac{f(x)-f(x_0)}{x-x_0}+f(x_0)\frac{g(x)-g(x_0)}{x-x_0},

中间通过 − f(x0)g(x)+f(x0)g(x)-\,f(x_0)g(x)+f(x_0)g(x) 插入。令 x→x0x\to x_0,第一个差商趋于 f′(x0)f'(x_0),第二个趋于 g′(x0)g'(x_0)。用连续性的一步是把 g(x)g(x) 的极限换成 g(x0)g(x_0)——gg 只被假设可导,所以必须先有「可导 ⟹ 连续」。没有这一步,g(x)g(x) 的极限无从谈起。

5. 用商法则求 f(x)=1/xf(x)=1/x 的导数,并说明定义域限制。

参考答案:取分子为常数 11,分母为 xx。由商法则,

f′(x)=0⋅x−1⋅1x2=−1x2,x≠0.f'(x)=\frac{0\cdot x-1\cdot1}{x^2}=-\frac{1}{x^2},\qquad x\ne0 .

商法则要求分母在讨论点附近不为零,所以结论只在 x≠0x\ne0 处成立。这也说明 1/x1/x 在 00 处不可导——它在那里根本没有定义。

6. 链式法则的证明中,为什么不能直接对 g(f(x))−g(f(x0))x−x0\dfrac{g(f(x))-g(f(x_0))}{x-x_0} 使用「乘积的极限等于极限的乘积」?

参考答案:要把它写成乘积,必须乘以并除以 f(x)−f(x0)f(x)-f(x_0),而当 f(x)=f(x0)f(x)=f(x_0) 时这个因子为零,除法不合法。链式法则的证明因此要分情形:先假设 f′(x0)≠0f'(x_0)\ne0,此时 xx 接近 x0x_0 时差商远离零,保证 f(x)≠f(x0)f(x)\ne f(x_0),除法合法;再处理 f′(x0)=0f'(x_0)=0,其中 f(x)=f(x0)f(x)=f(x_0) 的项差商为零,f(x)≠f(x0)f(x)\ne f(x_0) 的项因第一个因子有界、第二个趋于零而乘积趋于零。

7. 举出一个函数,它在某点可导但导数不连续。

参考答案:取

f(x)={x2sin⁡1x,x≠0,0,x=0.f(x)= \begin{cases} x^2\sin\dfrac1x, & x\ne0,\\ 0, & x=0. \end{cases}

它在 00 处可导,f′(0)=0f'(0)=0(差商为 xsin⁡(1/x)→0x\sin(1/x)\to0)。但对 x≠0x\ne0,

f′(x)=2xsin⁡1x−cos⁡1x,f'(x)=2x\sin\frac1x-\cos\frac1x,

当 x→0x\to0 时 cos⁡(1/x)\cos(1/x) 不收敛,所以 f′f' 在 00 处不连续。这说明「可导」并不蕴含「导数连续」;导数连续是可导性的进一步加强。

与前后课的关系

本讲建立了导数的定义与四条运算法则,把「可导」从一个极限条件变成了可操作的代数工具。下一讲从费马引理出发,依次证明 Rolle 定理、中值定理、洛必达法则与泰勒展开;再往后进入积分,本讲的导数法则会成为微积分基本定理的另一半。课程的逻辑始终一致:先给出严格定义,再证一条看似平凡的引理,然后用它撬动整条定理链。

The problem: capturing instantaneous rate of change with a limit

The previous lectures lived in metric spaces and measured how far apart points are. This lecture leaves metric spaces, returns to R\mathbb R, and begins differential calculus.

The idea of a derivative is plain: to capture the instantaneous rate of change of ff near x0x_0, take a nearby point xx and compute the secant slope

f(x)−f(x0)x−x0,\frac{f(x)-f(x_0)}{x-x_0},

then let x→x0x\to x_0. This quotient is the difference quotient; defining it requires x≠x0x\ne x_0, otherwise the denominator vanishes.

Definition. If the limit

lim⁡x→x0f(x)−f(x0)x−x0\lim_{x\to x_0}\frac{f(x)-f(x_0)}{x-x_0}

exists, then ff is differentiable at x0x_0, and the limit is the derivative f′(x0)f'(x_0).

This is a two-sided limit: ff must be defined in a neighbourhood of x0x_0, and approaching from the left and from the right must give the same number. That is exactly why ∣x∣|x| is not differentiable at 00 — the two one-sided difference quotients are −1-1 and 11.

Timeline

TimeTopic
0:00Difference quotients and the definition of the derivative
2:19Derivatives of constant and identity functions
5:10Overview of the four differentiation rules
7:02Sum rule (proof)
10:52Statement of the Leibniz rule
13:12Differentiable implies continuous (proof)
21:01Three examples: $
36:54Leibniz rule (proof)
42:58Quotient rule (proof)
53:50Using the rules on polynomials and rational functions
1:00:07Chain rule (proof by cases)
1:16:06Necessary condition at a local extremum (stated)

The two basic derivatives

Constant functions

If f(x)≡Cf(x)\equiv C, then for any x≠x0x\ne x_0,

f(x)−f(x0)x−x0=C−Cx−x0=0.\frac{f(x)-f(x_0)}{x-x_0}=\frac{C-C}{x-x_0}=0 .

The difference quotient is identically 00, so f′(x0)=0f'(x_0)=0 for every x0x_0.

The identity function

If f(x)=xf(x)=x, then

f(x)−f(x0)x−x0=x−x0x−x0=1,\frac{f(x)-f(x_0)}{x-x_0}=\frac{x-x_0}{x-x_0}=1,

so f′(x0)=1f'(x_0)=1 for every x0x_0.

These two examples are the seeds of the whole chain: every polynomial and rational function is assembled from them using the rules.

Differentiable implies continuous

Theorem. If ff is differentiable at x0x_0, then ff is continuous at x0x_0.

Proof. Write L=f′(x0)L=f'(x_0). By the definition of the derivative, taking ε=1\varepsilon=1 gives δ>0\delta>0 such that 0<∣x−x0∣<δ0<|x-x_0|<\delta implies

∣f(x)−f(x0)x−x0−L∣<1.\left|\frac{f(x)-f(x_0)}{x-x_0}-L\right|<1 .

Multiply both sides by ∣x−x0∣|x-x_0|:

∣f(x)−f(x0)−L(x−x0)∣<∣x−x0∣.\left|f(x)-f(x_0)-L(x-x_0)\right|<|x-x_0| .

Split the left side and apply the triangle inequality:

∣f(x)−f(x0)∣≤∣f(x)−f(x0)−L(x−x0)∣+∣L∣ ∣x−x0∣<(1+∣L∣) ∣x−x0∣.|f(x)-f(x_0)|\le\left|f(x)-f(x_0)-L(x-x_0)\right|+|L|\,|x-x_0|<(1+|L|)\,|x-x_0| .

Now given ε>0\varepsilon>0, set

δ1=min⁡{δ, ε1+∣L∣}>0.\delta_1=\min\left\{\delta,\ \frac{\varepsilon}{1+|L|}\right\}>0 .

For 0<∣x−x0∣<δ10<|x-x_0|<\delta_1,

∣f(x)−f(x0)∣<(1+∣L∣)⋅ε1+∣L∣=ε.|f(x)-f(x_0)|<(1+|L|)\cdot\frac{\varepsilon}{1+|L|}=\varepsilon .

At x=x0x=x_0 the left side is 0<ε0<\varepsilon anyway. Hence ff is continuous at x0x_0. □\square

The proof is worth reading closely: it first translates "the difference quotient is close to the derivative" into "the function difference is close to L(x−x0)L(x-x_0)", then separates the error from the linear term with the triangle inequality. The same decomposition reappears in the product rule.

The converse fails. Continuity does not imply differentiability; the three examples below go from bad to good.

Three examples

Example 1: f(x)=∣x∣f(x)=|x| at 00

∣x∣|x| is continuous everywhere. At x0=0x_0=0 the difference quotient is

∣x∣−0x−0=∣x∣x={1,x>0,−1,x<0.\frac{|x|-0}{x-0}=\frac{|x|}{x}= \begin{cases} 1, & x>0,\\ -1, & x<0. \end{cases}

The right limit is 11, the left limit is −1-1; they differ, so the limit does not exist and ff is not differentiable at 00.

The lesson: differentiability requires the two sides to agree on a slope; a corner does not qualify.

Example 2: f(x)=xsin⁡1xf(x)=x\sin\dfrac1x at 00

Set f(0)=0f(0)=0 and f(x)=xsin⁡(1/x)f(x)=x\sin(1/x) for x≠0x\ne0.

Continuity. Since ∣sin⁡(1/x)∣≤1|\sin(1/x)|\le1,

∣f(x)−f(0)∣=∣x∣∣sin⁡1x∣≤∣x∣→0,|f(x)-f(0)|=|x|\left|\sin\frac1x\right|\le|x|\to0,

so ff is continuous at 00 (in fact everywhere).

Non-differentiability. The difference quotient at 00 is

f(x)−f(0)x−0=xsin⁡(1/x)x=sin⁡1x.\frac{f(x)-f(0)}{x-0}=\frac{x\sin(1/x)}{x}=\sin\frac1x .

As x→0x\to0, sin⁡(1/x)\sin(1/x) oscillates infinitely often between −1-1 and 11 and has no limit. So ff is not differentiable at 00.

This example is worse than ∣x∣|x|: restricting ∣x∣|x| to x>0x>0 makes it differentiable from the right, whereas xsin⁡(1/x)x\sin(1/x) fails from either side — the oscillation happens in every neighbourhood, in every direction.

Example 3: f(x)=x2sin⁡1xf(x)=x^2\sin\dfrac1x at 00

Again set f(0)=0f(0)=0. The difference quotient is now

x2sin⁡(1/x)x=xsin⁡1x.\frac{x^2\sin(1/x)}{x}=x\sin\frac1x .

Since ∣xsin⁡(1/x)∣≤∣x∣→0|x\sin(1/x)|\le|x|\to0, the difference quotient has limit 00, so f′(0)=0f'(0)=0.

The same oscillation is flattened by one extra factor of xx. Together the two examples pin down the distinction: continuity controls the size of function values, differentiability also controls the oscillation of the difference quotient; multiplying by xx cancels the denominator and damps the amplitude.

The sum rule

Theorem. If ff and gg are differentiable at x0x_0, then so is f+gf+g, and

(f+g)′(x0)=f′(x0)+g′(x0).(f+g)'(x_0)=f'(x_0)+g'(x_0).

Proof. Compute the difference quotient directly:

(f+g)(x)−(f+g)(x0)x−x0=f(x)+g(x)−f(x0)−g(x0)x−x0.\frac{(f+g)(x)-(f+g)(x_0)}{x-x_0} = \frac{f(x)+g(x)-f(x_0)-g(x_0)}{x-x_0}.

Regroup:

=f(x)−f(x0)x−x0+g(x)−g(x0)x−x0.= \frac{f(x)-f(x_0)}{x-x_0}+\frac{g(x)-g(x_0)}{x-x_0}.

As x→x0x\to x_0 the two quotients converge to f′(x0)f'(x_0) and g′(x0)g'(x_0); the sum rule for limits gives the sum. □\square

This proof is almost a restatement of the definition; the later rules need actual technique.

The Leibniz (product) rule

Theorem. If ff and gg are differentiable at x0x_0, then so is fgfg, and

(fg)′(x0)=f′(x0)g(x0)+f(x0)g′(x0).(fg)'(x_0)=f'(x_0)g(x_0)+f(x_0)g'(x_0).

The key move is to insert a cross term and split the difference quotient into two parts:

f(x)g(x)−f(x0)g(x0)x−x0=f(x)g(x)−f(x0)g(x)+f(x0)g(x)−f(x0)g(x0)x−x0.\frac{f(x)g(x)-f(x_0)g(x_0)}{x-x_0} = \frac{f(x)g(x)-f(x_0)g(x)+f(x_0)g(x)-f(x_0)g(x_0)}{x-x_0}.

The inserted terms cancel exactly. Split into two fractions:

=g(x)⋅f(x)−f(x0)x−x0+f(x0)⋅g(x)−g(x0)x−x0.= g(x)\cdot\frac{f(x)-f(x_0)}{x-x_0} + f(x_0)\cdot\frac{g(x)-g(x_0)}{x-x_0}.

Now take limits term by term. Differentiability gives continuity of ff at x0x_0, so g(x)→g(x0)g(x)\to g(x_0); the first quotient tends to f′(x0)f'(x_0). In the second term f(x0)f(x_0) is constant and the quotient tends to g′(x0)g'(x_0). Therefore

lim⁡x→x0f(x)g(x)−f(x0)g(x0)x−x0=g(x0)f′(x0)+f(x0)g′(x0).\lim_{x\to x_0}\frac{f(x)g(x)-f(x_0)g(x_0)}{x-x_0} = g(x_0)f'(x_0)+f(x_0)g'(x_0).

□\square

Why was "differentiable implies continuous" needed first? Because the proof requires g(x)→g(x0)g(x)\to g(x_0), while gg is only assumed differentiable. That is exactly where the earlier theorem earns its place — it is not decoration, it is a hypothesis of this line.

The same trick appeared when proving that the product of two convergent sequences converges: write anbn−ab=an(bn−b)+b(an−a)a_nb_n-ab=a_n(b_n-b)+b(a_n-a). Same idea, different setting.

The quotient rule

Theorem. If ff and gg are differentiable at x0x_0 and gg is nonzero near x0x_0, then f/gf/g is differentiable at x0x_0 and

(fg)′(x0)=f′(x0)g(x0)−f(x0)g′(x0)g(x0)2.\left(\frac fg\right)'(x_0)=\frac{f'(x_0)g(x_0)-f(x_0)g'(x_0)}{g(x_0)^2}.

Proof. Put the difference quotient over a common denominator:

f(x)g(x)−f(x0)g(x0)x−x0=f(x)g(x0)−f(x0)g(x)(x−x0) g(x)g(x0).\frac{\dfrac{f(x)}{g(x)}-\dfrac{f(x_0)}{g(x_0)}}{x-x_0} = \frac{f(x)g(x_0)-f(x_0)g(x)}{(x-x_0)\,g(x)g(x_0)} .

Insert the cross term f(x0)g(x0)f(x_0)g(x_0) in the numerator:

f(x)g(x0)−f(x0)g(x)=g(x0)(f(x)−f(x0))−f(x0)(g(x)−g(x0)).f(x)g(x_0)-f(x_0)g(x) = g(x_0)\bigl(f(x)-f(x_0)\bigr)-f(x_0)\bigl(g(x)-g(x_0)\bigr).

Divide term by term:

=1g(x)⋅f(x)−f(x0)x−x0−f(x0)g(x)g(x0)⋅g(x)−g(x0)x−x0.= \frac{1}{g(x)}\cdot\frac{f(x)-f(x_0)}{x-x_0} -\frac{f(x_0)}{g(x)g(x_0)}\cdot\frac{g(x)-g(x_0)}{x-x_0}.

Let x→x0x\to x_0. Since gg is differentiable hence continuous, g(x)→g(x0)≠0g(x)\to g(x_0)\ne0, so 1/g(x)→1/g(x0)1/g(x)\to1/g(x_0). The two difference quotients tend to f′(x0)f'(x_0) and g′(x0)g'(x_0). Hence

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

□\square

The lecturer notes an alternative: prove the special case 1/g1/g first (take f≡1f\equiv1), then apply Leibniz to f⋅(1/g)f\cdot(1/g). Both work; the direct common-denominator version finishes in one pass but has longer algebra.

Building whole classes of functions

With four rules, enormous families of derivatives follow mechanically from two basic ones.

Polynomials. Since x↦xx\mapsto x has derivative 11, induction with Leibniz gives

(xn)′=nxn−1.(x^n)'=nx^{n-1}.

Concretely, x2=x⋅xx^2=x\cdot x gives (x2)′=1⋅x+x⋅1=2x(x^2)'=1\cdot x+x\cdot1=2x; multiply by another xx and repeat. Hence for

P(x)=anxn+an−1xn−1+⋯+a1x+a0,P(x)=a_nx^n+a_{n-1}x^{n-1}+\cdots+a_1x+a_0,

the sum rule differentiates term by term:

P′(x)=nanxn−1+(n−1)an−1xn−2+⋯+a1.P'(x)=na_nx^{n-1}+(n-1)a_{n-1}x^{n-2}+\cdots+a_1 .

The constant term contributes 00.

Rational functions. If R(x)=P(x)/Q(x)R(x)=P(x)/Q(x) with P,QP,Q polynomials, the quotient rule gives, wherever Q(x)≠0Q(x)\ne0,

R′(x)=P′(x)Q(x)−P(x)Q′(x)Q(x)2.R'(x)=\frac{P'(x)Q(x)-P(x)Q'(x)}{Q(x)^2}.

So every polynomial and every rational function is differentiable wherever its denominator does not vanish, and the derivative can be computed explicitly.

The chain rule

The first three rules handle sums, products and quotients; the chain rule handles composition.

Let ff be defined on an interval and gg on an interval containing the image of ff, with composition

(g∘f)(x)=g(f(x)).(g\circ f)(x)=g(f(x)).

Theorem. If ff is differentiable at x0x_0 and gg is differentiable at y0=f(x0)y_0=f(x_0), then g∘fg\circ f is differentiable at x0x_0 and

(g∘f)′(x0)=g′(y0) f′(x0).(g\circ f)'(x_0)=g'(y_0)\,f'(x_0).

Proof: first the case of nonzero derivative

Write y=f(x)y=f(x) and y0=f(x0)y_0=f(x_0). When y≠y0y\ne y_0, the difference quotient factors as

g(f(x))−g(f(x0))x−x0=g(y)−g(y0)y−y0⋅f(x)−f(x0)x−x0.\frac{g(f(x))-g(f(x_0))}{x-x_0} = \frac{g(y)-g(y_0)}{y-y_0}\cdot\frac{f(x)-f(x_0)}{x-x_0}.

This is pure algebra: multiply and divide by y−y0y-y_0.

Assume f′(x0)≠0f'(x_0)\ne0. Then for xx sufficiently close to x0x_0 with x≠x0x\ne x_0, the quotient f(x)−f(x0)x−x0\dfrac{f(x)-f(x_0)}{x-x_0} stays close to the nonzero number f′(x0)f'(x_0), hence is nonzero, so y≠y0y\ne y_0 and the factorisation is legitimate.

Let x→x0x\to x_0:

  • ff differentiable implies ff continuous, so y→y0y\to y_0;
  • hence the first factor g(y)−g(y0)y−y0→g′(y0)\dfrac{g(y)-g(y_0)}{y-y_0}\to g'(y_0);
  • the second factor →f′(x0)\to f'(x_0).

The product tends to g′(y0)f′(x0)g'(y_0)f'(x_0).

The remaining case: zero derivative

If f′(x0)=0f'(x_0)=0, split into two subcases.

  • y=y0y=y_0: the numerator of the composite difference quotient is g(y0)−g(y0)=0g(y_0)-g(y_0)=0, so the quotient is identically 00 and the limit is 0=g′(y0)⋅00=g'(y_0)\cdot0.
  • y≠y0y\ne y_0: use the factorisation above. The second factor tends to f′(x0)=0f'(x_0)=0; the first factor g(y)−g(y0)y−y0\dfrac{g(y)-g(y_0)}{y-y_0} is bounded near y0y_0 — it converges to the finite number g′(y0)g'(y_0), and a convergent sequence is bounded. A bounded quantity times one tending to zero tends to 00.

Both subcases give the limit 0=g′(y0)f′(x0)0=g'(y_0)f'(x_0). □\square

Why not divide by y−y0y-y_0 from the start? Because it can happen that f(x)=f(x0)f(x)=f(x_0) with x≠x0x\ne x_0, making the denominator zero and the factorisation meaningless. Assuming f′(x0)≠0f'(x_0)\ne0 rules this out (a quotient staying away from zero forces ff to separate nearby points), and the zero-derivative case is handled separately. This is a standard analytic strategy: push the technical obstruction aside with an extra hypothesis, then return and patch it.

The necessary condition at a local extremum

The lecture closes by stating the next theorem; the proof comes next time.

Definition. x0x_0 is a local maximum of ff if there is δ>0\delta>0 such that f(x)≤f(x0)f(x)\le f(x_0) for all x∈(x0−δ,x0+δ)x\in(x_0-\delta,x_0+\delta). A local minimum is the same with the inequality reversed.

Theorem (Fermat). If ff is differentiable at x0x_0 and x0x_0 is a local maximum or minimum, then f′(x0)=0f'(x_0)=0.

Intuitively the tangent at an extremum must be horizontal: a positive slope would mean larger values just to the right, a negative slope larger values just to the left, so neither can be an extremum.

This theorem is the seed of Rolle's theorem, hence of the mean value theorem, hence of L'Hôpital's rule and Taylor expansion — the main line of the next lecture.

What this lecture establishes

  • The derivative is the (two-sided) limit of the difference quotient; x≠x0x\ne x_0 and a neighbourhood of x0x_0 are required.
  • The derivative of a constant is 00; the derivative of the identity is 11.
  • Differentiable implies continuous; continuous does not imply differentiable. ∣x∣|x| and xsin⁡(1/x)x\sin(1/x) are continuous but not differentiable; x2sin⁡(1/x)x^2\sin(1/x) is differentiable.
  • The sum, Leibniz and quotient rules are proved by inserting cross terms and using limit algebra; Leibniz and the quotient rule rely on "differentiable implies continuous".
  • The chain rule splits into f′(x0)≠0f'(x_0)\ne0 and f′(x0)=0f'(x_0)=0; the latter needs separate treatment of f(x)=f(x0)f(x)=f(x_0).
  • From these rules every polynomial and rational function is differentiable, with an explicit derivative.
  • At a local extremum the derivative vanishes (Fermat's lemma), the seed of the mean value theorem.

Comprehension check

1. Use the definition to prove that f(x)=x2f(x)=x^2 is differentiable at every x0x_0, and find the derivative.

Reference answer: The difference quotient is

x2−x02x−x0=(x−x0)(x+x0)x−x0=x+x0(x≠x0).\frac{x^2-x_0^2}{x-x_0}=\frac{(x-x_0)(x+x_0)}{x-x_0}=x+x_0 \qquad (x\ne x_0).

Letting x→x0x\to x_0 gives 2x02x_0. So f′(x0)=2x0f'(x_0)=2x_0, i.e. f′(x)=2xf'(x)=2x. The factorisation cancels the denominator, the most direct way to differentiate a polynomial.

2. Prove that differentiability implies continuity (show how δ1\delta_1 is chosen).

Reference answer: Let f′(x0)=Lf'(x_0)=L. With ε=1\varepsilon=1 there is δ>0\delta>0 such that 0<∣x−x0∣<δ0<|x-x_0|<\delta implies ∣f(x)−f(x0)x−x0−L∣<1\left|\frac{f(x)-f(x_0)}{x-x_0}-L\right|<1. Multiplying out gives ∣f(x)−f(x0)−L(x−x0)∣<∣x−x0∣|f(x)-f(x_0)-L(x-x_0)|<|x-x_0|, so

∣f(x)−f(x0)∣≤∣f(x)−f(x0)−L(x−x0)∣+∣L∣∣x−x0∣<(1+∣L∣)∣x−x0∣.|f(x)-f(x_0)|\le|f(x)-f(x_0)-L(x-x_0)|+|L||x-x_0|<(1+|L|)|x-x_0|.

Given ε>0\varepsilon>0, take δ1=min⁡{δ,ε/(1+∣L∣)}\delta_1=\min\{\delta,\varepsilon/(1+|L|)\}; then 0<∣x−x0∣<δ10<|x-x_0|<\delta_1 gives ∣f(x)−f(x0)∣<ε|f(x)-f(x_0)|<\varepsilon, and at x=x0x=x_0 the left side is 00. Hence ff is continuous.

3. Why is ∣x∣|x| not differentiable at 00, while x2sin⁡(1/x)x^2\sin(1/x) is?

Reference answer: The difference is in the quotient. For ∣x∣|x| the quotient is sgn⁡(x)\operatorname{sgn}(x), with right limit 11 and left limit −1-1, so the two-sided limit fails. For x2sin⁡(1/x)x^2\sin(1/x) the quotient is xsin⁡(1/x)x\sin(1/x); although sin⁡(1/x)\sin(1/x) oscillates between −1-1 and 11, the factor xx damps it, ∣xsin⁡(1/x)∣≤∣x∣→0|x\sin(1/x)|\le|x|\to0, and the limit exists and equals 00. The first fails because a corner gives different one-sided slopes; the second is flattened because the amplitude decays.

4. Prove the Leibniz rule and identify where continuity is used.

Reference answer: Write the quotient as

f(x)g(x)−f(x0)g(x0)x−x0=g(x)f(x)−f(x0)x−x0+f(x0)g(x)−g(x0)x−x0,\frac{f(x)g(x)-f(x_0)g(x_0)}{x-x_0} = g(x)\frac{f(x)-f(x_0)}{x-x_0}+f(x_0)\frac{g(x)-g(x_0)}{x-x_0},

inserting − f(x0)g(x)+f(x0)g(x)-\,f(x_0)g(x)+f(x_0)g(x) in the middle. As x→x0x\to x_0 the first quotient tends to f′(x0)f'(x_0) and the second to g′(x0)g'(x_0). Continuity is used to replace the limit of g(x)g(x) by g(x0)g(x_0); since gg is only assumed differentiable, "differentiable implies continuous" must come first. Without it the limit of g(x)g(x) is not available.

5. Use the quotient rule to differentiate f(x)=1/xf(x)=1/x and state the domain restriction.

Reference answer: Take numerator 11 and denominator xx. The quotient rule gives

f′(x)=0⋅x−1⋅1x2=−1x2,x≠0.f'(x)=\frac{0\cdot x-1\cdot1}{x^2}=-\frac{1}{x^2},\qquad x\ne0 .

The quotient rule requires the denominator to be nonzero near the point, so the conclusion holds only for x≠0x\ne0. It also shows 1/x1/x is not differentiable at 00 — it is not even defined there.

6. In the chain rule proof, why can the limit of a product not be applied directly to g(f(x))−g(f(x0))x−x0\dfrac{g(f(x))-g(f(x_0))}{x-x_0}?

Reference answer: To write it as a product one must multiply and divide by f(x)−f(x0)f(x)-f(x_0), but when f(x)=f(x0)f(x)=f(x_0) this factor is zero and the division is illegal. The proof therefore splits into cases: first assume f′(x0)≠0f'(x_0)\ne0, which keeps the difference quotient away from zero and guarantees f(x)≠f(x0)f(x)\ne f(x_0) near x0x_0, making the division legitimate; then handle f′(x0)=0f'(x_0)=0, where terms with f(x)=f(x0)f(x)=f(x_0) give a zero quotient and terms with f(x)≠f(x0)f(x)\ne f(x_0) have one bounded factor times one tending to zero.

7. Give a function that is differentiable at a point but whose derivative is discontinuous there.

Reference answer: Take

f(x)={x2sin⁡1x,x≠0,0,x=0.f(x)= \begin{cases} x^2\sin\dfrac1x, & x\ne0,\\ 0, & x=0. \end{cases}

It is differentiable at 00 with f′(0)=0f'(0)=0 (the quotient is xsin⁡(1/x)→0x\sin(1/x)\to0). But for x≠0x\ne0,

f′(x)=2xsin⁡1x−cos⁡1x,f'(x)=2x\sin\frac1x-\cos\frac1x,

and cos⁡(1/x)\cos(1/x) does not converge as x→0x\to0, so f′f' is discontinuous at 00. Thus differentiability does not imply continuity of the derivative; that is a genuinely stronger condition.

Relation to neighbouring lectures

This lecture establishes the definition of the derivative and four rules, turning "differentiable" from a limit condition into a workable algebraic tool. The next lecture starts from Fermat's lemma and proves Rolle's theorem, the mean value theorem, L'Hôpital's rule and Taylor expansion. Later, integration arrives, and the differentiation rules become one half of the fundamental theorem of calculus. The logic of the course never changes: give a rigorous definition, prove a lemma that looks routine, then use it to lever a whole chain of theorems.

来源