这里我们推导多元复合函数的求导法则。需要注意的是,多元复合函数,有多少个中间变量,就应该有多少项。推导的方法与一元复合函数差不多。
1,一般情形,两个中间变量, 两个自变量:设 \(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*}\]
2,两个中间变量,一个自变量:设 \(z=f(u,v), u=g(t), v=h(t)\),则
\[\frac{dz}{dt}=\frac{\partial f}{\partial u}\cdot\frac{du}{dt}+\frac{\partial f}{\partial v}\cdot\frac{dv}{dt}=f_u\cdot g'(t)+f_v\cdot h'(t)\]
3,函数中既有自变量,又有中间变量,自变量只有一个:\(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)\]
4,函数中既有自变量,又有中间变量,自变量有两个:\(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*}\]
我们仅仅证明第二种情况,其它情形类似,只是稍微烦琐些。
2 的证明:因为
\[\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}\]
我们来看几个例题。
例1,设 \(z=e^{u^2+2uv-v^2}, u=2x-y,v=x+2y\),求 \(\displaystyle \frac{\partial z}{\partial x}, \frac{\partial z}{\partial y}\)。
解:这是复合函数的第一种情况,所以 \[\begin{align*}\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}\\&=(2u+2v)e^{u^2+2uv-v^2}\cdot 2+(2u-2v)e^{u^2+2uv-v^2}\cdot 1\\ &=e^{u^2+2uv-v^2}(4u+4v+2u-2v)\\ &=(6u+2v)e^{u^2+2uv-v^2}\end{align*}\]
\[\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=\sin(xy)+e^{x+2y}, x=\sin t, y=\cos t\),求 \(\displaystyle \frac{dz}{dt}\)。
解:这是第二种情况,所以
\[\begin{align*}\frac{dz}{dt}&=\frac{\partial f}{\partial x}\cdot \frac{dx}{dt}+\frac{\partial f}{\partial y}\cdot \frac{dy}{dt}\\ &=y\cos(xy)\cdot \cos t+x\cos(xy)\cdot (-\sin t)\\ &=\cos(xy)(\cos^2t-\sin^2t)=\cos2t\cdot\cos(xy)\end{align*}\]
例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*}\]