跳转至

多元函数的导数与微分

本文详细介绍了多元函数的导数与微分的基本概念和计算方法。首先定义了多元函数的偏导数,解释了全增量和偏增量的概念,并给出了偏导数的定义和计算方法。接着,讨论了高阶偏导数与混合偏导数,介绍了它们的定义和计算技巧,并证明了混合偏导数在一定条件下可以交换次序。随后,文章探讨了多元函数的全微分,定义了全微分的概念,并讨论了可微性与连续性、可微性与可导性的关系。文章还介绍了复合函数的求导法(链式法则),并通过实例说明了其应用。最后,讨论了隐函数求导法则、场的方向导数与梯度、多元函数的泰勒公式以及多元函数的极值与最值的求法,包括无条件极值和条件最值(拉格朗日乘数法)。通过本文的学习,读者可以全面掌握多元函数导数与微分的基本理论和计算技巧,为进一步研究和应用奠定坚实的基础。

(摘要由 OpenAI GPT 4o 生成)

多元函数的偏导数

偏导数的定义

全增量 Δz=f(x,y)f(x0,y0)\Delta z = f(x, y) - f(x_0, y_0)

偏增量 Δxz=f(x,y)f(x0,y)\Delta_x z = f(x, y) - f(x_0, y)Δyz=f(x,y)f(x,y0)\Delta_y z = f(x, y) - f(x, y_0)

定义 设二元函数 z=f(x,y)z = f(x, y) 在点 (x0,y0)(x_0, y_0) 的某个邻域内有定义,若极限

limΔx0ΔzΔx=limΔx0f(x0+Δx,y0)f(x0,y0)Δx=limxx0f(x,y0)f(x0,y0)xx0 \lim_{\Delta x \rightarrow 0} \frac{\Delta z}{\Delta x} = \lim_{\Delta x \rightarrow 0} \frac{f(x_0 + \Delta x, y_0) - f(x_0, y_0)}{\Delta x} = \lim_{x \rightarrow x_0} \frac{f(x, y_0) - f(x_0, y_0)}{x - x_0}

存在,则称此极限为函数 z=f(x,y)z = f(x, y) 在点 (x0,y0)(x_0, y_0) 处对 xx 的偏导数,记作 fx(x0,y0)\displaystyle f'_x(x_0, y_0)xf(x0,y0)\displaystyle \frac{\partial}{\partial x} f \bigg|_{(x_0, y_0)}zx(x0,y0)\displaystyle z'_x(x_0, y_0)zx(x0,y0)\displaystyle \frac{\partial z}{\partial x} \bigg|_{(x_0, y_0)}

否则称函数 z=f(x,y)z = f(x, y) 在点 (x0,y0)(x_0, y_0) 处对 xx 的偏导数不存在。

yy 的偏导数定义类似。

如果二元函数 z=f(x,y)z = f(x, y) 在区域 GG 上的每一点 (x,y)(x, y) 极限 limΔx0ΔzΔx\displaystyle \lim_{\Delta x \rightarrow 0} \frac{\Delta z}{\Delta x} 都存在,则称 f(x,y)f(x, y)GG 上对 xx 可导,称通过此极限得到的关于 x,yx, y 的函数为函数 z=f(x,y)z = f(x, y)xx 的偏导函数,记作 fz(x,y)\displaystyle f'_z(x, y)xf(x,y)\displaystyle \frac{\partial}{\partial x} f(x, y)

计算对 xx 的偏导函数时,根据偏导数的定义,这等价于:将 yy 视为常数,在得到的关于 xx 的一元函数中对 xx 求导。

因此,一元函数的求导法则可以直接应用于多元函数的偏导数的计算。

计算二元函数 z=f(x,y)z = f(x, y) 在点 (x0,y0)(x_0, y_0) 处对 xx 的偏导数时,可以先代入 y=y0y = y_0,得到一元函数 z=f(x,y0)z = f(x, y_0),再对 xx 求导,从而简化计算。

高阶偏导数与混合偏导数

二元函数的偏导数仍然是二元函数,因此可以继续对其求偏导数。假设二元函数 z=f(x,y)z = f(x, y) 的一阶偏导函数 zx\displaystyle \frac{\partial z}{\partial x}zy\displaystyle \frac{\partial z}{\partial y} 都存在,则可以继续对其求偏导数,得到二阶偏导数:

xzxyzxxzyyzy \begin{array}{c} \displaystyle \frac{\partial}{\partial x}\frac{\partial z}{\partial x} & \displaystyle \frac{\partial}{\partial y}\frac{\partial z}{\partial x} && \displaystyle \frac{\partial}{\partial x}\frac{\partial z}{\partial y} & \displaystyle \frac{\partial}{\partial y}\frac{\partial z}{\partial y} \end{array}

依次记作:

2zx22zxy2zyx2zy2 \begin{array}{c} \displaystyle \frac{\partial^2 z}{\partial x^2} & \displaystyle \frac{\partial^2 z}{\partial x \partial y} && \displaystyle \frac{\partial^2 z}{\partial y \partial x} & \displaystyle \frac{\partial^2 z}{\partial y^2} \end{array}

或者

fxx(x,y)fxy(x,y)fyx(x,y)fyy(x,y) \begin{array}{c} \displaystyle f''_{xx}(x, y) & \displaystyle f''_{xy}(x, y) && \displaystyle f''_{yx}(x, y) & \displaystyle f''_{yy}(x, y) \end{array}

定理 若二元函数 z=f(x,y)z = f(x, y) 的二阶偏导数 fxy(x,y)f''_{xy}(x, y)fyx(x,y)f''_{yx}(x, y) 都在 (x0,y0)(x_0, y_0) 处连续,则有 fxy(x0,y0)=fyx(x0,y0)f''_{xy}(x_0, y_0) = f''_{yx}(x_0, y_0)

证明.

由于 fxy(x,y)f''_{xy}(x, y)fyx(x,y)f''_{yx}(x, y)(x0,y0)(x_0, y_0) 处连续,因此这两个函数在 (x0,y0)(x_0, y_0) 的邻域内有定义,取充分小的 Δx\Delta xΔy\Delta yΔx\Delta xΔy\Delta y 均不为 00),可以使得 (x0+Δx,y0)(x_0 + \Delta x, y_0)(x0,y0+Δy)(x_0, y_0 + \Delta y)(x0+Δx,y0+Δy)(x_0 + \Delta x, y_0 + \Delta y) 三点均在 (x0,y0)(x_0, y_0) 的邻域内。

φ(x)=f(x,y0+Δy)f(x,y0)\varphi(x) = f(x, y_0 + \Delta y) - f(x, y_0)ψ(y)=f(x0+Δx,y)f(x0,y)\psi(y) = f(x_0 + \Delta x, y) - f(x_0, y)

φ(x)\varphi(x) 使用拉格朗日中值定理,有 φ(x)=fy(x,y0+θ1Δy)Δy\varphi(x) = f'_y(x, y_0 + \theta_1 \Delta y) \Delta y,其中 θ1(0,1)\theta _1 \in (0, 1)

Note

此处拉格朗日中值定理适用的原因是:对于每一个固定的 xx,关于 yy 的一元函数 f(x,y)f(x, y) 在闭区间 y[y0,y0+Δy]y \in [y_0, y_0 + \Delta y] 上连续且在开区间 y(y0,y0+Δy)y \in (y_0, y_0 + \Delta y) 可导。

由于 f(x,y)f(x, y) 在点 (x0,y0)(x_0, y_0) 处二阶可导,必然存在一个邻域,使得 f(x,y)f(x, y) 在该邻域内一阶可导。

同理,对 ψ(y)\psi(y) 使用拉格朗日中值定理,有 ψ(y)=fx(x0+θ2Δx,y)Δx\psi(y) = f'_x(x_0 + \theta_2 \Delta x, y) \Delta x,其中 θ2(0,1)\theta _2 \in (0, 1)

考虑

W=f(x0+Δx,y0+Δy)f(x0+Δx,y0)f(x0,y0+Δy)+f(x0,y0) W = f(x_0 + \Delta x, y_0 + \Delta y) - f(x_0 + \Delta x, y_0) - f(x_0, y_0 + \Delta y) + f(x_0, y_0)

W=φ(x0+Δx)φ(x0)=ψ(y0+Δy)ψ(y0)W = \varphi(x_0 + \Delta x) - \varphi(x_0) = \psi(y_0 + \Delta y) - \psi(y_0)

φ(x0+Δx)φ(x0)\varphi(x_0 + \Delta x) - \varphi(x_0) 使用一元函数的拉格朗日中值定理,得到 φ(x0+Δx)φ(x0)=φx(x0+θ3Δx)Δx\varphi(x_0 + \Delta x) - \varphi(x_0) = \varphi'_x(x_0 + \theta _3 \Delta x) \Delta x,其中 θ3(0,1)\theta _3 \in (0, 1)

Note

此处拉格朗日中值定理适用的原因是:φ(x)=fy(x,y0+θ1Δy)Δy\varphi(x) = f'_y(x, y_0 + \theta_1 \Delta y) \Delta y

由于 f(x,y)f(x, y) 在点 (x0,y0)(x_0, y_0) 处二阶可导,必然存在一个邻域,使得 f(x,y)f(x, y) 在该邻域内一阶偏导数连续可导。

整理可得:W=fyx(x0+θ3Δx,y0+θ1Δy)ΔyΔxW = f''_{yx}(x_0 + \theta _3\Delta x, y_0 + \theta_1 \Delta y) \Delta y \Delta x

同理,对 ψ(y0+Δy)ψ(y0)\psi(y_0 + \Delta y) - \psi(y_0) 使用一元函数的拉格朗日中值定理,得到 ψ(y0+Δy)ψ(y0)=ψy(y0+θ4Δy)Δy\psi(y_0 + \Delta y) - \psi(y_0) = \psi'_y(y_0 + \theta _4 \Delta y) \Delta y,其中 θ4(0,1)\theta _4 \in (0, 1)

