If you're seeing this message, it means we're having trouble loading external resources on our website.

如果你被网页过滤器挡住,请确保域名*.kastatic.org*.kasandbox.org 没有被阻止.

主要内容

多变量链式法则, 简单版本

导数的链规则可以扩展到更高的维度. 在这里我们看到了在相对简单的情况下, 复合函数是一个单变量函数的样子。

我们要做什么

  • 已知一个多变量函数 f, left parenthesis, x, comma, y, right parenthesis, 和两个单变量函数 x, left parenthesis, t, right parenthesisy, left parenthesis, t, right parenthesis, 则多变量链式法则是:
start underbrace, start fraction, d, divided by, d, t, end fraction, f, left parenthesis, start color #11accd, x, end color #11accd, left parenthesis, t, right parenthesis, comma, start color #bc2612, y, end color #bc2612, left parenthesis, t, right parenthesis, right parenthesis, end underbrace, start subscript, start text, 复, 合, 函, 数, 的, 导, 数, end text, end subscript, equals, start fraction, \partial, f, divided by, \partial, start color #11accd, x, end color #11accd, end fraction, start fraction, d, start color #11accd, x, end color #11accd, divided by, d, t, end fraction, plus, start fraction, \partial, f, divided by, \partial, start color #bc2612, y, end color #bc2612, end fraction, start fraction, d, start color #bc2612, y, end color #bc2612, divided by, d, t, end fraction
  • 写为向量形式,令 v(t)=[x(t)y(t)]\vec{\textbf{v}}(t) = \left[\begin{array}{c} x(t) \\ y(t) \end{array} \right], 利用f梯度start bold text, v, end bold text, with, vector, on top, left parenthesis, t, right parenthesis向量导数 为术语, 此法则具有非常简练的形式.
start underbrace, start fraction, d, divided by, d, t, end fraction, f, left parenthesis, start bold text, v, end bold text, with, vector, on top, left parenthesis, t, right parenthesis, right parenthesis, end underbrace, start subscript, start text, 复, 合, 函, 数, 的, 导, 数, end text, end subscript, equals, start overbrace, del, f, dot, start bold text, v, end bold text, with, vector, on top, prime, left parenthesis, t, right parenthesis, end overbrace, start superscript, start text, 向, 量, 的, 点, 乘, end text, end superscript

更常规的链式法则

