复合函数求导

复合函数求导是微积分中的重要技巧,掌握好链式法则对于解决复杂的求导问题至关重要。

Basic Concepts of Composite Functions

什么是复合函数

复合函数

如果函数 y=f(u)y = f(u) 的定义域包含函数 u=g(x)u = g(x) 的值域,那么函数 y=f(g(x))y = f(g(x)) 称为 ff 和 gg 的复合函数。

记法:y=(f∘g)(x)=f(g(x))y = (f \circ g)(x) = f(g(x))

复合函数的例子

例子 1:y=sin⁡(x2)y = \sin(x^2)

  • 外层函数:f(u)=sin⁡uf(u) = \sin u
  • 内层函数:g(x)=x2g(x) = x^2
  • 复合函数:y=f(g(x))=sin⁡(x2)y = f(g(x)) = \sin(x^2)

例子 2:y=eln⁡xy = e^{\ln x}

  • 外层函数:f(u)=euf(u) = e^u
  • 内层函数:g(x)=ln⁡xg(x) = \ln x
  • 复合函数:y=f(g(x))=eln⁡x=xy = f(g(x)) = e^{\ln x} = x

Chain Rule

基本链式法则

链式法则

如果 y=f(u)y = f(u),u=g(x)u = g(x),则

dydx=dydu⋅dudx=f′(u)⋅g′(x)\frac{dy}{dx} = \frac{dy}{du} \cdot \frac{du}{dx} = f'(u) \cdot g'(x)

记忆方法:

  • 从外到内逐层求导
  • 每层求导后乘以内层函数的导数

证明思路:

  1. 设 y=f(u)y = f(u),u=g(x)u = g(x)
  2. 当 xx 有增量 Δx\Delta x 时,uu 有增量 Δu=g(x+Δx)−g(x)\Delta u = g(x + \Delta x) - g(x)
  3. 相应地,yy 有增量 Δy=f(u+Δu)−f(u)\Delta y = f(u + \Delta u) - f(u)
  4. 当 Δx→0\Delta x \to 0 时,Δu→0\Delta u \to 0,所以: dydx=lim⁡Δx→0ΔyΔx=lim⁡Δx→0ΔyΔu⋅ΔuΔx=dydu⋅dudx\frac{dy}{dx} = \lim_{\Delta x \to 0} \frac{\Delta y}{\Delta x} = \lim_{\Delta x \to 0} \frac{\Delta y}{\Delta u} \cdot \frac{\Delta u}{\Delta x} = \frac{dy}{du} \cdot \frac{du}{dx}

基本例子:

例子 1:求 y=sin⁡(x2)y = \sin(x^2) 的导数

解:

  • 外层:f(u)=sin⁡uf(u) = \sin u,f′(u)=cos⁡uf'(u) = \cos u
  • 内层:g(x)=x2g(x) = x^2,g′(x)=2xg'(x) = 2x
  • 复合函数导数:y′=cos⁡(x2)⋅2x=2xcos⁡(x2)y' = \cos(x^2) \cdot 2x = 2x\cos(x^2)

例子 2:求 y=ex3y = e^{x^3} 的导数

解:

  • 外层:f(u)=euf(u) = e^u,f′(u)=euf'(u) = e^u
  • 内层:g(x)=x3g(x) = x^3,g′(x)=3x2g'(x) = 3x^2
  • 复合函数导数:y′=ex3⋅3x2=3x2ex3y' = e^{x^3} \cdot 3x^2 = 3x^2e^{x^3}

Multi-layer Composite Functions

三层复合函数

三层复合函数求导
dydx=dydu⋅dudv⋅dvdx=f′(u)⋅g′(v)⋅h′(x)\frac{dy}{dx} = \frac{dy}{du} \cdot \frac{du}{dv} \cdot \frac{dv}{dx} = f'(u) \cdot g'(v) \cdot h'(x)

例子 1:求 y=sin⁡(ln⁡(x2+1))y = \sin(\ln(x^2 + 1)) 的导数

