# 多元复合函数的求导法则

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

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

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

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

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