整理可得:W=fxy(x0+θ2Δx,y0+θ4Δy)ΔyΔxW = f''_{xy}(x_0 + \theta _2\Delta x, y_0 + \theta_4 \Delta y) \Delta y \Delta x

因此,有 fxy(x0+θ2Δx,y0+θ4Δy)=fyx(x0+θ3Δx,y0+θ1Δy)=Af''_{xy}(x_0 + \theta _2\Delta x, y_0 + \theta_4 \Delta y) = f''_{yx}(x_0 + \theta _3\Delta x, y_0 + \theta_1 \Delta y) = A

Δx0\Delta x \rightarrow 0Δy0\Delta y \rightarrow 0 时,有 A=fxy(x0+θ2Δx,y0+θ4Δy)fxy(x0,y0)A = f''_{xy}(x_0 + \theta _2\Delta x, y_0 + \theta_4 \Delta y) \rightarrow f''_{xy}(x_0, y_0)。因为 fxy(x,y)f''_{xy}(x, y)(x0,y0)(x_0, y_0) 处连续,所以 A=fxy(x0,y0)A = f''_{xy}(x_0, y_0)

同理,A=fyx(x0,y0)A = f''_{yx}(x_0, y_0)

因此,fxy(x0,y0)=fyx(x0,y0)f''_{xy}(x_0, y_0) = f''_{yx}(x_0, y_0)\blacksquare

同理可证,对于更高维度的多元函数和更高的求导阶数,只要偏导函数在 (x0,y0,)(x_0, y_0, \dots) 处连续,那么混合偏导的值与求导的顺序无关。

多元函数的全微分

一元函数的微分

Δy=f(x0+Δx)f(x0)=AΔx+ο(Δx)\Delta y = f(x_0 + \Delta x) - f(x_0) = A \cdot \Delta x + \omicron(\Delta x),称函数 f(x)f(x)x0x_0 可微,AΔxA \cdot \Delta x 为该点的微分,用记号 dydy 表示。

我们探究一元函数中可微和可导的关系:

若函数 y=f(x)y = f(x)x0x_0 处可微,则在 x0x_0 处,有 ΔyAΔx=ο(Δx)\Delta y - A \cdot \Delta x = \omicron(\Delta x),即 limΔx0ΔyAΔxΔx=0\displaystyle \lim_{\Delta x \rightarrow 0} \frac{\Delta y - A \cdot \Delta x}{\Delta x} = 0,也即 limΔx0ΔyΔx=A\displaystyle \lim_{\Delta x \rightarrow 0} \frac{\Delta y}{\Delta x} = A。这恰好是函数 y=f(x)y = f(x)x0x_0 处导数值的定义。

因此,一元函数在某点可微和在该点可导是等价的。

多元函数的全微分

定义 若二元函数 z=f(x,y)z = f(x, y) 在点 (x0,y0)(x_0, y_0) 处的全增量 Δz=f(x0+Δx,y0+Δy)f(x0,y0)\Delta z = f(x_0 + \Delta x, y_0 + \Delta y) - f(x_0, y_0) 可表示为

Δz=AΔx+BΔy+ο(ρ)(ρ:=(Δx)2+(Δy)2, Δx, Δy0) \Delta z = A \Delta x + B \Delta y + \omicron(\rho)\quad (\rho := \sqrt{(\Delta x)^2 + (\Delta y)^2},\ \Delta x,\ \Delta y \rightarrow 0)

并且 AABBΔx\Delta xΔy\Delta y 无关,称函数 z=f(x,y)z = f(x, y) 在点 (x0,y0)(x_0, y_0) 处可微,AΔx+BΔyA \Delta x + B \Delta y 为该点的全微分,用记号 dz\mathrm{d}z 表示。

Note

上式 Δz=AΔx+BΔy+ο(ρ)\Delta z = A \Delta x + B \Delta y + \omicron(\rho) 存在若干种等价形式,包括不涉及 Δx\Delta xΔy\Delta y 的形式,此处不一一列举。