解:

  • 最外层:f(u)=sin⁡uf(u) = \sin u,f′(u)=cos⁡uf'(u) = \cos u
  • 中间层:g(v)=ln⁡vg(v) = \ln v,g′(v)=1vg'(v) = \frac{1}{v}
  • 最内层:h(x)=x2+1h(x) = x^2 + 1,h′(x)=2xh'(x) = 2x
  • 复合函数导数:y′=cos⁡(ln⁡(x2+1))⋅1x2+1⋅2x=2xcos⁡(ln⁡(x2+1))x2+1y' = \cos(\ln(x^2 + 1)) \cdot \frac{1}{x^2 + 1} \cdot 2x = \frac{2x\cos(\ln(x^2 + 1))}{x^2 + 1}

例子 2:求 y=esin⁡(x3)y = e^{\sin(x^3)} 的导数

解:

  • 最外层:f(u)=euf(u) = e^u,f′(u)=euf'(u) = e^u
  • 中间层:g(v)=sin⁡vg(v) = \sin v,g′(v)=cos⁡vg'(v) = \cos v
  • 最内层:h(x)=x3h(x) = x^3,h′(x)=3x2h'(x) = 3x^2
  • 复合函数导数:y′=esin⁡(x3)⋅cos⁡(x3)⋅3x2=3x2cos⁡(x3)esin⁡(x3)y' = e^{\sin(x^3)} \cdot \cos(x^3) \cdot 3x^2 = 3x^2\cos(x^3)e^{\sin(x^3)}

Common Composite Function Differentiation

1. 幂函数复合

幂函数复合求导
(f(x)n)′=n⋅f(x)n−1⋅f′(x)(f(x)^n)' = n \cdot f(x)^{n-1} \cdot f'(x)

例子:

  • ((x2+1)3)′=3(x2+1)2⋅2x=6x(x2+1)2((x^2 + 1)^3)' = 3(x^2 + 1)^2 \cdot 2x = 6x(x^2 + 1)^2
  • (sin⁡2x)′=2sin⁡x⋅cos⁡x=sin⁡(2x)(\sin^2 x)' = 2\sin x \cdot \cos x = \sin(2x)

2. 指数函数复合

指数函数复合求导
(ef(x))′=ef(x)⋅f′(x)(e^{f(x)})' = e^{f(x)} \cdot f'(x)

例子:

  • (ex2)′=ex2⋅2x=2xex2(e^{x^2})' = e^{x^2} \cdot 2x = 2xe^{x^2}
  • (esin⁡x)′=esin⁡x⋅cos⁡x(e^{\sin x})' = e^{\sin x} \cdot \cos x

3. 对数函数复合

对数函数复合求导
(ln⁡f(x))′=f′(x)f(x)(\ln f(x))' = \frac{f'(x)}{f(x)}

例子:

  • (ln⁡(x2+1))′=2xx2+1(\ln(x^2 + 1))' = \frac{2x}{x^2 + 1}
  • (ln⁡∣sin⁡x∣)′=cos⁡xsin⁡x=cot⁡x(\ln|\sin x|)' = \frac{\cos x}{\sin x} = \cot x

4. 三角函数复合

三角函数复合求导
(sin⁡f(x))′=cos⁡f(x)⋅f′(x)(\sin f(x))' = \cos f(x) \cdot f'(x)(cos⁡f(x))′=−sin⁡f(x)⋅f′(x)(\cos f(x))' = -\sin f(x) \cdot f'(x)(tan⁡f(x))′=sec⁡2f(x)⋅f′(x)(\tan f(x))' = \sec^2 f(x) \cdot f'(x)

例子:

  • (sin⁡(x3))′=cos⁡(x3)⋅3x2=3x2cos⁡(x3)(\sin(x^3))' = \cos(x^3) \cdot 3x^2 = 3x^2\cos(x^3)
  • (cos⁡(ln⁡x))′=−sin⁡(ln⁡x)⋅1x=−sin⁡(ln⁡x)x(\cos(\ln x))' = -\sin(\ln x) \cdot \frac{1}{x} = -\frac{\sin(\ln x)}{x}

5. 反三角函数复合

反三角函数复合求导

(arcsin⁡f(x))′=f′(x)1−f(x)2(\arcsin f(x))' = \frac{f'(x)}{\sqrt{1 - f(x)^2}}

