連鎖律,中國大陸亦稱鏈式法則(英語:Chain rule),用於求合成函數的導數。
兩函數
和
的定義域 (
和
) 、值域 (
和
) 都包含於實數系
,若可以定義合成函數
(也就是
),且
於
可微分,且
於
可微分,則
![{\displaystyle {(g\circ f)}^{\prime }(a)=g^{\prime }[f(a)]\cdot f^{\prime }(a)}](https://wikimedia.org/api/rest_v1/media/math/render/svg/ff614c1ba145d4516a8270f068d65a3e126823c7)
也可以寫成
![{\displaystyle {\frac {dg[f(x)]}{dx}}{\bigg |}_{x=a}={\frac {dg(y)}{dy}}{\bigg |}_{y=f(a)}\cdot {\frac {df}{dx}}{\bigg |}_{x=a}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/9610e4356b9ef7dfb28af08470588b52791f5578)
求函數
的導數。
- 設
![{\displaystyle g(x)=x^{2}+1}](https://wikimedia.org/api/rest_v1/media/math/render/svg/d237d3495680a98bf232373698a6a3788faaff5c)
![{\displaystyle h(g)=g^{3}\to h(g(x))=g(x)^{3}.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/09944db0aa2d79e3f48d240abf1f9accc3ab51c9)
![{\displaystyle f(x)=h(g(x))}](https://wikimedia.org/api/rest_v1/media/math/render/svg/6adc3b8be7b1c066472da60572d8dfd411437792)
![{\displaystyle f'(x)=h'(g(x))g'(x)=3(g(x))^{2}(2x)=3(x^{2}+1)^{2}(2x)=6x(x^{2}+1)^{2}.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/d864480340256d9f5044251aa06a77ca1b756b67)
求函數
的導數。
![{\displaystyle {\frac {d}{dx}}\arctan \,x\,=\,{\frac {1}{1+x^{2}}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/2d465aaa447a6ff0d339e7ab809bf4b9619cfccc)
![{\displaystyle {\frac {d}{dx}}\arctan \,f(x)\,=\,{\frac {f'(x)}{1+f^{2}(x)}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/18bdaa497121a5e52618f57a200ce24a163b8bd8)
![{\displaystyle {\frac {d}{dx}}\arctan \,\sin \,x\,=\,{\frac {\cos \,x}{1+\sin ^{2}\,x}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/4d6312b224359669f4db551fa1d17e4feeda0adc)
嚴謹的證明需要以下連續函數的極限定理:
和
都是實函數,若可以定義合成函數
且
![{\displaystyle \lim _{x\to a}f(x)=L}](https://wikimedia.org/api/rest_v1/media/math/render/svg/2393aeed1be29997532a64161dcd6aa42423fc43)
![{\displaystyle \lim _{y\to L}g(y)=g(L)}](https://wikimedia.org/api/rest_v1/media/math/render/svg/c8fe9e4354f2d28dcb817f70995ea71d0ab0cb92)
則有
![{\displaystyle \lim _{x\to a}g[f(x)]=g(L)}](https://wikimedia.org/api/rest_v1/media/math/render/svg/40ffccc43e9b9a0dbd90e56bab7ea40527f9cd24)
只要展開極限的δ-ε定義,並考慮
等於或不等於
的兩種狀況,這個極限定理就可以得証。
為了證明連鎖律,定義一個函數
,其定義域
, 而對應規則為
![{\displaystyle G(y)={\begin{cases}\displaystyle {\frac {g(y)-g[f(a)]}{y-f(a)}}&y\neq f(a)\\\\g^{\prime }[f(a)]&y=f(a)\end{cases}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/1d34ddec8759f9765572a0a8749d56581c4fd2c4)
和一個函數
,其定義域
, 而對應規則為
![{\displaystyle F(x)={\begin{cases}\displaystyle {\frac {f(x)-f(a)}{x-a}}&x\neq a\\\\f^{\prime }(a)&x=a\end{cases}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/643c771d0014e2385e4da84973f299e0e5997e44)
這樣,考慮到
於
的導數是以下函數(定義域為
)的極限
![{\displaystyle \lim _{x\to a}{\frac {g(y)-g[f(a)]}{x-a}}=\lim _{x\to a}G[f(x)]\cdot F(x)}](https://wikimedia.org/api/rest_v1/media/math/render/svg/0530f9ebb0ffef5d696b5129b4d06aa43a78c150)
因為可微則必連續(根據乘法的極限性質),所以
於
連續、
於
連續,故根據上面的極限定理有
![{\displaystyle \lim _{x\to a}G[f(x)]=g^{\prime }[f(a)]}](https://wikimedia.org/api/rest_v1/media/math/render/svg/41d8817646d5984e27f59a1584f7534ddd40ac21)
而且針對一開始可微的前提有
![{\displaystyle \lim _{x\to a}F(x)=f^{\prime }(a)}](https://wikimedia.org/api/rest_v1/media/math/render/svg/056b3039c5e9a6b1a831070f28a3cc89afe9e188)
再根據乘法的極限性質有
![{\displaystyle \lim _{x\to a}{\frac {g(y)-g[f(a)]}{x-a}}=g^{\prime }[f(a)]\cdot f^{\prime }(a)}](https://wikimedia.org/api/rest_v1/media/math/render/svg/4837b37ee19118f8877834d4a01535fc6d7c0790)
即為所求。
考慮函數z = f(x, y),其中x = g(t),y = h(t),g(t)和h(t)是可微函數,那麼:
![{\displaystyle {\ dz \over dt}={\partial z \over \partial x}{dx \over dt}+{\partial z \over \partial y}{dy \over dt}.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/73029199ea8f35bae16b37511fe005f5b98c25ee)
假設z = f(u, v)的每一個自變量都是二元函數,也就是說,u = h(x, y),v = g(x, y),且這些函數都是可微的。那麼,z的偏導數為:
![{\displaystyle {\partial z \over \partial x}={\partial z \over \partial u}{\partial u \over \partial x}+{\partial z \over \partial v}{\partial v \over \partial x}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/faecaadc0efc1c583206cdf003051e4206f76cd1)
![{\displaystyle {\partial z \over \partial y}={\partial z \over \partial u}{\partial u \over \partial y}+{\partial z \over \partial v}{\partial v \over \partial y}.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/91ec992b1a9ddcee5f4d371afb7532d2fc8632d5)
如果我們考慮
![{\displaystyle {\vec {r}}=(u,v)}](https://wikimedia.org/api/rest_v1/media/math/render/svg/516f6f68e87ed93ad8b099c0074bac78476fbac1)
為一個向量函數,我們可以用向量的表示法把以上的公式寫成f的梯度與
的偏導數的數量積:
![{\displaystyle {\frac {\partial f}{\partial x}}={\vec {\nabla }}f\cdot {\frac {\partial {\vec {r}}}{\partial x}}.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/2db137f3d7ab9c38df54fe96f0beb1272cecdc69)
更一般地,對於從向量到向量的函數,求導法則為:
![{\displaystyle {\frac {\partial (z_{1},\ldots ,z_{m})}{\partial (x_{1},\ldots ,x_{p})}}={\frac {\partial (z_{1},\ldots ,z_{m})}{\partial (y_{1},\ldots ,y_{n})}}{\frac {\partial (y_{1},\ldots ,y_{n})}{\partial (x_{1},\ldots ,x_{p})}}.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/fe1084235d4ea650030e149a2e5c81c98e9f44c3)
複合函數的最初幾個高階導數為:
![{\displaystyle {\frac {d(f\circ g)}{dx}}={\frac {df}{dg}}{\frac {dg}{dx}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/81e4858db8e42d5a3d34fb818d2420164a5effe2)
![{\displaystyle {\frac {d^{2}(f\circ g)}{dx^{2}}}={\frac {d^{2}f}{dg^{2}}}\left({\frac {dg}{dx}}\right)^{2}+{\frac {df}{dg}}{\frac {d^{2}g}{dx^{2}}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/99ae6810c88d20dfe203c358efa90c7019264f1c)
![{\displaystyle {\frac {d^{3}(f\circ g)}{dx^{3}}}={\frac {d^{3}f}{dg^{3}}}\left({\frac {dg}{dx}}\right)^{3}+3{\frac {d^{2}f}{dg^{2}}}{\frac {dg}{dx}}{\frac {d^{2}g}{dx^{2}}}+{\frac {df}{dg}}{\frac {d^{3}g}{dx^{3}}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/3eafeedac87e233d4ceda68646fa22a58ddc5f29)
![{\displaystyle {\frac {d^{4}(f\circ g)}{dx^{4}}}={\frac {d^{4}f}{dg^{4}}}\left({\frac {dg}{dx}}\right)^{4}+6{\frac {d^{3}f}{dg^{3}}}\left({\frac {dg}{dx}}\right)^{2}{\frac {d^{2}g}{dx^{2}}}+{\frac {d^{2}f}{dg^{2}}}\left\{4{\frac {dg}{dx}}{\frac {d^{3}g}{dx^{3}}}+3\left({\frac {d^{2}g}{dx^{2}}}\right)^{2}\right\}+{\frac {df}{dg}}{\frac {d^{4}g}{dx^{4}}}.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/3af51b9d73d0e58d9d3bdfa4a176487f35dae4b4)