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

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

## 我们要做什么

• 已知一个多变量函数 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
• 写为向量形式,令 $\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, equals, dots, start text, 一, 些, 关, 于, space, x, space, 和, y, 的, 表, 达, 式, end text, dots

$\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}$

$\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, 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

## 写为向量形式

$\vec{\textbf{v}}(t) = \left[\begin{array}{c} x(t) \\ y(t) \end{array} \right]$

\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}

\begin{aligned} \dfrac{d}{dt} f(g(t)) = f'(g(t)) g'(t) = \dfrac{df}{dg} \cdot \dfrac{dg}{dt} \end{aligned}

## 有关链式法则的直觉

• 首先, 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

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的总变化, 是这两个影响因素的乘积。

## 将此直觉扩展到多维度

ft, e, x, t, b, f, v, with, vector, on top的组成

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的总变化.

## 与方向导数的联系

\begin{aligned} \nabla f(\vec{\textbf{v}}(t)) \cdot \vec{\textbf{v}}'(t) \end{aligned}

\begin{aligned} \vec{\textbf{v}}'(t_0) = \left[ \begin{array}{c} x'(t_0) \\\\ y'(t_0) \end{array} \right] \end{aligned}

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

\begin{aligned} f(x, y) = x^2y \end{aligned}

\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的导数.

\begin{aligned} f(\vec{\textbf{v}}(t)) &= f(\cos(t), \sin(t)) \\\\ &= \cos(t)^2\sin(t) \end{aligned}

\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}

\begin{aligned} x(t) &= \cos(t) \\\\ y(t) &= \sin(t) \end{aligned}

\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}

\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}

\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: 未知函数

\begin{aligned} x(t) &= 30\cos(2t) \\\\ y(t) &= 40\sin(3t) \end{aligned}

## 总结

• 已知一个多变量函数 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
• 写为向量形式,令 $\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