正如大家可能想象的那样, 多变量链式法则是单变量微积分链式法则的推论. 单变量链式法则, 说明了如何求两个函数组合的导数:
start fraction, d, divided by, d, t, end fraction, f, left parenthesis, g, left parenthesis, t, right parenthesis, right parenthesis, equals, start fraction, d, f, divided by, d, g, end fraction, start fraction, d, g, divided by, d, t, end fraction, equals, f, prime, left parenthesis, g, left parenthesis, t, right parenthesis, right parenthesis, g, prime, left parenthesis, t, right parenthesis
如果函数 f 有两个输入变量left parenthesis, x, comma, y, right parenthesis, 而不是一个输入变量t会怎样?
f, left parenthesis, x, comma, y, right parenthesis, equals, dots, start text, 一, 些, 关, 于, space, x, space, 和, y, 的, 表, 达, 式, end text, dots
在这种情况下, 用标量函数g, left parenthesis, t, right parenthesis来组合它是没有意义的. 相反, 假设有两个独立的标量值函数 x, left parenthesis, t, right parenthesisy, left parenthesis, t, right parenthesis, 将它们作为f的坐标代入. 总体的组合式子将是一个单变量函数, 这个函数只有一个输入值 t,也只有一个输出值 f, left parenthesis, x, left parenthesis, t, right parenthesis, comma, y, left parenthesis, t, right parenthesis, right parenthesis, 如这个图表所示:
最后的输出f(x(t),y(t))两个中间的输出x(t)y(t)一个输入t\begin{array}{rrcl} \scriptsize\text{最后的输出}&&\scriptsize f(x(t),y(t)) \\\\ &\nearrow&&\nwarrow \\\\ \scriptsize\text{两个中间的输出}&x(t)&&y(t) \\\\ &\nwarrow&&\nearrow \\\\ \scriptsize\text{一个输入}&&t \end{array}
关于这个新的单变量函数f, left parenthesis, x, left parenthesis, t, right parenthesis, comma, y, left parenthesis, t, right parenthesis, right parenthesis的计算,也有一个链式法则, 并且涉及到f的偏导数:
 f 怎样变化 x 怎样变化因为因为 x的微小变化t的微小变化ddtf(x(t),y(t))=fxdxdt+fydydt这是一个普通的导数f的总体变化 f的总体变化不是偏导数t由于由于因为总体的组成t 对 x的影响t 对y的影响有一个输入值和一个输出值\begin{array}{ccccc} &\scriptsize\blueD{\text{ }f\text{ 怎样变化}}&&\scriptsize\purpleC{\text{ }x\text{ 怎样变化}} \\ &\scriptsize\blueD{\text{因为}}&&\scriptsize\purpleC{\text{因为}} \\ &\scriptsize\blueD{\text{ }x的微小变化}&&\scriptsize\purpleC{\text{}t 的微小变化} \\ &&\blueD{\huge\searrow}\quad\purpleC{\huge\swarrow} \\\\ \maroonD{\underbrace{\dfrac{d}{dt}}_{\Huge\uparrow}}f(x(t),y(t))&=&\underbrace{\blueD{\overbrace{\dfrac{\partial f}{\partial x}}}\purpleC{\overbrace{\dfrac{dx}{dt}}}}_{\Huge\uparrow}&+&\underbrace{\dfrac{\partial f}{\partial y}\dfrac{dy}{dt}}_{\Huge\uparrow} \\ \scriptsize\maroonD{\text{这是一个普通的导数}}&&\scriptsize\text{}f的总体变化&&\scriptsize\text{ }f的总体变化 \\ \scriptsize\maroonD{\text{不是偏导数}\dfrac{\partial}{\partial t}}&&\scriptsize\text{由于}&&\scriptsize\text{由于} \\ \scriptsize\maroonD{\text{因为总体的组成}}&&\scriptsize t\text{ 对 }x的影响&&\scriptsize t\text{ 对}y的影响 \\ \scriptsize\maroonD{\text{有一个输入值和一个输出值}} \end{array}
需要注意, start fraction, \partial, f, divided by, \partial, x, end fraction, start fraction, d, x, divided by, d, t, end fraction 是如下式子的简写
start fraction, \partial, f, divided by, \partial, x, end fraction, left parenthesis, x, left parenthesis, t, right parenthesis, comma, y, left parenthesis, t, right parenthesis, right parenthesis, start fraction, d, x, divided by, d, t, end fraction, left parenthesis, t, right parenthesis
也就是说, 两者都是 t的函数, 但 start fraction, \partial, f, divided by, \partial, x, end fraction 是由中间函数 x, left parenthesis, t, right parenthesisy, left parenthesis, t, right parenthesis表示的.

写为向量形式

