多元复合函数的求导法则,就是链式法则或者 chain rule。这里我们针对不同情况的复合函数给出不同的求导方式。
笔记下载:多元函数的链式法则 chain rule
1,我们回顾一下一元复合函数的求导法则: \(y=f(u),u=g(x)\),则\[\frac{dy}{dx}=\frac{df}{du}\cdot\frac{du}{dx}=f'(u)\cdot g'(x)=f'(g(x))\cdot g'(x)\]
2,多元复合函数的导数:一般情形,两个中间变量, 两个自变量:设 \(z=f(u,v), u=g(x,y), v=h(x,y)\),\(f,g,h\) 可微,则
\begin{align*}\frac{\partial f}{\partial x}&=\frac{\partial f}{\partial u}\cdot \frac{\partial u}{\partial x}+\frac{\partial f}{\partial v}\cdot \frac{\partial v}{\partial x}=f_u\cdot g_x+f_v\cdot h_x\\ \frac{\partial f}{\partial y}&=\frac{\partial f}{\partial u}\cdot \frac{\partial u}{\partial y}+\frac{\partial f}{\partial v}\cdot \frac{\partial v}{\partial y}=f_u\cdot g_y+f_v\cdot h_y\end{align*}
3,两个中间变量,一个自变量:设 \(z=f(x,y), x=g(t), y=h(t)\),则
\[\frac{dz}{dt}=\frac{\partial f}{\partial x}\cdot\frac{dx}{dt}+\frac{\partial f}{\partial y}\cdot\frac{dy}{dt}=f_x\cdot g'(t)+f_y\cdot h'(t)\]
4,函数中既有自变量,又有中间变量,自变量只有一个:\(z=f(t,u,v), u=g(t), v=h(t)\),那么
\[\frac{dz}{dt}=\frac{\partial f}{\partial t}+\frac{\partial f}{\partial u}\cdot\frac{du}{dt}+\frac{\partial f}{\partial v}\cdot\frac{dv}{dt}=f_t+f_x\cdot g'(t)+f_y\cdot h'(t)\]
5,函数中既有自变量,又有中间变量,自变量有两个:\(w=f(x,y,z), z=g(x,y)\),那么
\begin{align*}\frac{\partial w}{\partial x}&=\frac{\partial f}{\partial x}+\frac{\partial f}{\partial z}\cdot \frac{\partial g}{\partial x}=f_x+f_z\cdot g_x\\ \frac{\partial w}{\partial y}&=\frac{\partial f}{\partial y}+\frac{\partial f}{\partial z}\cdot \frac{\partial g}{\partial y}=f_y+f_z\cdot g_y\end{align*}
例1,设 \(z=xy, x=\cos t, y=\sin t\),求 \(\displaystyle \frac{d z}{dt}\)。
解:\[\frac{dz}{dt}=\frac{\partial f}{\partial x}\cdots\frac{\partial x}{\partial t}+\frac{\partial f}{\partial y}\cdot\frac{\partial y}{\partial t}=y\cdot(-\sin t)+x\cdot\cos t=-\sin^2t+\cos^2t=\cos 2t\]
\begin{align*}\frac{\partial z}{\partial y}&=\frac{\partial f}{\partial u}\cdot\frac{\partial u}{\partial y}+\frac{\partial f}{\partial v}\cdot\frac{\partial v}{\partial y}\\ &=(2u+2v)e^{u^2+2uv-v^2}\cdot (-1)+(2u-2v)e^{u^2+2uv-v^2}\cdot 2\\ &=e^{u^2+2uv-v^2}(-2u-2v+4u-4v)\\ &=(2u-6v)e^{u^2+2uv-v^2}\end{align*}
例2,设 \(z=e^u\sin v, u=xy, v=x+y\),求 \(\displaystyle \frac{\partial z}{\partial x}, \frac{\partial z}{\partial y}\)。
解:这是第二种情况,所以
\[\frac{\partial z}{\partial x}=\frac{\partial f}{\partial u}\cdot\frac{\partial u}{\partial x}+\frac{\partial f}{\partial v}\cdot\frac{\partial v}{\partial x}=e^u\sin v\cdot y+e^u\cos v\cdot 1=e^u(y\sin v+\cos v)\]
\[\frac{\partial z}{\partial y}=\frac{\partial f}{\partial u}\cdot\frac{\partial u}{\partial y}+\frac{\partial f}{\partial v}\cdot\frac{\partial v}{\partial y}=e^u\sin v\cdot x+e^u\cos v\cdot 1=e^u(x\sin v+\cos v)\]
例3,设 \(z=\ln(t+x^2+y^2), x=\sin t, y=\cos t\),求 \(\displaystyle\frac{dz}{dt}\)。
解:由我们上面的公式,得
\begin{align*}\frac{dz}{dt}&=\frac{\partial f}{\partial t}+\frac{\partial f}{\partial x}\cdot\frac{dx}{dt}+\frac{\partial f}{\partial y}\cdot\frac{dy}{dt}\\ &=\frac{1}{t+x^2+y^2}+\frac{2x}{t+x^2+y^2}\cdot \cos t+\frac{2y}{t+x^2+y^2}\cdot (-\sin t)\\ &=\frac{1}{t+x^2+y^2}(1+2\sin t\cos t-2\cos t\sin t)\\&=\frac{1}{t+x^2+y^2}\end{align*}
例4,设 \(w=e^{x^2+y^2+z^2}, z=\ln(x^2+2xy-y^2)\),求 \(\displaystyle\frac{\partial w}{\partial x}, \frac{\partial w}{\partial y}\)。
解:我们有
\begin{align*}\frac{\partial w}{\partial x}&=\frac{\partial f}{\partial x}+\frac{\partial f}{\partial z}\cdot\frac{\partial z}{\partial x}\\ &=2xe^{x^2+y^2+z^2}+2ze^{x^2+y^2+z^2}\cdot\frac{2x+2y}{x^2+2xy-y^2}\end{align*}
\begin{align*}\frac{\partial w}{\partial y}&=\frac{\partial f}{\partial y}+\frac{\partial f}{\partial z}\cdot\frac{\partial z}{\partial y}\\ &=2ye^{x^2+y^2+z^2}+2ze^{x^2+y^2+z^2}\cdot\frac{2x-2y}{x^2+2xy-y^2}\end{align*}
6,证明:我们只证明一般的情形。
\[\frac{dz}{dt}=\lim_{\Delta t\to 0}\frac{\Delta z}{\Delta t}\]
因为 \(f\) 可微, 所以\[\Delta z=f_u\cdot \Delta u+f_v\cdot \Delta v+o(\rho)\]这里 \(\rho=\sqrt{\Delta^2u+\Delta^2v}\)。所以可以得到\[\frac{\Delta z}{\Delta t}=f_u\cdot\frac{\Delta u}{\Delta t}+f_v\cdot\frac{\Delta v}{\Delta t}+\frac{o(\rho)}{\Delta t}\]
又因为 \(g,h\) 可微,并且 \[\lim_{\Delta u\to 0}\frac{o(\rho)}{\Delta u}=0,\quad \lim_{\Delta v\to 0}\frac{o(\rho)}{\Delta u}=0\] 所以 \[\lim_{\Delta t\to 0}\frac{o(\rho)}{\Delta t}=\lim_{\Delta t\to 0}\frac{o(\rho)/\Delta u}{\Delta t/\Delta u}=0\] 这是因为分母的极限为 \(1/g'(t)\)。
所以当 \(\Delta t\to 0\) 时,\[\lim_{\Delta t\to 0}\frac{\Delta z}{\Delta t}=\lim_{\Delta \to 0}\left(f_u\cdot\frac{\Delta u}{\Delta t}+f_v\cdot\frac{\Delta v}{\Delta t}+\frac{o(\rho)}{\Delta t}\right)=f_u\cdot \frac{du}{dt}+f_v\cdot \frac{dv}{dt}\]