(arccos⁡f(x))′=−f′(x)1−f(x)2(\arccos f(x))' = -\frac{f'(x)}{\sqrt{1 - f(x)^2}}

(arctan⁡f(x))′=f′(x)1+f(x)2(\arctan f(x))' = \frac{f'(x)}{1 + f(x)^2}

例子:

  • (arcsin⁡(x2))′=2x1−x4(\arcsin(x^2))' = \frac{2x}{\sqrt{1 - x^4}}
  • (arctan⁡(ln⁡x))′=1/x1+(ln⁡x)2=1x(1+(ln⁡x)2)(\arctan(\ln x))' = \frac{1/x}{1 + (\ln x)^2} = \frac{1}{x(1 + (\ln x)^2)}

Exercises

练习 1

求函数 f(x)=sin⁡(ex2)f(x) = \sin(e^{x^2}) 的导数。

Reference Answer(2 个标签)
derivative calculationdifferentiation rules

解题思路: 这是一个三层复合函数,需要逐层使用链式法则。

详细步骤:

  1. 最外层:f(u)=sin⁡uf(u) = \sin u,f′(u)=cos⁡uf'(u) = \cos u
  2. 中间层:g(v)=evg(v) = e^v,g′(v)=evg'(v) = e^v
  3. 最内层:h(x)=x2h(x) = x^2,h′(x)=2xh'(x) = 2x
  4. 复合函数导数:f′(x)=cos⁡(ex2)⋅ex2⋅2x=2xex2cos⁡(ex2)f'(x) = \cos(e^{x^2}) \cdot e^{x^2} \cdot 2x = 2xe^{x^2}\cos(e^{x^2})

答案:f′(x)=2xex2cos⁡(ex2)f'(x) = 2xe^{x^2}\cos(e^{x^2})

练习 2

求函数 f(x)=ln⁡(sin⁡(x3+1))f(x) = \ln(\sin(x^3 + 1)) 的导数。

Reference Answer(2 个标签)
derivative calculationdifferentiation rules

解题思路: 这是一个三层复合函数,使用对数函数和三角函数的复合。

详细步骤:

  1. 最外层:f(u)=ln⁡uf(u) = \ln u,f′(u)=1uf'(u) = \frac{1}{u}
  2. 中间层:g(v)=sin⁡vg(v) = \sin v,g′(v)=cos⁡vg'(v) = \cos v
  3. 最内层:h(x)=x3+1h(x) = x^3 + 1,h′(x)=3x2h'(x) = 3x^2
  4. 复合函数导数:f′(x)=1sin⁡(x3+1)⋅cos⁡(x3+1)⋅3x2=3x2cos⁡(x3+1)sin⁡(x3+1)=3x2cot⁡(x3+1)f'(x) = \frac{1}{\sin(x^3 + 1)} \cdot \cos(x^3 + 1) \cdot 3x^2 = \frac{3x^2\cos(x^3 + 1)}{\sin(x^3 + 1)} = 3x^2\cot(x^3 + 1)

答案:f′(x)=3x2cot⁡(x3+1)f'(x) = 3x^2\cot(x^3 + 1)

练习 3

求函数 f(x)=(x2+1)sin⁡xf(x) = (x^2 + 1)^{\sin x} 的导数。

Reference Answer(2 个标签)
derivative calculationdifferentiation rules

解题思路: 这是一个幂函数复合,需要使用幂函数求导公式。

详细步骤:

  1. 外层:f(u)=usin⁡xf(u) = u^{\sin x},f′(u)=sin⁡x⋅usin⁡x−1f'(u) = \sin x \cdot u^{\sin x - 1}
  2. 内层:g(x)=x2+1g(x) = x^2 + 1,g′(x)=2xg'(x) = 2x
  3. 复合函数导数:f′(x)=sin⁡x⋅(x2+1)sin⁡x−1⋅2x=2xsin⁡x(x2+1)sin⁡x−1f'(x) = \sin x \cdot (x^2 + 1)^{\sin x - 1} \cdot 2x = 2x\sin x(x^2 + 1)^{\sin x - 1}