与把 x, left parenthesis, t, right parenthesisy, left parenthesis, t, right parenthesis 视为单独的函数相比, 我们更经常的,会将它们一同写成一个单变量向量值函数:
v(t)=[x(t)y(t)]\vec{\textbf{v}}(t) = \left[\begin{array}{c} x(t) \\ y(t) \end{array} \right]
然后就可以将 f, left parenthesis, x, left parenthesis, t, right parenthesis, comma, y, left parenthesis, t, right parenthesis, right parenthesis组合, 用f, left parenthesis, start bold text, v, end bold text, with, vector, on top, left parenthesis, t, right parenthesis, right parenthesis替代.
在这种形式下, 多变量链式法则可以更为紧凑的写为在 f梯度start bold text, v, end bold text, with, vector, on top, left parenthesis, t, right parenthesis向量导数之间的点乘的形式:
ddtf(v(t))=fx(v(t))dxdt+fy(v(t))dydt将这个和重写成点式=[fx(v(t))fy(v(t))]f(v(t))[dxdtdydt]v(t)=f(v(t))v(t)\begin{aligned} \dfrac{d}{dt} f(\vec{\textbf{v}}(t)) &= \underbrace{ \dfrac{\partial f}{\partial x}(\vec{\textbf{v}}(t)) \dfrac{dx}{dt}+ \dfrac{\partial f}{\partial y}(\vec{\textbf{v}}(t)) \dfrac{dy}{dt} }_{\text{将这个和重写成点式}} \\\\ &= \underbrace{ \left[ \begin{array}{c} \dfrac{\partial f}{\partial x}(\vec{\textbf{v}}(t)) \\ \\ \dfrac{\partial f}{\partial y}(\vec{\textbf{v}}(t)) \end{array} \right] }_{\nabla f(\vec{\textbf{v}}(t))} \cdot \underbrace{ \left[ \begin{array}{c} \dfrac{dx}{dt} \\\\ \dfrac{dy}{dt} \end{array} \right] }_{\vec{\textbf{v}}'(t)}\\\\ &= \nabla f(\vec{\textbf{v}}(t)) \cdot \vec{\textbf{v}}'(t) \end{aligned}
这样写, 与单变量导数的类比就更加清晰了.
ddtf(g(t))=f(g(t))g(t)=dfdgdgdt\begin{aligned} \dfrac{d}{dt} f(g(t)) = f'(g(t)) g'(t) = \dfrac{df}{dg} \cdot \dfrac{dg}{dt} \end{aligned}
梯度 del, f 扮演了 f导数的角色, 向量导数 start bold text, v, end bold text, with, vector, on top, prime, left parenthesis, t, right parenthesis 扮演了 g普通导数的角色.

有关链式法则的直觉

一开始, 可以将单变量链式法则看做诸如f, left parenthesis, g, left parenthesis, t, right parenthesis, right parenthesis一样的组合. 可以这样理解这个组合:
  • 首先, g 将数轴上的点 t映射到数轴上的另一个点 g, left parenthesis, t, right parenthesis .
  • 然后 f 将点 g, left parenthesis, t, right parenthesis 映射到数轴上的另一个点 f, left parenthesis, g, left parenthesis, t, right parenthesis, right parenthesis
为了理解 f, left parenthesis, g, left parenthesis, t, right parenthesis, right parenthesis 的导数, 就需要理解一个关于 t的微小变动, 对最终输出的影响.
fg的组成
让我们深入研究下链式法则, 到底是怎么说的.
start fraction, d, divided by, d, x, end fraction, f, left parenthesis, g, left parenthesis, t, right parenthesis, right parenthesis, equals, start color #11accd, start fraction, d, f, divided by, d, g, end fraction, end color #11accd, dot, start color #1fab54, start fraction, d, g, divided by, d, t, end fraction, end color #1fab54
  • 表达式 start color #1fab54, start fraction, d, g, divided by, d, t, end fraction, end color #1fab54 代表了, 一个关于t的微小变化,是如何影响中间输出量 g, left parenthesis, t, right parenthesis的。
  • 表达式 start color #11accd, start fraction, d, f, divided by, d, g, end fraction, end color #11accd 代表了一个 g的微小变化, 是如何影响到最终输出 f, left parenthesis, g, left parenthesis, t, right parenthesis, right parenthesis的。
  • 由于t的小变化而造成的f的总变化, 是这两个影响因素的乘积。

将此直觉扩展到多维度

直觉对于多变量链规则是相似的. 可以把 start bold text, v, end bold text, with, vector, on top想成将数轴上的一点对应到 x, y-平面上的一点的映射, 把 f, left parenthesis, start bold text, v, end bold text, with, vector, on top, left parenthesis, t, right parenthesis, right parenthesis想成将该点对应回到数轴上某个位置的映射. 问题是, 一个关于初始输入 t 的小的变化, 是怎样改变总输出 f, left parenthesis, start bold text, v, end bold text, with, vector, on top, left parenthesis, t, right parenthesis, right parenthesis的?
ft, e, x, t, b, f, v, with, vector, on top的组成
我们分解一下多变量链式法则的意思, 将它分解为复合函数 x, left parenthesis, t, right parenthesisy, left parenthesis, t, right parenthesis的形式:
start fraction, d, divided by, d, t, end fraction, f, left parenthesis, start bold text, v, end bold text, with, vector, on top, left parenthesis, t, right parenthesis, right parenthesis, equals, start fraction, d, divided by, d, t, end fraction, f, left parenthesis, x, left parenthesis, t, right parenthesis, comma, y, left parenthesis, t, right parenthesis, right parenthesis, equals, start color #11accd, start fraction, \partial, f, divided by, \partial, x, end fraction, end color #11accd, start color #1fab54, start fraction, d, x, divided by, d, t, end fraction, end color #1fab54, plus, start color #11accd, start fraction, \partial, f, divided by, \partial, y, end fraction, end color #11accd, start color #e84d39, start fraction, d, y, divided by, d, t, end fraction, end color #e84d39
  • 表达式 start color #1fab54, start fraction, d, x, divided by, d, t, end fraction, end color #1fab54代表了 t的一个微小变化, 是如何影响中间变量 x, left parenthesis, t, right parenthesis的。
  • 同样的, 表达式 start color #e84d39, start fraction, d, y, divided by, d, t, end fraction, end color #e84d39代表了 t的微小变化是如何影响第二个中间变量 y, left parenthesis, t, right parenthesis的。
  • 表达式 start color #11accd, start fraction, \partial, f, divided by, \partial, x, end fraction, end color #11accd代表了对于 x-组成部分 关于f的一个微小的变化, 是如何影响输出的,类似的, 表达式 start color #11accd, start fraction, \partial, f, divided by, \partial, y, end fraction, end color #11accd记录了 对于 y-组成部分 关于 f的一个微小变化,是如何影响输出的。
  • t 的微小变化影响 f, left parenthesis, x, left parenthesis, t, right parenthesis, comma, y, left parenthesis, t, right parenthesis, right parenthesis 的一种方式是, 先改变x, left parenthesis, t, right parenthesis, 然后跟着影响 f. 这个效应由乘积 start color #11accd, start fraction, \partial, f, divided by, \partial, x, end fraction, end color #11accd, start color #1fab54, start fraction, d, x, divided by, d, t, end fraction, end color #1fab54表示。
  • t的变化影响 f, left parenthesis, x, left parenthesis, t, right parenthesis, comma, y, left parenthesis, t, right parenthesis, right parenthesis的另一种方式是, 先改变第二个中间变量 y, left parenthesis, t, right parenthesis, 这个中间变量跟着影响输出 f. 这种效应由乘积 start color #11accd, start fraction, \partial, f, divided by, \partial, y, end fraction, end color #11accd, start color #e84d39, start fraction, d, y, divided by, d, t, end fraction, end color #e84d39表示.
  • 将这两个乘积加起来, 就能得到 f的总变化.

与方向导数的联系

可以注意到, 多变量链式法则的点乘表达式, 看上去与 方向导数很像:
f(v(t))v(t)\begin{aligned} \nabla f(\vec{\textbf{v}}(t)) \cdot \vec{\textbf{v}}'(t) \end{aligned}
导数是轨迹的速度切线向量
事实上, 就是这样的! start bold text, v, end bold text, with, vector, on top, prime, left parenthesis, t, start subscript, 0, end subscript, right parenthesis 在特殊值 t, start subscript, 0, end subscript 处的导数, 就是 f自变量域的向量:
v(t0)=[x(t0)y(t0)]\begin{aligned} \vec{\textbf{v}}'(t_0) = \left[ \begin{array}{c} x'(t_0) \\\\ y'(t_0) \end{array} \right] \end{aligned}
如果 start bold text, v, end bold text, with, vector, on top, left parenthesis, t, right parenthesis 被解释为这个空间内的一个参数路径, 比如可以想成是一个例子的运动轨迹, 那么在特定时间点t, start subscript, 0, end subscript的导数, 就是该粒子在此时刻的速度向量.
在这种解释下, 链式法则告诉我们, 复合函数 f, left parenthesis, start bold text, v, end bold text, with, vector, on top, left parenthesis, t, right parenthesis, right parenthesis f沿 start bold text, v, end bold text, with, vector, on top, left parenthesis, t, right parenthesis导数方向的向量导数.
这样就有意义了, 因为根据导数的定义, 对 t的一个微小变化 "d, t" ,会产生一个对输出量 start bold text, v, end bold text, with, vector, on top, left parenthesis, t, right parenthesis的一个微小变化 d, start bold text, v, end bold text, with, vector, on top. 然后方向导数的要点是对输入量f的一个微小变化 d, start bold text, v, end bold text, with, vector, on top会产生一个微小变化 d, f , 正如公式 start fraction, \partial, f, divided by, \partial, start bold text, v, end bold text, with, vector, on top, end fraction, equals, del, start subscript, start bold text, v, end bold text, with, vector, on top, end subscript, f定义的那样.

例1: 使用或不适用新的链式法则

定义 f, left parenthesis, x, comma, y, right parenthesis 如下:
f(x,y)=x2y\begin{aligned} f(x, y) = x^2y \end{aligned}
定义 start bold text, v, end bold text, with, vector, on top, left parenthesis, t, right parenthesis 如下:
v(t)=[cos(t)sin(t)]\begin{aligned} \vec{\textbf{v}}(t) = \left[ \begin{array}{c} \cos(t) \\\\ \sin(t) \end{array} \right] \end{aligned}
start fraction, d, divided by, d, t, end fraction, f, left parenthesis, start bold text, v, end bold text, with, vector, on top, left parenthesis, t, right parenthesis, right parenthesis的导数.
不用链式法则的解法:
在使用我们新奇工具解决这个问题之前,值得指出的是, 是可以先将该组合, 写成单变量函数 t的形式的:
f(v(t))=f(cos(t),sin(t))=cos(t)2sin(t)\begin{aligned} f(\vec{\textbf{v}}(t)) &= f(\cos(t), \sin(t)) \\\\ &= \cos(t)^2\sin(t) \end{aligned}
现在可以求普通导数:
=ddtcos(t)2sin(t)=cos(t)2(cos(t))+2cos(t)(sin(t))sin(t)=cos3(t)2cos(t)sin2(t)\begin{aligned} &\phantom{=}\dfrac{d}{dt} \cos(t)^2\sin(t) \\\\ &= \cos(t)^2(\cos(t)) + 2\cos(t)(-\sin(t))\sin(t) \\\\ &=\boxed{ \cos^3(t) - 2\cos(t)\sin^2(t)} \end{aligned}
但是当然,这个例子的目的, 是让我们了解一下链式法则的感觉.
使用链式法则的解法:
首先, 明确的写出 start bold text, v, end bold text, with, vector, on top, left parenthesis, t, right parenthesis的组成函数:
x(t)=cos(t)y(t)=sin(t)\begin{aligned} x(t) &= \cos(t) \\\\ y(t) &= \sin(t) \end{aligned}
根据链式法则,
ddtf(v(t))=fxdxdt+fydydt\begin{aligned} \dfrac{d}{dt} f(\vec{\textbf{v}}(t)) &= \dfrac{\partial f}{\partial x} \dfrac{dx}{dt} + \dfrac{\partial f}{\partial y} \dfrac{dy}{dt} \end{aligned}
代入偏导数 f, left parenthesis, x, comma, y, right parenthesis, equals, x, squared, y 以及普通导数 x, left parenthesis, t, right parenthesis, equals, cosine, left parenthesis, t, right parenthesis, y, left parenthesis, t, right parenthesis, equals, sine, left parenthesis, t, right parenthesis, 可以得到
x(x2y)ddt(cos(t))+y(x2y)ddt(sin(t))=(2xy)(sin(t))+(x2)(cos(t))\begin{aligned} &\quad \dfrac{\partial}{\partial \blueE{x}}(\blueE{x}^2 y) \dfrac{d}{dt}(\cos(t)) + \dfrac{\partial}{\partial \redE{y}}(x^2 \redE{y}) \dfrac{d}{dt}(\sin(t)) \\\\ &= (2\blueE{x}y)(-\sin(t)) + (x^2)(\cos(t)) \end{aligned}
为了让所有的式子都用 t表示, 代入 x, equals, cosine, left parenthesis, t, right parenthesisy, equals, sine, left parenthesis, t, right parenthesis.
(2xy)(sin(t))+(x2)(cos(t))(2cos(t)sin(t))(sin(t))+(cos(t)2)cos(t)=2cos(t)sin2(t)+cos3(t)\begin{aligned} &(2\blueE{x}y)(-\sin(t)) + (x^2)(\cos(t)) \\\\ &(2\cos(t)\sin(t))(-\sin(t)) + (\cos(t)^2)\cos(t) \\\\ = &\boxed{-2\cos(t)\sin^2(t) + \cos^3(t)} \end{aligned}
令人欣慰的是,这与不使用链式法则的答案相同。有人会认为, 这种新的链式规则使事情变得不必要地复杂,并且,对于像这样的具体计算,它常常是不需要的。
然而,正如下一个例题所示,这种方法, 对写出未知函数形式的方程是有用的。

例2: 未知函数

假设一个二维区域的温度, 随函数 T, left parenthesis, x, comma, y, right parenthesis变化, 并且该函数未知. 你漫步在此区域, 对所到之处的温度采样,并且你的 xy坐标, 是时间的函数, 如下
x(t)=30cos(2t)y(t)=40sin(3t)\begin{aligned} x(t) &= 30\cos(2t) \\\\ y(t) &= 40\sin(3t) \end{aligned}
在测量时, 你发现自己路径上的温度, 从未改变过. 那关于 T的偏导数,你能得出什么结论?

总结

  • 已知一个多变量函数 f, left parenthesis, x, comma, y, right parenthesis, 和两个单变量函数 x, left parenthesis, t, right parenthesisy, left parenthesis, t, right parenthesis, 则多变量链式法则是:
start underbrace, start fraction, d, divided by, d, t, end fraction, f, left parenthesis, start color #11accd, x, end color #11accd, left parenthesis, t, right parenthesis, comma, start color #bc2612, y, end color #bc2612, left parenthesis, t, right parenthesis, right parenthesis, end underbrace, start subscript, start text, 复, 合, 函, 数, 的, 导, 数, end text, end subscript, equals, start fraction, \partial, f, divided by, \partial, start color #11accd, x, end color #11accd, end fraction, start fraction, d, start color #11accd, x, end color #11accd, divided by, d, t, end fraction, plus, start fraction, \partial, f, divided by, \partial, start color #bc2612, y, end color #bc2612, end fraction, start fraction, d, start color #bc2612, y, end color #bc2612, divided by, d, t, end fraction
  • 写为向量形式,令 v(t)=[x(t)y(t)]\vec{\textbf{v}}(t) = \left[\begin{array}{c} x(t) \\ y(t) \end{array} \right], 利用f梯度start bold text, v, end bold text, with, vector, on top, left parenthesis, t, right parenthesis向量导数 为术语, 此法则具有非常简练的形式.
start underbrace, start fraction, d, divided by, d, t, end fraction, f, left parenthesis, start bold text, v, end bold text, with, vector, on top, left parenthesis, t, right parenthesis, right parenthesis, end underbrace, start subscript, start text, 复, 合, 函, 数, 的, 导, 数, end text, end subscript, equals, start overbrace, del, f, dot, start bold text, v, end bold text, with, vector, on top, prime, left parenthesis, t, right parenthesis, end overbrace, start superscript, start text, 向, 量, 的, 点, 乘, end text, end superscript

想加入讨论吗?

尚无帖子。
你会英语吗?单击此处查看更多可汗学院英文版的讨论.