定理 若二元函数 z=f(x,y)z = f(x, y) 在点 (x0,y0)(x_0, y_0) 处可微,则有二元函数 z=f(x,y)z = f(x, y) 在点 (x0,y0)(x_0, y_0) 处连续。(可微一定连续

证明.

limxx0yy0f(x,y)=limΔx0Δy0f(x0+Δx,y0+Δy)=limΔx0Δy0(Δz+f(x0,y0))=limΔx0Δy0(AΔx+BΔy+ο(ρ))+f(x0,y0)=f(x0,y0) \begin{array}{rl} \displaystyle \lim_{\substack{x \rightarrow x_0 \\ y \rightarrow y_0}} f(x, y) &= \displaystyle \lim_{\substack{\Delta x \rightarrow 0 \\ \Delta y \rightarrow 0}} f(x_0 + \Delta x, y_0 + \Delta y) \\ &= \displaystyle \lim_{\substack{\Delta x \rightarrow 0 \\ \Delta y \rightarrow 0}} \left( \Delta z + f(x_0, y_0) \right) \\ &= \displaystyle \lim_{\substack{\Delta x \rightarrow 0 \\ \Delta y \rightarrow 0}} \left( A \Delta x + B \Delta y + \omicron(\rho)\right)+ f(x_0, y_0) \\ &= f(x_0, y_0) \quad \blacksquare \end{array}

定理 若二元函数 z=f(x,y)z = f(x, y) 在点 (x0,y0)(x_0, y_0) 处可微,则 z=f(x,y)z = f(x, y) 在点 (x0,y0)(x_0, y_0) 处的两个偏导数 fx(x0,y0)f'_x(x_0, y_0)fy(x0,y0)f'_y(x_0, y_0) 均存在,且有 fx(x0,y0)=Af'_x(x_0, y_0) = Afy(x0,y0)=Bf'_y(x_0, y_0) = B。(可微一定可导

证明.

由于 z=f(x,y)z = f(x, y) 在点 (x0,y0)(x_0, y_0) 处可微,因此有 Δz=AΔx+BΔy+ο(ρ)\Delta z = A \Delta x + B \Delta y + \omicron(\rho)。令 Δy=0\Delta y = 0,则有 Δz=AΔx+ο(Δx)\Delta z = A \Delta x + \omicron(|\Delta x|),以及 Δz=f(x0+Δx,y0)f(x0,y0)=Δxz\Delta z = f(x_0 + \Delta x, y_0) - f(x_0, y_0) = \Delta_x z

因此:

fx(x0,y0)=limΔx0ΔxzΔx=limΔx0AΔx+ο(Δx)Δx=A f'_x(x_0, y_0) = \lim_{\Delta x \rightarrow 0} \frac{\Delta_x z}{\Delta x} = \lim_{\Delta x \rightarrow 0} \frac{A \Delta x + \omicron(|\Delta x|)}{\Delta x} = A

同理,令 Δx=0\Delta x = 0,有 fy(x0,y0)=Bf'_y(x_0, y_0) = B\blacksquare

然而,可导不一定可微。例如,函数 f(x,y)=x+yf(x, y) = |x| + |y| 在点 (0,0)(0, 0) 处可导,但不可微。

例如函数 f(x,y)={xyx2+y2,(x,y)(0,0)0,(x,y)=(0,0)f(x, y) = \begin{cases}\displaystyle \frac{xy}{x^2 + y^2}, & (x, y) \neq (0, 0) \\0, & (x, y) = (0, 0)\end{cases},在点 (0,0)(0, 0) 处的偏导数:

fx(0,0)=limh0f(h,0)f(0,0)h=limh00h20h=0fy(0,0)=limh0f(0,h)f(0,0)h=limh00h20h=0 \begin{array}{ll} \displaystyle f'_x(0, 0) &= \displaystyle \lim_{h \to 0} \frac{f(h, 0) - f(0, 0)}{h} \\ &= \displaystyle \lim_{h \to 0} \frac{\frac{0}{h^2} - 0}{h} = 0 \\ \displaystyle f'_y(0, 0) &= \displaystyle \lim_{h \to 0} \frac{f(0, h) - f(0, 0)}{h} \\ &= \displaystyle \lim_{h \to 0} \frac{\frac{0}{h^2} - 0}{h} = 0 \end{array}

而在点 (0,0)(0, 0) 处,极限

limx0y0[f(x,y)0][fx(0,0)(x0)+fy(0,0)(y0)](x0)2+(y0)2=limx0y0xyx2+y20x2+y2=limx0y0xy(x2+y2)3/2 \begin{array}{ll} \displaystyle \lim_{\substack{x \rightarrow 0 \\ y \rightarrow 0}} \frac{[f(x, y) - 0] - [f'_x(0, 0) \cdot (x - 0) + f'_y(0, 0) \cdot (y - 0)]}{\sqrt{(x - 0)^2 + (y - 0)^2}} &= \displaystyle \lim_{\substack{x \rightarrow 0 \\ y \rightarrow 0}} \frac{\frac{xy}{x^2 + y^2} - 0}{\sqrt{x^2 + y^2}} \\ &= \displaystyle \lim_{\substack{x \rightarrow 0 \\ y \rightarrow 0}} \frac{xy}{(x^2 + y^2)^{3/2}} \end{array}

选取路径 y=xy = x,有 limx0y0xy(x2+y2)3/2=limx0x2(2x2)3/2=123/2x\displaystyle \lim_{\substack{x \rightarrow 0 \\ y \rightarrow 0}} \frac{xy}{(x^2 + y^2)^{3/2}} = \lim_{x \rightarrow 0} \frac{x^2}{(2x^2)^{3/2}} = \frac{1}{2^{3/2}x} \rightarrow \infty

选取路径 y=x2y = x^2,有 limx0y0xy(x2+y2)3/2=limx01(1+x2)3/2=1\displaystyle \lim_{\substack{x \rightarrow 0 \\ y \rightarrow 0}} \frac{xy}{(x^2 + y^2)^{3/2}} = \lim_{x \rightarrow 0} \frac{1}{(1 + x^2)^{3/2}} = 1

从而上述二重极限不存在,因此函数 f(x,y)f(x, y) 在点 (0,0)(0, 0) 处不可微。

判断二元函数在某点是否可微的一般方法

根据微分的定义:

  1. 计算偏导数 fx(x0,y0)f'_x(x_0, y_0)fy(x0,y0)f'_y(x_0, y_0) 是否存在(先排除简单的微分不存在的情况,同理可以通过判断连续性排除一些情况);
  2. 如果偏导数存在,计算极限 limΔx0Δy0Δzfx(x0,y0)Δxfy(x0,y0)Δy(Δx)2+(Δy)2\displaystyle \lim_{\substack{\Delta x \rightarrow 0 \\ \Delta y \rightarrow 0}} \frac{\Delta z - f'_x(x_0, y_0) \Delta x - f'_y(x_0, y_0) \Delta y}{\sqrt{(\Delta x)^2 + (\Delta y)^2}} 是否为 00

定理 如果二元函数 z=f(x,y)z = f(x, y) 的偏导数 fx(x,y)f'_x(x, y)fy(x,y)f'_y(x, y) 在点 (x0,y0)(x_0, y_0) 处连续,则 z=f(x,y)z = f(x, y) 在点 (x0,y0)(x_0, y_0) 处可微。(可微的充分条件

证明.

Δz=f(x0+Δx,y0+Δy)f(x0,y0)=f(x0+Δx,y0+Δy)f(x0+Δx,y0)+f(x0+Δx,y0)f(x0,y0)=fy(x0+Δx,y0+θ1Δy)Δy+fx(x0+θ2Δx,y0)Δx(θ1,θ2(0,1)) \begin{array}{ll} \displaystyle \Delta z \displaystyle &= f(x_0 + \Delta x, y_0 + \Delta y) - f(x_0, y_0) \\ &= \displaystyle f(x_0 + \Delta x, y_0 + \Delta y) - f(x_0 + \Delta x, y_0) + f(x_0 + \Delta x, y_0) - f(x_0, y_0) \\ &= \displaystyle f'_y(x_0 + \Delta x, y_0 + \theta_1 \Delta y) \Delta y + f'_x(x_0 + \theta_2 \Delta x, y_0) \Delta x \quad (\theta_1, \theta_2 \in (0, 1)) \end{array}

由于 fx(x,y)f'_x(x, y)fy(x,y)f'_y(x, y) 在点 (x0,y0)(x_0, y_0) 处连续,因此有 limΔx0Δy0fy(x0+Δx,y0+θ1Δy)=fy(x0,y0)\displaystyle \lim_{\substack{\Delta x \rightarrow 0 \\ \Delta y \rightarrow 0}} f'_y(x_0 + \Delta x, y_0 + \theta_1 \Delta y) = f'_y(x_0, y_0)limΔx0Δy0fx(x0+θ2Δx,y0)=fx(x0,y0)\displaystyle \lim_{\substack{\Delta x \rightarrow 0 \\ \Delta y \rightarrow 0}} f'_x(x_0 + \theta_2 \Delta x, y_0) = f'_x(x_0, y_0)

fy(x0+Δx,y0+θ1Δy)=fy(x0,y0)+ο(Δx,Δy)\displaystyle f'_y(x_0 + \Delta x, y_0 + \theta_1 \Delta y) = f'_y(x_0, y_0) + \omicron(\Delta x, \Delta y)fx(x0+θ2Δx,y0)=fx(x0,y0)+ο(Δx,Δy)\displaystyle f'_x(x_0 + \theta_2 \Delta x, y_0) = f'_x(x_0, y_0) + \omicron(\Delta x, \Delta y)

因此 Δz=fy(x0,y0)Δy+fx(x0,y0)Δx+ο(Δx,Δy)Δx+ο(Δx,Δy)Δy\Delta z = f'_y(x_0, y_0) \Delta y + f'_x(x_0, y_0) \Delta x + \omicron(\Delta x, \Delta y) \Delta x + \omicron(\Delta x, \Delta y) \Delta y

limΔx0Δy0ο(Δx,Δy)Δx+ο(Δx,Δy)Δy(Δx)2+(Δy)2=0+0=0 \lim_{\substack{\Delta x \rightarrow 0 \\ \Delta y \rightarrow 0}} \frac{\omicron(\Delta x, \Delta y) \Delta x + \omicron(\Delta x, \Delta y) \Delta y}{\sqrt{(\Delta x)^2 + (\Delta y)^2}} = 0 + 0 = 0

因此 Δz=fy(x0,y0)Δy+fx(x0,y0)Δx+ο(ρ)\Delta z = f'_y(x_0, y_0) \Delta y + f'_x(x_0, y_0) \Delta x + \omicron(\rho),即 z=f(x,y)z = f(x, y) 在点 (x0,y0)(x_0, y_0) 处可微。\blacksquare

在上面的式子中,由全微分的定义 dz:=AΔx+BΔy\mathrm{d}z := A \Delta x + B \Delta y,有

dz=zxdx+zydy \mathrm{d}z = \frac{\partial z}{\partial x} \mathrm{d}x + \frac{\partial z}{\partial y} \mathrm{d}y

定理P(x,y)P(x, y)Q(x,y)Q(x, y) 的偏导数存在且连续,则微分式 dz=P(x,y)dx+Q(x,y)dy\mathrm{d}z = P(x, y) \mathrm{d}x + Q(x, y) \mathrm{d}y 是某个函数的全微分的充要条件是 Py=Qx\displaystyle \frac{\partial P}{\partial y} = \frac{\partial Q}{\partial x}

证明.

充分性(\Rightarrow):设 dz=P(x,y)dx+Q(x,y)dy\mathrm{d}z = P(x, y) \mathrm{d}x + Q(x, y) \mathrm{d}y 是函数 f(x,y)f(x, y) 的全微分,那么

Py=yfx=2fxyQx=xfy=2fyx \begin{array}{c} \displaystyle \frac{\partial P}{\partial y} = \frac{\partial}{\partial y} \frac{\partial f}{\partial x} = \frac{\partial^2 f}{\partial x \partial y} \\ \displaystyle \frac{\partial Q}{\partial x} = \frac{\partial}{\partial x} \frac{\partial f}{\partial y} = \frac{\partial^2 f}{\partial y \partial x} \end{array}

P(x,y)P(x, y)Q(x,y)Q(x, y) 的偏导数连续,从而 2fxy\displaystyle \frac{\partial^2 f}{\partial x \partial y}2fyx\displaystyle \frac{\partial^2 f}{\partial y \partial x} 也是连续函数,连续的混合偏导数可以交换次序,因此 2fxy=2fyx\displaystyle \frac{\partial^2 f}{\partial x \partial y} = \frac{\partial^2 f}{\partial y \partial x},从而 Py=Qx\displaystyle \frac{\partial P}{\partial y} = \frac{\partial Q}{\partial x}

必要性(\Leftarrow):设 Py=Qx=g(x,y)\displaystyle \frac{\partial P}{\partial y} = \frac{\partial Q}{\partial x} = g(x, y),只需要证明对 g(x,y)g(x, y) 的二重积分 g(x,y)dxdy\displaystyle \int \int g(x, y) \mathrm{d}x \mathrm{d}yg(x,y)dydx\displaystyle \int \int g(x, y) \mathrm{d}y \mathrm{d}x 的结果相同,这样就能够找到全微分恰为 dz=P(x,y)dx+Q(x,y)dy\mathrm{d}z = P(x, y) \mathrm{d}x + Q(x, y) \mathrm{d}y 的函数 f(x,y)f(x, y)

TODO

证明细节

由充分性和必要性,得证。\blacksquare

复合函数求导法(链式法则)

定理 若二元函数 z=f(u,v)=f(φ(x,y),ψ(x,y))z = f(u, v) = f(\varphi(x, y), \psi(x, y)) 在点 (u,v)=(φ(x,y),ψ(x,y))(u, v) = (\varphi(x, y), \psi(x, y)) 处可微,并且函数 u=φ(x,y)u = \varphi(x, y)v=ψ(x,y)v = \psi(x, y) 在点 (x,y)(x, y) 的偏导数都存在,则复合函数 z=f(φ(x,y),ψ(x,y))z = f(\varphi(x, y), \psi(x, y)) 在点 (x,y)(x, y) 处的偏导数都存在,并且有:(链式法则

zx=zuux+zvvxzy=zuuy+zvvy \begin{array}{ll} \displaystyle \frac{\partial z}{\partial x} &= \displaystyle \frac{\partial z}{\partial u} \frac{\partial u}{\partial x} + \frac{\partial z}{\partial v} \frac{\partial v}{\partial x} \\ \displaystyle \frac{\partial z}{\partial y} &= \displaystyle \frac{\partial z}{\partial u} \frac{\partial u}{\partial y} + \frac{\partial z}{\partial v} \frac{\partial v}{\partial y} \end{array}

证明. 由于 z=f(u,v)z = f(u, v) 在点 (u,v)=(φ(x,y),ψ(x,y))(u, v) = (\varphi(x, y), \psi(x, y)) 处可微,因此 zz 在点 (u,v)(u, v) 处的全增量

Δz=zuΔu+zuΔv+ε1Δu+ε2Δv \Delta z = \frac{\partial z}{\partial u} \Delta u + \frac{\partial z}{\partial u} \Delta v + \varepsilon_1 \Delta u + \varepsilon_2 \Delta v

其中 limΔu0Δv0ε1=0\displaystyle \lim_{\substack{\Delta u \rightarrow 0 \\ \Delta v \rightarrow 0}} \varepsilon_1 = 0limΔu0Δv0ε2=0\displaystyle \lim_{\substack{\Delta u \rightarrow 0 \\ \Delta v \rightarrow 0}} \varepsilon_2 = 0

展开有

f(φ(x,y),ψ(x,y))f(φ(x,y),ψ(x,y))=zu(φ(x,y)φ(x,y))+zv(ψ(x,y)ψ(x,y))+ε1Δu+ε2Δv f(\varphi(x', y'), \psi(x', y')) - f(\varphi(x, y), \psi(x ,y)) = \frac{\partial z}{\partial u} (\varphi(x', y') - \varphi(x, y)) + \frac{\partial z}{\partial v} (\psi(x', y') - \psi(x, y)) + \varepsilon_1 \Delta u + \varepsilon_2 \Delta v

作换元 {φ(x,y)φ(x,y)=φ(x+Δx,y)φ(x,y)ψ(x,y)ψ(x,y)=ψ(x,y+Δy)ψ(x,y)\begin{cases}\varphi(x', y') - \varphi(x, y) = \varphi(x + \Delta x, y) - \varphi(x, y) \\ \psi(x', y') - \psi(x, y) = \psi(x, y + \Delta y) - \psi(x, y)\end{cases},有

f(φ(x+Δx,y),ψ(x+Δx,y))f(φ(x,y),ψ(x,y))=zuφ(x+Δx,y)φ(x,y)+zvψ(x,y+Δy)ψ(x,y)+ε1Δu+ε2ΔvΔxz=zuΔxu+zvΔxv+ε1Δu+ε2Δv \begin{array}{rl} \displaystyle f(\varphi(x + \Delta x, y), \psi(x + \Delta x, y)) - f(\varphi(x, y), \psi(x ,y)) &= \displaystyle \frac{\partial z}{\partial u} \varphi(x + \Delta x, y) - \varphi(x, y) + \frac{\partial z}{\partial v} \psi(x, y + \Delta y) - \psi(x, y) + \varepsilon_1 \Delta u + \varepsilon_2 \Delta v \\ \displaystyle \Delta_x z &= \displaystyle \frac{\partial z}{\partial u} \Delta_x u + \frac{\partial z}{\partial v} \Delta_x v + \varepsilon_1 \Delta u + \varepsilon_2 \Delta v \end{array}

Δx0\Delta x \rightarrow 0 时,有 Δu0\Delta u \rightarrow 0Δv0\Delta v \rightarrow 0,因此 limΔx0ε1=0\displaystyle \lim_{\Delta x \rightarrow 0} \varepsilon_1 = 0limΔx0ε2=0\displaystyle \lim_{\Delta x \rightarrow 0} \varepsilon_2 = 0

因此:

zx=limΔx0ΔxzΔx=limΔx0zuΔxu+zvΔxv+ε1Δu+ε2ΔvΔx=zulimΔx0ΔxuΔx+zvlimΔx0ΔxvΔx+0+0 \begin{array}{rl} \displaystyle \frac{\partial z}{\partial x} &= \displaystyle \lim_{\Delta x \rightarrow 0} \frac{\Delta_x z}{\Delta x} \\ &= \displaystyle \lim_{\Delta x \rightarrow 0} \frac{\frac{\partial z}{\partial u} \Delta_x u + \frac{\partial z}{\partial v} \Delta_x v + \varepsilon_1 \Delta u + \varepsilon_2 \Delta v}{\Delta x} \\ &= \displaystyle \frac{\partial z}{\partial u} \lim_{\Delta x \rightarrow 0} \frac{\Delta_x u}{\Delta x} + \frac{\partial z}{\partial v} \lim_{\Delta x \rightarrow 0} \frac{\Delta_x v}{\Delta x} + 0 + 0 \end{array}

又因为函数 u=φ(x,y)u = \varphi(x, y)v=ψ(x,y)v = \psi(x, y) 在点 (x,y)(x, y) 的偏导数都存在,因此有 limΔx0ΔxuΔx=ux\displaystyle \lim_{\Delta x \rightarrow 0} \frac{\Delta_x u}{\Delta x} = \frac{\partial u}{\partial x}limΔx0ΔxvΔx=vx\displaystyle \lim_{\Delta x \rightarrow 0} \frac{\Delta_x v}{\Delta x} = \frac{\partial v}{\partial x}

从而 zx=zuux+zvvx\displaystyle \frac{\partial z}{\partial x} = \frac{\partial z}{\partial u} \frac{\partial u}{\partial x} + \frac{\partial z}{\partial v} \frac{\partial v}{\partial x}。对 zy\displaystyle \frac{\partial z}{\partial y} 同理。\blacksquare

链式法则的图示法

链式法则可以用下图表示1

chain-rule.png

Note

复合函数的偏导,需要区分先代入后求导,或是先求导后代入。采用某些表达时,可能会造成歧义。

例如,表达式 fx(x,2x)f'_x(x, 2x) ,如果未加以说明,难以区分是下面两种情况的哪一种:

  1. 先在 f(x,y)f(x, y) 中代入 (x,2x)(x, 2x),然后对 xx 求导,即 ddx[f(x,2x)]\displaystyle \frac{d}{dx}[f(x, 2x)]
  2. 先对 f(x,y)f(x, y)xx 的偏导,然后再偏导函数 fx(x,y)f'_x(x, y) 中代入 (x,2x)(x, 2x),即 f1(x,2x)f_1'(x, 2x)

为了消歧义:

对 (1) 使用重命名,令 z=f(x,2x)z = f(x, 2x),然后使用 dzdx\displaystyle \frac{dz}{dx}

对 (2) 使用下标 _i\_ i 来表示对多元函数的第 ii 个变量求导。

同样地,对复合函数 u=F(x+y,xy)u = F(x + y, x y) ,符号 Fx\displaystyle \frac{\partial F}{\partial x} 可能会产生歧义:是 (1) 代入 (x+y,xy)(x + y, xy) 之后,FFxx 的偏导数 或是 (2) FF 对其第一个变量 x+yx + y 的偏导数,然后代入 (x+y,xy)(x + y, xy)。按上面的方法,使用:

  1. ux\displaystyle \frac{\partial u}{\partial x} 表示复合函数 u(x,y)u(x, y) 对变量 xx 的偏导数:
    • ux=F(x+y,xy)x\displaystyle \frac{\partial u}{\partial x} = \frac{\partial F(x + y, x y)} {\partial x}
  2. F1F'_1 表示 FF 对其第一个变量的偏导数:
    • F1=F(x+y,xy)(x+y)=u(x+y)F'_1 = \displaystyle \frac{\partial F(x + y, x y)}{\partial (x + y)} = \displaystyle \frac{\partial u}{\partial (x + y)}

全微分的一阶形式不变性

定理 若以 x,yx, y 为自变量的二元函数 z=f(x,y)z = f(x, y) 可微,且 z=f(x,y)z = f(x, y)x=x(u,v)x = x(u, v)y=y(u,v)y = y(u, v) 都具有连续偏导数,则复合函数 z=f(x(u,v),y(u,v))z = f(x(u, v), y(u, v)) 在点 (u,v)(u, v) 处具有连续偏导数(从而可微)并且有 dz=zudu+zvdv\displaystyle dz = \frac{\partial z}{\partial u} du + \frac{\partial z}{\partial v} dv

证明.

dz=zxdx+zydy=zx(xudu+xvdv)+zy(yudu+yvdv)=(zxxu+zyyu)du+(zxxv+zyyv)dv=zudu+zvdv \begin{array}{ll} dz &= \displaystyle \frac{\partial z}{\partial x} dx + \frac{\partial z}{\partial y} dy \\ &= \displaystyle \frac{\partial z}{\partial x} \left( \frac{\partial x}{\partial u} du + \frac{\partial x}{\partial v} dv \right) + \frac{\partial z}{\partial y} \left( \frac{\partial y}{\partial u} du + \frac{\partial y}{\partial v} dv \right) \\ &= \displaystyle \left( \frac{\partial z}{\partial x} \frac{\partial x}{\partial u} + \frac{\partial z}{\partial y} \frac{\partial y}{\partial u} \right) du + \left( \frac{\partial z}{\partial x} \frac{\partial x}{\partial v} + \frac{\partial z}{\partial y} \frac{\partial y}{\partial v} \right) dv \\ &= \displaystyle \frac{\partial z}{\partial u} du + \frac{\partial z}{\partial v} dv \end{array}

这指出求微分对任何的 (,)(\triangle, \square) 都能得到相同形式的结果,无论 {=x=y\begin{cases}\triangle = x \\ \square = y\end{cases} 还是多么复杂的表达式。

d (expr)=(expr)d+(expr)d d\ (\text{expr}) = \frac{\partial}{\partial \triangle}(\text{expr}) d\triangle + \frac{\partial}{\partial \square}(\text{expr}) d\square

这也是可以对一个等式两边求全微分的依据。

隐函数求导法则

由单个方程确定的隐函数

方程 F(x,y,z)=0F(x, y, z) = 0 确定隐函数 z=z(x,y)z = z(x, y) \Leftrightarrow F(x,y,z(x,y))0F(x, y, z(x, y)) \equiv 0

定理 设函数 F(x,y,z)F(x, y, z) 在点 P0(x0,y0,z0)P_0(x_0, y_0, z_0) 的某个邻域内存在连续偏导数, 且 F(x0,y0,z0)=0F(x_0, y_0, z_0) = 0Fz(x0,y0,z0)0F'_z(x_0, y_0, z_0) \neq 0,那么方程 F(x,y,z)=0F(x, y, z) = 0 在点 P0(x0,y0,z0)P_0(x_0, y_0, z_0) 的某个邻域内始终能够唯一确定隐函数 z=f(x,y)z = f(x, y),且这个隐函数具有连续偏导数,满足 z0=f(x0,y0)z_0 = f(x_0, y_0) 以及 zx=FxFz\displaystyle \frac{\partial z}{\partial x} = -\frac{F'_x}{F'_z}zy=FyFz\displaystyle \frac{\partial z}{\partial y} = -\frac{F'_y}{F'_z}。(隐函数存在定理

证明.

F(x,y,z(x,y))0F(x, y, z(x, y)) \equiv 0 两边对 xx 求偏导数,应用复合函数的求导法则,有 Fxxx+Fzzx=0\displaystyle F'_x \frac{\partial x}{\partial x} + F'_z \frac{\partial z}{\partial x} = 0,因而 zx=FxFz\displaystyle \frac{\partial z}{\partial x} = -\frac{F'_x}{F'_z}。这里 FzF'_z 能够放在分母的位置是由于在 P0P_0 点连续函数 Fz(P0)0F'_z(P_0) \neq 0,这样就能够保证在 P0P_0 点某邻域内 FzF'_z 不为 00

yy 同理,有 zy=FyFz\displaystyle \frac{\partial z}{\partial y} = -\frac{F'_y}{F'_z}

偏导数 zx\displaystyle \frac{\partial z}{\partial x}zy\displaystyle \frac{\partial z}{\partial y}P0P_0 点连续是因为连续函数的四则运算结果仍然是连续函数。\blacksquare

实际的应用中,求解隐函数的偏导数时,通常也是直接对方程两边求偏导数,然后解方程。(或者也可以通过两边取全微分)

(*)由方程组确定的隐函数组

方程组 {F(x,y,u,v)=0G(x,y,u,v)=0\begin{cases}F(x, y, u, v) = 0 \\ G(x, y, u, v) = 0\end{cases} 确定隐函数组 {u=u(x,y)v=v(x,y)\begin{cases}u = u(x, y) \\ v = v(x, y)\end{cases} \Leftrightarrow {F(x,y,u(x,y),v(x,y))0G(x,y,u(x,y),v(x,y))0\begin{cases}F(x, y, u(x, y), v(x, y)) \equiv 0 \\ G(x, y, u(x, y), v(x, y)) \equiv 0\end{cases}

定理 设函数 F(x,y,u,v)F(x, y, u, v)G(x,y,u,v)G(x, y, u, v) 在点 P0(x0,y0,u0,v0)P_0(x_0, y_0, u_0, v_0) 的某个邻域内存在连续偏导数, 且 {F(x0,y0,u0,v0)=0G(x0,y0,u0,v0)=0\begin{cases}F(x_0, y_0, u_0, v_0) = 0 \\ G(x_0, y_0, u_0, v_0) = 0\end{cases},并且二阶雅可比行列式 J=(F,G)(u,v)=FuFvGuGv0\displaystyle J = \frac{\partial (F, G)}{\partial (u, v)} = \begin{vmatrix} \frac{\partial F}{\partial u} & \frac{\partial F}{\partial v} \\ \frac{\partial G}{\partial u} & \frac{\partial G}{\partial v} \end{vmatrix} \neq 0,那么方程组 {F(x,y,u,v)=0G(x,y,u,v)=0\begin{cases}F(x, y, u, v) = 0 \\ G(x, y, u, v) = 0\end{cases} 在点 P0(x0,y0,u0,v0)P_0(x_0, y_0, u_0, v_0) 的某个邻域内始终能够唯一确定隐函数组 {u=u(x,y)v=v(x,y)\begin{cases}u = u(x, y) \\ v = v(x, y)\end{cases},且它们具有连续偏导数,满足 {u0=u(x0,y0)v0=v(x0,y0)\begin{cases}u_0 = u(x_0, y_0) \\ v_0 = v(x_0, y_0)\end{cases} 以及

ux=(F,G)(x,v)(F,G)(u,v)uy=(F,G)(y,v)(F,G)(u,v)vx=(F,G)(u,x)(F,G)(u,v)vy=(F,G)(u,y)(F,G)(u,v) \begin{array}{cc} \displaystyle \frac{\partial u}{\partial x} = -\frac{\frac{\partial (F, G)}{\partial (x, v)}}{\frac{\partial (F, G)}{\partial (u, v)}} & \displaystyle \frac{\partial u}{\partial y} = -\frac{\frac{\partial (F, G)}{\partial (y, v)}}{\frac{\partial (F, G)}{\partial (u, v)}} \\ \displaystyle \frac{\partial v}{\partial x} = -\frac{\frac{\partial (F, G)}{\partial (u, x)}}{\frac{\partial (F, G)}{\partial (u, v)}} & \displaystyle \frac{\partial v}{\partial y} = -\frac{\frac{\partial (F, G)}{\partial (u, y)}}{\frac{\partial (F, G)}{\partial (u, v)}} \end{array}

证明. 对方程组两边同时对 xx 求偏导数,有

{Fx+Fuux+Fvvx=0Gx+Guux+Gvvx=0 \begin{cases} \displaystyle \frac{\partial F}{\partial x} + \frac{\partial F}{\partial u} \frac{\partial u}{\partial x} + \frac{\partial F}{\partial v} \frac{\partial v}{\partial x} = 0 \\ \displaystyle \frac{\partial G}{\partial x} + \frac{\partial G}{\partial u} \frac{\partial u}{\partial x} + \frac{\partial G}{\partial v} \frac{\partial v}{\partial x} = 0 \end{cases}

整理可得

[FuGu]ux+[FvGv]vx=[FxGx] \begin{bmatrix} \displaystyle \frac{\partial F}{\partial u} \\ \displaystyle \frac{\partial G}{\partial u} \end{bmatrix} \frac{\partial u}{\partial x} + \begin{bmatrix} \displaystyle \frac{\partial F}{\partial v} \\ \displaystyle \frac{\partial G}{\partial v} \end{bmatrix} \frac{\partial v}{\partial x} =- \begin{bmatrix} \displaystyle \frac{\partial F}{\partial x} \\ \displaystyle \frac{\partial G}{\partial x} \end{bmatrix}

运用克莱姆法则解关于 (ux,vx)\displaystyle (\frac{\partial u}{\partial x}, \frac{\partial v}{\partial x}) 的线性方程组,有:

{ux=FxFvGxGvFuFvGuGv=(F,G)(x,v)(F,G)(u,v)vx=FuFxGuGxFuFvGuGv=(F,G)(u,x)(F,G)(u,v) \begin{cases} \displaystyle \frac{\partial u}{\partial x} = \frac{-\begin{vmatrix}\frac{\partial F}{\partial x} & \frac{\partial F}{\partial v} \\ \frac{\partial G}{\partial x} & \frac{\partial G}{\partial v}\end{vmatrix}}{\quad \begin{vmatrix}\frac{\partial F}{\partial u} & \frac{\partial F}{\partial v} \\ \frac{\partial G}{\partial u} & \frac{\partial G}{\partial v}\end{vmatrix}} = -\frac{\displaystyle \frac{\partial(F, G)}{\partial (x, v)}}{\displaystyle \frac{\partial(F, G)}{\partial (u, v)}} \\ \\ \displaystyle \frac{\partial v}{\partial x} = \frac{-\begin{vmatrix}\frac{\partial F}{\partial u} & \frac{\partial F}{\partial x} \\ \frac{\partial G}{\partial u} & \frac{\partial G}{\partial x}\end{vmatrix}}{\quad \begin{vmatrix}\frac{\partial F}{\partial u} & \frac{\partial F}{\partial v} \\ \frac{\partial G}{\partial u} & \frac{\partial G}{\partial v}\end{vmatrix}} = -\frac{\displaystyle \frac{\partial(F, G)}{\partial (u, x)}}{\displaystyle \frac{\partial(F, G)}{\partial (u, v)}} \end{cases}

yy 求偏导的情况类似;有关解的存在性的证明、连续性的证明与由单个方程确定的隐函数类似。\blacksquare

(*)场的方向导数与梯度

数量场的方向导数

设数量场 u(x,y,z)u(x, y, z) 在点 P0(x0,y0,z0)P_0(x_0, y_0, z_0) 的某邻域 U(P0)R3U(P_0) \subset \mathbb{R}^3 有定义,l\overrightarrow{l} 是与 xx 轴正向夹角为 α\alpha,与 yy 轴正向夹角为 β\beta,与 zz 轴正向夹角为 γ\gamma 的单位向量,P(x,y,z)P(x, y, z)U(P0)U(P_0) 内满足 P0P=λl\overrightarrow{P_0 P} = \lambda \overrightarrow{l}λ>0\lambda > 0)的任意一点,那么称

limλ0u(P)u(P0)λ=limλ0Δluλ \lim_{\lambda \rightarrow 0} \frac{u(P) - u(P_0)}{\lambda} = \lim_{\lambda \rightarrow 0} \frac{\Delta_{\mathbf{l}}u}{\lambda}

为数量场 u(x,y,z)u(x, y, z) 在点 P0P_0 沿方向 l\overrightarrow{l} 的方向导数,记作 ulP0\displaystyle \frac{\partial u}{\partial l}\Bigg|_{P_0}

可微 \Rightarrow 任意方向的方向导数存在,有以下定理:

定理 若函数 u(x,y,z)u(x, y, z) 在点 P0(x0,y0,z0)P_0(x_0, y_0, z_0) 可微,则函数 u(x,y,z)u(x, y, z) 在点 P0P_0 沿任意方向 l\overrightarrow{l} 的方向导数存在,且有

ulP0=uxP0cosα+uyP0cosβ+uzP0cosγ \frac{\partial u}{\partial l}\Bigg|_{P_0} = \frac{\partial u}{\partial x}\Bigg|_{P_0} \cos \alpha + \frac{\partial u}{\partial y}\Bigg|_{P_0} \cos \beta + \frac{\partial u}{\partial z}\Bigg|_{P_0} \cos \gamma

其中 α\alphaβ\betaγ\gamma 分别是 l\overrightarrow{l}xxyyzz 轴正向的夹角(即 ll=(cosα,cosβ,cosγ)\displaystyle \frac{\overrightarrow{l}}{|\overrightarrow{l}|} = (\cos \alpha, \cos \beta, \cos \gamma))。

证明.

由于函数 u(x,y,z)u(x, y, z) 在点 P0P_0 可微,因此对于 U(P0)U(P_0) 内满足 P0P=λl\overrightarrow{P_0 P} = \lambda \overrightarrow{l}λ>0\lambda > 0)的任意一点 P(x,y,z)P(x, y, z),都有

{u(P)u(P0)=u(x0+Δx,y0+Δy,z0+Δz)u(x0,y0,z0)=ΔuΔu=uxP0Δx+uyP0Δy+uzP0Δz+ο((Δx)2+(Δy)2+(Δz)2)Δx(Δx)2+(Δy)2+(Δz)2=cosαΔy(Δx)2+(Δy)2+(Δz)2=cosβΔz(Δx)2+(Δy)2+(Δz)2=cosγ \begin{cases} \displaystyle u(P) - u(P_0) = u(x_0 + \Delta x, y_0 + \Delta y, z_0 + \Delta z) - u(x_0, y_0, z_0) = \Delta u \\ \displaystyle \Delta u = \frac{\partial u}{\partial x}\Bigg|_{P_0} \Delta x + \frac{\partial u}{\partial y}\Bigg|_{P_0} \Delta y + \frac{\partial u}{\partial z}\Bigg|_{P_0} \Delta z + \omicron(\sqrt{(\Delta x)^2 + (\Delta y)^2 + (\Delta z)^2}) \\ \displaystyle \frac{\Delta x}{\sqrt{(\Delta x)^2 + (\Delta y)^2 + (\Delta z)^2}} = \cos \alpha \\ \displaystyle \frac{\Delta y}{\sqrt{(\Delta x)^2 + (\Delta y)^2 + (\Delta z)^2}} = \cos \beta \\ \displaystyle \frac{\Delta z}{\sqrt{(\Delta x)^2 + (\Delta y)^2 + (\Delta z)^2}} = \cos \gamma \end{cases}

因此

limΔx0Δy0Δz0Δu(Δx)2+(Δy)2+(Δz)2=uxP0cosα+uyP0cosβ+uzP0cosγ \lim_{\substack{\Delta x \rightarrow 0 \\ \Delta y \rightarrow 0 \\ \Delta z \rightarrow 0}} \frac{\Delta u}{\sqrt{(\Delta x)^2 + (\Delta y)^2 + (\Delta z)^2}} = \frac{\partial u}{\partial x}\Bigg|_{P_0} \cos \alpha + \frac{\partial u}{\partial y}\Bigg|_{P_0} \cos \beta + \frac{\partial u}{\partial z}\Bigg|_{P_0} \cos \gamma

由于当 Δx0\Delta x \rightarrow 0Δy0\Delta y \rightarrow 0Δz0\Delta z \rightarrow 0 时,λ0\lambda \rightarrow 0,因此有

ulP0=limλ0Δuλ=limΔx0Δy0Δz0Δu(Δx)2+(Δy)2+(Δz)2=uxP0cosα+uyP0cosβ+uzP0cosγ \begin{array}{rl} \displaystyle \frac{\partial u}{\partial l}\Bigg|_{P_0} &= \displaystyle \lim_{\lambda \rightarrow 0} \frac{\Delta u}{\lambda} \\ &= \displaystyle \lim_{\substack{\Delta x \rightarrow 0 \\ \Delta y \rightarrow 0 \\ \Delta z \rightarrow 0}} \frac{\Delta u}{\sqrt{(\Delta x)^2 + (\Delta y)^2 + (\Delta z)^2}} \\ &= \displaystyle \frac{\partial u}{\partial x}\Bigg|_{P_0} \cos \alpha + \frac{\partial u}{\partial y}\Bigg|_{P_0} \cos \beta + \frac{\partial u}{\partial z}\Bigg|_{P_0} \cos \gamma \qquad \blacksquare \end{array}

任意方向方向导数存在 \nRightarrow 连续任意方向方向导数存在 \nRightarrow 可微,例如函数 u(x,y)={1,0<x<y20,otherwiseu(x, y) = \begin{cases}\displaystyle 1, & 0 < x < y^2 \\0, & \text{otherwise}\end{cases},在点 (0,0)(0, 0) 处不连续,不可微,但在点 (0,0)(0, 0) 处沿任意方向的方向导数都存在。

取路径上任意一点都满足 0<x<y20 < x < y^2 的路径,lim(x,y)(0,0)u(x,y)=1\displaystyle \lim_{(x, y) \rightarrow (0, 0)} u(x, y) = 1;取路径上任意一点都不满足 0<x<y20 < x < y^2 的路径,lim(x,y)(0,0)u(x,y)=0\displaystyle \lim_{(x, y) \rightarrow (0, 0)} u(x, y) = 0。从而极限不存在,从而函数在点 (0,0)(0, 0) 处不连续。因此函数在 (0,0)(0, 0) 处不可微。

而函数 u(x,y)u(x, y)(0,0)(0, 0) 处沿着任意方向的方向导数 limλ0u(λcosα,λsinα)u(0,0)λ=limλ000λ=0\displaystyle \lim_{\lambda \rightarrow 0} \frac{u(\lambda \cos \alpha, \lambda \sin \alpha) - u(0, 0)}{\lambda} = \lim_{\lambda \rightarrow 0} \frac{0 - 0}{\lambda} = 0

Note

考虑 x=λcosα>0x = \lambda \cos \alpha > 0 时,总是可以取 λ\lambda 足够小,使得 λ<cosαsin2α\displaystyle \lambda < \frac{\cos \alpha}{\sin^2 \alpha}(由于 λ\lambdaα\alpha 相互独立,而 α\alpha 是确定的),从而 λcosα>(λsinα)2\lambda \cos \alpha > (\lambda \sin \alpha)^2,从而 u(λcosα,λsinα)=0u(\lambda \cos \alpha, \lambda \sin \alpha) = 0

Note

此处不能使用偏导数均存在来论证函数沿各方向的方向导数存在。

任意方向方向导数存在 \nRightarrow 偏导数均存在。例如函数 u(x,y)=x2+y2u(x, y) = \sqrt{x^2 + y^2},该函数在 (0,0)(0, 0) 处的偏导数均不存在,但函数在 (0,0)(0, 0) 处沿任意方向的方向导数都存在:limλ0u(λcosα,λsinα)u(0,0)λ=limλ0λλ=1\displaystyle \lim_{\lambda \rightarrow 0} \frac{u(\lambda \cos \alpha, \lambda \sin \alpha) - u(0, 0)}{\lambda} = \lim_{\lambda \rightarrow 0} \frac{\lambda}{\lambda} = 1

Note

对于不可微的函数,不一定满足 ulP0=uxP0cosα+uyP0cosβ\displaystyle \frac{\partial u}{\partial l}\Bigg|_{P_0} = \displaystyle \frac{\partial u}{\partial x}\Bigg|_{P_0} \cos \alpha + \frac{\partial u}{\partial y}\Bigg|_{P_0} \cos \beta。这是为什么这个函数在 (0,0)(0, 0) 处任意方向的方向导数都存在,但偏导数不存在的原因。

在几何意义上,沿 xx 轴正方向的方向导数和函数对 xx 的偏导数也是不同的。前者只要求从一个方向逼近时的切线斜率(单侧极限),而后者要求两个方向逼近时的切线斜率都要相同(左右极限相同)。

各个偏导数均存在 \nRightarrow 所有方向导数存在。例如函数 u(x,y)={1,xy=00,otherwiseu(x, y) = \begin{cases}\displaystyle 1, & x\cdot y = 0 \\0, & \text{otherwise}\end{cases},在点 (0,0)(0, 0) 处所有偏导数均存在,但函数在 (0,0)(0, 0) 处沿不平行于任意坐标轴的方向的方向导数不存在。

数量场的梯度

ulP0=uxP0cosα+uyP0cosβ+uzP0cosγ=(uxP0,uyP0,uzP0)(cosα,cosβ,cosγ)=(ux,uy,uz)P0(cosα,cosβ,cosγ) \begin{array}{ll} \displaystyle \frac{\partial u}{\partial l}\Bigg|_{P_0} &= \displaystyle \frac{\partial u}{\partial x}\Bigg|_{P_0} \cos \alpha + \frac{\partial u}{\partial y}\Bigg|_{P_0} \cos \beta + \frac{\partial u}{\partial z}\Bigg|_{P_0} \cos \gamma \\ &= \displaystyle \left( \frac{\partial u}{\partial x}\Bigg|_{P_0}, \frac{\partial u}{\partial y}\Bigg|_{P_0}, \frac{\partial u}{\partial z}\Bigg|_{P_0} \right) \cdot \left( \cos \alpha, \cos \beta, \cos \gamma \right) \\ &= \displaystyle \left( \frac{\partial u}{\partial x}, \frac{\partial u}{\partial y}, \frac{\partial u}{\partial z} \right)\Bigg|_{P_0} \cdot \left( \cos \alpha, \cos \beta, \cos \gamma \right) \end{array}

定义 u:=(ux,uy,uz)\displaystyle \nabla u := \left( \frac{\partial u}{\partial x}, \frac{\partial u}{\partial y}, \frac{\partial u}{\partial z} \right) 为函数 u(x,y,z)u(x, y, z) 的梯度(函数),u(P0)\nabla u(P_0) 为函数 u(x,y,z)u(x, y, z) 在点 P0P_0 处的梯度()。从而 ulP0=u(P0)el\displaystyle \frac{\partial u}{\partial l}\Bigg|_{P_0} = \nabla u(P_0) \cdot \overrightarrow{e}_l,其中 el=(cosα,cosβ,cosγ)\overrightarrow{e}_l = (\cos \alpha, \cos \beta, \cos \gamma) 是与 l\overrightarrow{l} 同方向的单位向量。

ulP0=u(P0)el=u(P0)cosθ\displaystyle \frac{\partial u}{\partial l}\Bigg|_{P_0} = \nabla u(P_0) \cdot \overrightarrow{e}_l = |\nabla u(P_0)| \cos \theta,其中 θ\thetau(P0)\nabla u(P_0)l\overrightarrow{l} 的夹角,知 u(P0)\nabla u(P_0) 的方向是函数 u(x,y,z)u(x, y, z) 在点 P0P_0 处方向导数最大的方向(此时 cosθ=1\cos \theta = 1),该方向导数的值为 u(P0)|\nabla u(P_0)|

多元函数的泰勒公式

定理 若函数 u=f(x,y)u = f(x, y) 在点 P0(x0,y0)P_0(x_0, y_0) 的某邻域 U(P0)U(P_0) 内具有 n+1n + 1 阶连续偏导数,则有(多元函数的泰勒定理

f(x0+h,y0+k)=f(x0,y0)+(hx+ky)f(x0,y0)+12!(hx+ky)2f(x0,y0)+13!(hx+ky)3f(x0,y0)++1n!(hx+ky)nf(x0,y0)+1(n+1)!(hx+ky)n+1f(x0+θh,y0+θk) \begin{array}{rl} \displaystyle f(x_0 + h, y_0 + k) &= \displaystyle f(x_0, y_0) + \left(h \frac{\partial}{\partial x} + k\frac{\partial}{\partial y} \right)f(x_0, y_0) \\ &+ \displaystyle \frac{1}{2!} \left(h \frac{\partial}{\partial x} + k\frac{\partial}{\partial y} \right)^2 f(x_0, y_0) \\ &+ \displaystyle \frac{1}{3!} \left(h \frac{\partial}{\partial x} + k\frac{\partial}{\partial y} \right)^3 f(x_0, y_0) + \cdots \\ &+ \displaystyle \frac{1}{n!} \left(h \frac{\partial}{\partial x} + k\frac{\partial}{\partial y} \right)^n f(x_0, y_0) \\ &+ \displaystyle \frac{1}{(n + 1)!} \left(h \frac{\partial}{\partial x} + k\frac{\partial}{\partial y} \right)^{n + 1} f(x_0 + \theta h, y_0 + \theta k) \end{array}

其中,θ(0,1)\theta \in (0, 1)(hx+ky)n\displaystyle \left(h \frac{\partial}{\partial x} + k\frac{\partial}{\partial y} \right)^n 按多项式展开,例如 (hx+ky)2=h22x2+2hk2xy+k22y2\displaystyle \left(h \frac{\partial}{\partial x} + k\frac{\partial}{\partial y} \right)^2 = h^2 \frac{\partial^2}{\partial x^2} + 2hk \frac{\partial^2}{\partial x \partial y} + k^2 \frac{\partial^2}{\partial y^2}(连续的混合偏导数可以交换求偏导的顺序)。

证明.

ψ(t)=f(x0+th,y0+tk)\psi(t) = f(x_0 + th, y_0 + tk),则 ψ(0)=f(x0,y0)\psi(0) = f(x_0, y_0)ψ(1)=f(x0+h,y0+k)\psi(1) = f(x_0 + h, y_0 + k)

ψ(t)=ddtf(x0+th,y0+tk)=(hx+ky)f(x0+th,y0+tk)ψ(t)==(hx+ky)2f(x0+th,y0+tk)ψ(n)(t)==(hx+ky)nf(x0+th,y0+tk) \begin{array}{lcl} \psi'(t) =& \displaystyle \frac{d}{dt} f(x_0 + th, y_0 + tk) &= \displaystyle \left(h \frac{\partial}{\partial x} + k \frac{\partial}{\partial y}\right)f(x_0 + th, y_0 + tk) \\ \psi''(t) =& \dots &= \displaystyle \left(h \frac{\partial}{\partial x} + k \frac{\partial}{\partial y}\right)^2 f(x_0 + th, y_0 + tk) \\ \psi^{(n)}(t) =& \dots &= \displaystyle \left(h \frac{\partial}{\partial x} + k \frac{\partial}{\partial y}\right)^n f(x_0 + th, y_0 + tk) \\ \end{array}

由一元函数的泰勒定理,存在 θ(0,1)\theta \in (0, 1),使得

ψ(1)=ψ(0)+11!ψ(0)(10)1+12!ψ(0)(10)2++1n!ψ(n)(0)(10)n+1(n+1)!ψ(n+1)(θ)(10)n+1=ψ(0)+11!ψ(0)+12!ψ(0)++1n!ψ(n)(0)+1(n+1)!ψ(n+1)(θ) \begin{array}{ll} \displaystyle \psi(1) &= \displaystyle \psi(0) + \frac{1}{1!} \psi'(0)\cdot(1 - 0)^1 + \frac{1}{2!} \psi''(0)\cdot(1 - 0)^2 + \cdots + \frac{1}{n!} \psi^{(n)}(0)\cdot(1 - 0)^n + \frac{1}{(n + 1)!} \psi^{(n + 1)}(\theta) \cdot (1 - 0)^{n + 1} \\ &= \displaystyle \psi(0) + \frac{1}{1!} \psi'(0) + \frac{1}{2!} \psi''(0) + \cdots + \frac{1}{n!} \psi^{(n)}(0) + \frac{1}{(n + 1)!} \psi^{(n + 1)}(\theta) \end{array}

将上述 ψ(t)(m)\psi(t)^{(m)} 全部代入一元函数的泰勒定理,即得

f(x0+h,y0+k)=f(x0,y0)+(hx+ky)f(x0,y0)+12!(hx+ky)2f(x0,y0)++1n!(hx+ky)nf(x0,y0)+1(n+1)!(hx+ky)n+1f(x0+θh,y0+θk)\begin{array}{rl} \displaystyle f(x_0 + h, y_0 + k) &= \displaystyle f(x_0, y_0) + \left(h \frac{\partial}{\partial x} + k\frac{\partial}{\partial y} \right)f(x_0, y_0) \\ &+ \displaystyle \frac{1}{2!} \left(h \frac{\partial}{\partial x} + k\frac{\partial}{\partial y} \right)^2 f(x_0, y_0) + \cdots \\ &+ \displaystyle \frac{1}{n!} \left(h \frac{\partial}{\partial x} + k\frac{\partial}{\partial y} \right)^n f(x_0, y_0) \\ &+ \displaystyle \frac{1}{(n + 1)!} \left(h \frac{\partial}{\partial x} + k\frac{\partial}{\partial y} \right)^{n + 1} f(x_0 + \theta h, y_0 + \theta k) \quad \blacksquare \end{array}

n=0n = 0,即可得到二元函数的拉格朗日中值定理

f(x0+h,y0+k)f(x0,y0)=hfx(x0+θh,y0+θk)+kfy(x0+θh,y0+θk) f(x_0 + h, y_0 + k) - f(x_0, y_0) = h f'_x(x_0 + \theta h, y_0 + \theta k) + k f'_y(x_0 + \theta h, y_0 + \theta k)

其中 θ(0,1)\theta \in (0, 1)。可以用此定理证明一个二元函数在某个区域 GG 内是否是仅关于 xxyy 或常值的函数。

多元函数的极值与最值

多元函数的无条件极值

定义 设函数 z=f(x,y)z = f(x, y) 在点 P0(x0,y0)P_0(x_0, y_0) 的某邻域 U(P0)U(P_0) 内有定义,如果对于 U(P0)U(P_0) 内任意点 (x,y)(x, y),都有 f(x,y)f(x0,y0)f(x, y) \leq f(x_0, y_0),则称 f(x0,y0)f(x_0, y_0) 是函数 f(x,y)f(x, y) 在点 P0P_0 的一个极大值;如果对于 U(P0)U(P_0) 内任意点 (x,y)(x, y),都有 f(x,y)f(x0,y0)f(x, y) \geq f(x_0, y_0),则称 f(x0,y0)f(x_0, y_0) 是函数 f(x,y)f(x, y) 在点 P0P_0 的一个极小值。极大值和极小值统称为极值。取极大值和极小值的点称为极值点

定理 如果函数 z=f(x,y)z = f(x, y) 在点 P0(x0,y0)P_0(x_0, y_0) 存在偏导数,且在点 P0P_0 取得极值,那么 fx(x0,y0)=0f'_x(x_0, y_0) = 0fy(x0,y0)=0f'_y(x_0, y_0) = 0。(极值的必要条件,满足条件 fx(x0,y0)=0f'_x(x_0, y_0) = 0fy(x0,y0)=0f'_y(x_0, y_0) = 0 的点被称为 驻点

证明. 证明极大值的情况,极小值类似:

根据定义,存在某邻域 U(P0)U(P_0),使得对于 U(P0)U(P_0) 内任意点 (x,y)(x, y),都有 f(x,y)f(x0,y0)f(x, y) \leq f(x_0, y_0)。由于偏导数 fx(x0,y0)f'_x(x_0, y_0) 存在,假设偏导数的值为 A0A \neq 0,对于任意给定正数 ε\varepsilon,不妨令其为 A|A|,都应当存在 δ>0\delta > 0,使得当 0<Δx<δ0 < |\Delta x| < \delta 时,有

f(x0+Δx,y0)f(x0,y0)ΔxAεAAf(x0+Δx,y0)f(x0,y0)ΔxA+AAAf(x0+Δx,y0)f(x0,y0)1ΔxA+Af(x0+Δx,y0)f(x0,y0) \begin{array}{cc} \displaystyle \left| \frac{f(x_0 + \Delta x, y_0) - f(x_0, y_0)}{\Delta x} - A \right| \leq \varepsilon \\ \displaystyle A - |A| \leq \frac{f(x_0 + \Delta x, y_0) - f(x_0, y_0)}{\Delta x} \leq A + |A| \\ \displaystyle \frac{A - |A|}{f(x_0 + \Delta x, y_0) - f(x_0, y_0)} \leq \frac{1}{\Delta x} \leq \frac{A + |A|}{f(x_0 + \Delta x, y_0) - f(x_0, y_0)} \end{array}

这是不可能满足的,因为这个不等式要求当 0<Δx<δ0 < |\Delta x| < \delta 时,1Δx\displaystyle \frac{1}{\Delta x} 非负(或者非正,取决于具体的 AA). 因此 A=0A = 0,即 fx(x0,y0)=0f'_x(x_0, y_0) = 0。同理可证 fy(x0,y0)=0f'_y(x_0, y_0) = 0\blacksquare

定理 设函数 z=f(x,y)z = f(x, y) 在点 P0(x0,y0)P_0(x_0, y_0) 的某邻域 U(P0)U(P_0) 内连续、且具有二阶连续偏导数,如果有 fx(x0,y0)=0f_{x}(x_0, y_0) = 0fy(x0,y0)=0f_{y}(x_0, y_0) = 0,并且 A=fxx(x0,y0)A = f''_{xx}(x_0, y_0)B=fxy(x0,y0)B = f''_{xy}(x_0, y_0)C=fyy(x0,y0)C = f''_{yy}(x_0, y_0) 满足:(极值的充分条件

  • ABBC>0\begin{vmatrix} A & B \\ B & C \end{vmatrix} > 0,则点 P0P_0 是函数 f(x,y)f(x, y) 的极值点,且是极大值点或极小值点,取决于 AA 的正负性(或 CC 的正负性,这两项在这个条件下必然同号):
  • A>0A > 0,则 P0P_0 是极小值点;
  • A<0A < 0,则 P0P_0 是极大值点;
  • ABBC<0\begin{vmatrix} A & B \\ B & C \end{vmatrix} < 0,则点 P0P_0 不是函数 f(x,y)f(x, y) 的极值点;
  • ABBC=0\begin{vmatrix} A & B \\ B & C \end{vmatrix} = 0,不能断定点 P0P_0 是否是函数 f(x,y)f(x, y) 的极值点。

证明. 泰勒展开至 22 阶导数,对 U(P0)U(P_0) 内任意的点 P(x0+h,y0+k)P(x_0 + h, y_0 + k),存在 θ(0,1)\theta \in (0, 1),使得

f(x0+h,y0+k)=f(x0,y0)+(hx+ky)f(x0,y0)+12!(hx+ky)2f(x0+θh,y0+θk)=f(x0,y0)+12!(hx+ky)2f(x0+θh,y0+θk)\begin{array}{rl} \displaystyle f(x_0 + h, y_0 + k) &= \displaystyle f(x_0, y_0) + \left(h \frac{\partial}{\partial x} + k\frac{\partial}{\partial y} \right)f(x_0, y_0) \\ &+ \displaystyle \frac{1}{2!} \left(h \frac{\partial}{\partial x} + k\frac{\partial}{\partial y} \right)^2 f(x_0 + \theta h, y_0 + \theta k) \\ &= \displaystyle f(x_0, y_0) + \frac{1}{2!} \left(h \frac{\partial}{\partial x} + k\frac{\partial}{\partial y} \right)^2 f(x_0 + \theta h, y_0 + \theta k) \end{array}

h0h \to 0k0k \to 0 时,有 x0+θhx0x_0 + \theta h \to x_0y0+θky0y_0 + \theta k \to y_0,由于 f(x,y)f(x, y) 在点 P0P_0 处连续,因此有 f(x0+θh,y0+θk)f(x0,y0)f(x_0 + \theta h, y_0 + \theta k) \to f(x_0, y_0)。此时有

f(x0+h,y0+k)f(x0,y0)12!(hx+ky)2f(x0,y0)=12!(h2fxx(x0,y0)+2hkfxy(x0,y0)+k2fyy(x0,y0))=(Ah2+2Bhk+Ck2)=[hk][ABBC][hk] \begin{array}{rl} f(x_0 + h, y_0 + k) - f(x_0, y_0) &\sim \displaystyle \frac{1}{2!} \left(h \frac{\partial}{\partial x} + k\frac{\partial}{\partial y} \right)^2 f(x_0, y_0) \\ &= \displaystyle \frac{1}{2!} (h^2 f''_{xx}(x_0, y_0) + 2hk f''_{xy}(x_0, y_0) + k^2 f''_{yy}(x_0, y_0)) \\ &= \displaystyle (A h^2 + 2Bhk + Ck^2) \\ &= \begin{bmatrix} h & k \end{bmatrix} \begin{bmatrix} A & B \\ B & C \end{bmatrix} \begin{bmatrix} h \\ k \end{bmatrix} \end{array}

根据极限的保号性和二次型的正定性,可以得到结论:

(1) 当二次型矩阵 [ABBC]\begin{bmatrix} A & B \\ B & C \end{bmatrix} 顺序主子式 A\begin{vmatrix} A \end{vmatrix}ABBC\begin{vmatrix} A & B \\ B & C \end{vmatrix} 均大于 00,即 A>0A > 0 并且 ACB2>0AC - B^2 > 0,该二次型正定,从而 f(x0+h,y0+k)f(x0,y0)>0f(x_0 + h, y_0 + k) - f(x_0, y_0) > 0P0P_0 是极小值点;

(2) 当二次型矩阵 [ABBC]\begin{bmatrix} A & B \\ B & C \end{bmatrix} 顺序主子式 A\begin{vmatrix} A \end{vmatrix}ABBC\begin{vmatrix} A & B \\ B & C \end{vmatrix}(1)k(-1)^k 同号,即 A<0A < 0 并且 ACB2>0AC - B^2 > 0,该二次型负定,从而 f(x0+h,y0+k)f(x0,y0)<0f(x_0 + h, y_0 + k) - f(x_0, y_0) < 0P0P_0 是极大值点;

(3) 当 ABBC<0\begin{vmatrix} A & B \\ B & C \end{vmatrix} < 0 ,二次型矩阵 [ABBC]\begin{bmatrix} A & B \\ B & C \end{bmatrix} 的特征值 λ1λ2=ACB2<0\lambda_1 \lambda_2 = AC - B^2 < 0。由于实对称矩阵总是可以使用正交矩阵对角化,有 [ABBC]T[λ100λ2]\begin{bmatrix} A & B \\ B & C \end{bmatrix} \overset{T}{\sim} \begin{bmatrix} \lambda_1 & 0 \\ 0 & \lambda 2 \end{bmatrix},从而二次型不定,f(x0+h,y0+k)f(x0,y0)f(x_0 + h, y_0 + k) - f(x_0, y_0) 的符号与 hhkk 的取值有关,P0P_0 不是极值点;

(4) 当 ABBC=0\begin{vmatrix} A & B \\ B & C \end{vmatrix} = 0,由于实对称矩阵总是可以使用正交矩阵对角化,有 [ABBC]T[tr([ABBC])000]\begin{bmatrix} A & B \\ B & C \end{bmatrix} \overset{T}{\sim} \begin{bmatrix} \text{tr} \left(\scriptscriptstyle \begin{bmatrix} A & B \\ B & C \end{bmatrix} \right) & 0 \\ 0 & 0 \end{bmatrix},二次型的正定性与二次型矩阵的迹有关,凭此可判断 P0P_0 是极小值点(二次型正定)还是极大值点(二次型负定)。\blacksquare

Note

这里的矩阵 [ABBC]\begin{bmatrix} A & B \\ B & C \end{bmatrix} 的名字叫做 Hessian 矩阵。结论可以推广至有限的 nn 维形式。

多元函数的条件最值(拉格朗日乘数法)

ffGG 都有连续偏导数时,求解 f(x,y,z)f(x, y, z) 在约束条件 G(x,y,z)=0G(x, y, z) = 0 下的极值点 (x0,y0,z0)(x_0, y_0, z_0),可以转化为求解方程组 {fx+λGx=0fy+λGy=0fz+λGz=0G=0\begin{cases}f'_x + \lambda G'_x = 0 \\ f'_y + \lambda G'_y = 0 \\ f'_z + \lambda G'_z = 0 \\ G = 0\end{cases} 的解。

这个方程组的解是函数 L(x,y,z,λ)=f(x,y,z)+λG(x,y,z)L(x, y, z, \lambda) = f(x, y, z) + \lambda G(x, y, z) 取得极值的必要条件。这个方法称为拉格朗日乘数法

证明. 由于 GG 具有连续偏导数,因此 G(x,y,z)=0G(x, y, z) = 0 唯一确定隐函数 z=z(x,y)z = z(x, y),从而问题转化为求解 u=f(x,y,z(x,y))u = f(x, y, z(x, y)) 的无条件极值。

u=f(x,y,z(x,y))u = f(x, y, z(x, y)) 在点 (x0,y0)(x_0, y_0) 处取得极值的必要条件是 ux(x0,y0)=0u'_x(x_0, y_0) = 0uy(x0,y0)=0u'_y(x_0, y_0) = 0。由链式法则以及隐函数求导法,有

{ux=fx+fzzx=fxGxGzfz=0uy=fy+fzzy=fyGyGzfz=0 \begin{cases} \displaystyle u'_x = f'_x + f'_z z'_x = f'_x - \frac{G'_x}{G'_z} f'_z = 0 \\ \displaystyle u'_y = f'_y + f'_z z'_y = f'_y - \frac{G'_y}{G'_z} f'_z = 0 \end{cases}

从而 {fxGx=fzGzfyGy=fzGz\begin{cases}\displaystyle \frac{f'_x}{G'_x} = \frac{f'_z}{G'_z} \\\displaystyle \frac{f'_y}{G'_y} = \frac{f'_z}{G'_z}\end{cases},即 fxGx=fyGy=fzGz=λ\displaystyle \frac{f'_x}{G'_x} = \frac{f'_y}{G'_y} = \frac{f'_z}{G'_z} = -\lambda

这等价于 {fx+λGx=0fy+λGy=0fz+λGz=0\begin{cases}f'_x + \lambda G'_x = 0 \\ f'_y + \lambda G'_y = 0 \\ f'_z + \lambda G'_z = 0\end{cases}\blacksquare

Question

Gz(x0,y0,z0)0G'_z(x_0, y_0, z_0) \neq 0

使用拉格朗日乘数法可以求解在给定约束 G(x,y,z)=0G(x, y, z) = 0 下的所有可能极值点(由于是必要条件)。因此,只需要比较在这些点上函数 f(x,y,z)f(x, y, z) 的值,就可以得到函数 f(x,y,z)f(x, y, z) 在约束 G(x,y,z)=0G(x, y, z) = 0 下的最值

偏导数在几何上的应用


  1. 苏德矿《微积分》下册 P.53