答案:f′(x)=2xsin⁡x(x2+1)sin⁡x−1f'(x) = 2x\sin x(x^2 + 1)^{\sin x - 1}

练习 4

求函数 f(x)=arcsin⁡(ln⁡(x2+1))f(x) = \arcsin(\ln(x^2 + 1)) 的导数。

Reference Answer(2 个标签)
derivative calculationdifferentiation rules

解题思路: 这是一个三层复合函数,包含反三角函数和对数函数。

详细步骤:

  1. 最外层:f(u)=arcsin⁡uf(u) = \arcsin u,f′(u)=11−u2f'(u) = \frac{1}{\sqrt{1 - u^2}}
  2. 中间层:g(v)=ln⁡vg(v) = \ln v,g′(v)=1vg'(v) = \frac{1}{v}
  3. 最内层:h(x)=x2+1h(x) = x^2 + 1,h′(x)=2xh'(x) = 2x
  4. 复合函数导数:f′(x)=11−(ln⁡(x2+1))2⋅1x2+1⋅2x=2x(x2+1)1−(ln⁡(x2+1))2f'(x) = \frac{1}{\sqrt{1 - (\ln(x^2 + 1))^2}} \cdot \frac{1}{x^2 + 1} \cdot 2x = \frac{2x}{(x^2 + 1)\sqrt{1 - (\ln(x^2 + 1))^2}}

答案:f′(x)=2x(x2+1)1−(ln⁡(x2+1))2f'(x) = \frac{2x}{(x^2 + 1)\sqrt{1 - (\ln(x^2 + 1))^2}}

练习 5

求函数 f(x)=esin⁡(ln⁡(x2+1))f(x) = e^{\sin(\ln(x^2 + 1))} 的导数。

Reference Answer(2 个标签)
derivative calculationdifferentiation rules

解题思路: 这是一个四层复合函数,需要逐层使用链式法则。

详细步骤:

  1. 最外层:f(u)=euf(u) = e^u,f′(u)=euf'(u) = e^u
  2. 第二层:g(v)=sin⁡vg(v) = \sin v,g′(v)=cos⁡vg'(v) = \cos v
  3. 第三层:h(w)=ln⁡wh(w) = \ln w,h′(w)=1wh'(w) = \frac{1}{w}
  4. 最内层:k(x)=x2+1k(x) = x^2 + 1,k′(x)=2xk'(x) = 2x
  5. 复合函数导数:f′(x)=esin⁡(ln⁡(x2+1))⋅cos⁡(ln⁡(x2+1))⋅1x2+1⋅2x=2xcos⁡(ln⁡(x2+1))esin⁡(ln⁡(x2+1))x2+1f'(x) = e^{\sin(\ln(x^2 + 1))} \cdot \cos(\ln(x^2 + 1)) \cdot \frac{1}{x^2 + 1} \cdot 2x = \frac{2x\cos(\ln(x^2 + 1))e^{\sin(\ln(x^2 + 1))}}{x^2 + 1}

答案:f′(x)=2xcos⁡(ln⁡(x2+1))esin⁡(ln⁡(x2+1))x2+1f'(x) = \frac{2x\cos(\ln(x^2 + 1))e^{\sin(\ln(x^2 + 1))}}{x^2 + 1}

练习 6

改编自2022考研数学一第2题

设 f(u)f(u) 可导,z=xyf(yx)z=xyf\left(\frac{y}{x}\right),求 ∂z∂x\frac{\partial z}{\partial x}。

Reference Answer(2 个标签)
derivative calculationdifferentiation rules

解题思路: 使用复合函数的链式法则和乘积法则。

详细步骤:

  1. 设 u=yxu=\frac{y}{x},则 z=xyf(u)z=xyf(u)

  2. 对 xx 求偏导,使用乘积法则: ∂z∂x=yf(u)+xyf′(u)⋅∂u∂x\frac{\partial z}{\partial x}=yf(u)+xyf'(u)\cdot\frac{\partial u}{\partial x}

  3. 计算 ∂u∂x\frac{\partial u}{\partial x}: u=yxu=\frac{y}{x},所以 ∂u∂x=−yx2\frac{\partial u}{\partial x}=-\frac{y}{x^2}

  4. 代入得到: ∂z∂x=yf(yx)+xyf′(yx)⋅(−yx2)\frac{\partial z}{\partial x}=yf\left(\frac{y}{x}\right)+xyf'\left(\frac{y}{x}\right)\cdot\left(-\frac{y}{x^2}\right) =yf(yx)−y2f′(yx)1x=yf\left(\frac{y}{x}\right)-y^2f'\left(\frac{y}{x}\right)\frac{1}{x}

答案:∂z∂x=yf(yx)−y2f′(yx)1x\frac{\partial z}{\partial x}=yf\left(\frac{y}{x}\right)-y^2f'\left(\frac{y}{x}\right)\frac{1}{x}

练习 7

改编自2023考研数学一第3题

设函数 y=f(x)y=f(x) 由参数方程 {x=2t+∣t∣y=∣t∣sin⁡t\begin{cases}x=2t+|t|\\y=|t|\sin t\end{cases} 确定,求 f′(0)f'(0)。

Reference Answer(2 个标签)
derivative calculationdifferentiation rules

解题思路: 使用参数方程求导公式和复合函数求导。

详细步骤:

  1. 当 t≥0t\geq0 时,x=3t,y=tsin⁡tx=3t, y=t\sin t,所以 y=x3sin⁡x3y=\frac{x}{3}\sin\frac{x}{3}

  2. 当 t<0t<0 时,x=t,y=−tsin⁡tx=t, y=-t\sin t,所以 y=−xsin⁡xy=-x\sin x

  3. 因此 f(x)={x3sin⁡x3,x≥0−xsin⁡x,x<0f(x)=\begin{cases}\frac{x}{3}\sin\frac{x}{3}, & x\geq0\\-x\sin x, & x<0\end{cases}

  4. 计算左导数: f−′(0)=lim⁡x→0−−xsin⁡x−0x=−lim⁡x→0−sin⁡x=0f'_-(0)=\lim\limits_{x\to0^-}\frac{-x\sin x-0}{x}=-\lim\limits_{x\to0^-}\sin x=0

  5. 计算右导数: f+′(0)=lim⁡x→0+x3sin⁡x3−0x=lim⁡x→0+sin⁡x33=0f'_+(0)=\lim\limits_{x\to0^+}\frac{\frac{x}{3}\sin\frac{x}{3}-0}{x}=\lim\limits_{x\to0^+}\frac{\sin\frac{x}{3}}{3}=0

  6. 由于左导数和右导数相等,所以 f′(0)=0f'(0)=0

答案:f′(0)=0f'(0)=0

练习 8

改编自2024考研数学一第1题

已知函数 f(x)=∫0xecos⁡tdtf(x)=\int_0^x e^{\cos t}dt,求 f′(x)f'(x) 和 f′′(x)f''(x)。

Reference Answer(2 个标签)
derivative calculationdifferentiation rules

解题思路: 使用积分上限函数求导公式和复合函数求导。

详细步骤:

  1. 根据积分上限函数求导公式: f′(x)=ecos⁡xf'(x)=e^{\cos x}

  2. 对 f′(x)f'(x) 再次求导,使用复合函数求导: 设 u=cos⁡xu=\cos x,则 f′(x)=euf'(x)=e^u

    ddx(eu)=eu⋅dudx=ecos⁡x⋅(−sin⁡x)=−ecos⁡xsin⁡x\frac{d}{dx}(e^u)=e^u\cdot\frac{du}{dx}=e^{\cos x}\cdot(-\sin x)=-e^{\cos x}\sin x

答案: f′(x)=ecos⁡xf'(x)=e^{\cos x} f′′(x)=−ecos⁡xsin⁡xf''(x)=-e^{\cos x}\sin x

练习 9

改编自2025考研数学一第1题

已知函数 f(x)=∫0xet2sin⁡t dtf(x) = \int_0^x e^{t^2} \sin t\,dt,求 f′(x)f'(x) 和 f′′(x)f''(x)。

Reference Answer(2 个标签)
derivative calculationdifferentiation rules

解题思路: 使用积分上限函数求导公式和复合函数求导。

详细步骤:

  1. 根据积分上限函数求导公式: f′(x)=ex2sin⁡xf'(x) = e^{x^2} \sin x

  2. 对 f′(x)f'(x) 再次求导,使用乘积法则和复合函数求导: 设 u=ex2u = e^{x^2},v=sin⁡xv = \sin x

    u′=ex2⋅2x=2xex2u' = e^{x^2} \cdot 2x = 2x e^{x^2}(复合函数求导) v′=cos⁡xv' = \cos x

  3. 应用乘积法则: f′′(x)=u′v+uv′=2xex2⋅sin⁡x+ex2⋅cos⁡xf''(x) = u'v + uv' = 2x e^{x^2} \cdot \sin x + e^{x^2} \cdot \cos x =2xex2sin⁡x+ex2cos⁡x= 2x e^{x^2} \sin x + e^{x^2} \cos x

答案: f′(x)=ex2sin⁡xf'(x) = e^{x^2} \sin x f′′(x)=2xex2sin⁡x+ex2cos⁡xf''(x) = 2x e^{x^2} \sin x + e^{x^2} \cos x

练习 10

改编自2022考研数学一第17题

设 y=y(x)y=y(x) 满足 y′+12xy=2+xy'+\frac{1}{2\sqrt{x}}y=2+\sqrt{x},y(1)=3y(1)=3,求 y(x)y(x) 的表达式。

Reference Answer(2 个标签)
derivative calculationdifferentiation rules

解题思路: 使用一阶线性微分方程的求解方法。

详细步骤:

  1. 这是一个一阶线性微分方程:y′+12xy=2+xy'+\frac{1}{2\sqrt{x}}y=2+\sqrt{x}

  2. 积分因子:μ(x)=e∫12xdx=ex\mu(x)=e^{\int\frac{1}{2\sqrt{x}}dx}=e^{\sqrt{x}}

  3. 方程两边乘以积分因子: exy′+ex12xy=(2+x)exe^{\sqrt{x}}y'+e^{\sqrt{x}}\frac{1}{2\sqrt{x}}y=(2+\sqrt{x})e^{\sqrt{x}}

  4. 左边可以写成:(exy)′=(2+x)ex(e^{\sqrt{x}}y)'=(2+\sqrt{x})e^{\sqrt{x}}

  5. 积分得:exy=∫(2+x)exdxe^{\sqrt{x}}y=\int(2+\sqrt{x})e^{\sqrt{x}}dx

  6. 计算积分:∫(2+x)exdx=2∫exdx+∫xexdx\int(2+\sqrt{x})e^{\sqrt{x}}dx=2\int e^{\sqrt{x}}dx+\int\sqrt{x}e^{\sqrt{x}}dx

  7. 设 u=xu=\sqrt{x},则 dx=2ududx=2udu,积分变为: 2∫eu⋅2udu+∫ueu⋅2udu=4∫ueudu+2∫u2eudu2\int e^u\cdot2udu+\int ue^u\cdot2udu=4\int ue^udu+2\int u^2e^udu

  8. 使用分部积分法求解,最终得到: y(x)=e−x(2xex+C)y(x)=e^{-\sqrt{x}}\left(2x e^{\sqrt{x}}+C\right)

  9. 由 y(1)=3y(1)=3,得 C=eC=e,所以: y(x)=e−x(2xex+e)y(x)=e^{-\sqrt{x}}\left(2x e^{\sqrt{x}}+e\right)

答案:y(x)=e−x(2xex+e)y(x)=e^{-\sqrt{x}}\left(2x e^{\sqrt{x}}+e\right)


Summary

中英对照

中文术语英文术语音标说明
复合函数composite function/ˈkɒmpəzɪt ˈfʌŋkʃən/由多个函数复合而成的函数
链式法则chain rule/tʃeɪn ruːl/复合函数求导的基本法则
外层函数outer function/ˈaʊtə ˈfʌŋkʃən/复合函数中最外层的函数
内层函数inner function/ˈɪnə ˈfʌŋkʃən/复合函数中最内层的函数
逐层求导differentiate layer by layer/dɪfəˈrenʃɪeɪt ˈleɪə baɪ ˈleɪə/从外到内逐层使用链式法则求导