CQF预备知识:一、微积分 -- 1.8.1 链式法则 I 详解
文中内容仅限技术学习与代码实践参考,市场存在不确定性,技术分析需谨慎验证,不构成任何投资建议。
📖 数学入门全解
本系列教程为CQF(国际量化金融分析师证书)认证所需的数学预备知识,涵盖所有需要了解的数学基础知识,旨在帮助读者熟悉核心课程所需的数学水平。
教程涵盖以下四个主题:
- 微积分
- 线性代数
- 微分方程
- 概率与统计
1.8.1 链式法则 I 详解
一、核心概念
复合函数求导法则
当函数 z = f ( x , y ) z = f(x,y) z=f(x,y) 的变量 x , y x,y x,y 本身又是另一变量 s s s 的函数时,即 x = x ( s ) , y = y ( s ) x = x(s), y = y(s) x=x(s),y=y(s),则复合函数 F ( s ) = f ( x ( s ) , y ( s ) ) F(s) = f(x(s), y(s)) F(s)=f(x(s),y(s)) 的导数为:
d F d s = ∂ f ∂ x ⋅ d x d s + ∂ f ∂ y ⋅ d y d s \frac{dF}{ds} = \frac{\partial f}{\partial x} \cdot \frac{dx}{ds} + \frac{\partial f}{\partial y} \cdot \frac{dy}{ds} dsdF=∂x∂f⋅dsdx+∂y∂f⋅dsdy
其中:
- ∂ f ∂ x \frac{\partial f}{\partial x} ∂x∂f 表示 f f f 对 x x x 的偏导数(保持 y y y 不变)
- ∂ f ∂ y \frac{\partial f}{\partial y} ∂y∂f 表示 f f f 对 y y y 的偏导数(保持 x x x 不变)
- d x d s \frac{dx}{ds} dsdx 和 d y d s \frac{dy}{ds} dsdy 是 x , y x,y x,y 对 s s s 的普通导数
二、推导过程
基础示例分析
给定:
f ( x , y ) = x 2 + y 2 x ( s ) = cos s , y ( s ) = sin s f(x,y) = x^2 + y^2 \\ x(s) = \cos s, \quad y(s) = \sin s f(x,y)=x2+y2x(s)=coss,y(s)=sins
计算步骤:
-
求偏导数:
∂ f ∂ x = 2 x , ∂ f ∂ y = 2 y \frac{\partial f}{\partial x} = 2x, \quad \frac{\partial f}{\partial y} = 2y ∂x∂f=2x,∂y∂f=2y
-
求中间变量导数:
d x d s = − sin s , d y d s = cos s \frac{dx}{ds} = -\sin s, \quad \frac{dy}{ds} = \cos s dsdx=−sins,dsdy=coss
-
代入链式法则:
d F d s = 2 x ( − sin s ) + 2 y ( cos s ) = − 2 cos s sin s + 2 sin s cos s = 0 \frac{dF}{ds} = 2x(-\sin s) + 2y(\cos s) \\ = -2\cos s \sin s + 2\sin s \cos s = 0 dsdF=2x(−sins)+2y(coss)=−2cosssins+2sinscoss=0
-
验证结果:
F ( s ) = cos 2 s + sin 2 s = 1 ⇒ d F d s = 0 F(s) = \cos^2 s + \sin^2 s = 1 \Rightarrow \frac{dF}{ds} = 0 F(s)=cos2s+sin2s=1⇒dsdF=0
三、应用实例
参数方程求导
问题描述:
z = e x y 2 x = t cos t , y = t sin t 求 d z d t ∣ t = π 2 z = e^{xy^2} \\ x = t\cos t, \quad y = t\sin t \\ 求 \left. \frac{dz}{dt} \right|_{t=\frac{\pi}{2}} z=exy2x=tcost,y=tsint求dtdz t=2π
解题步骤:
-
计算偏导数:
∂ z ∂ x = y 2 e x y 2 ∂ z ∂ y = 2 x y e x y 2 \frac{\partial z}{\partial x} = y^2 e^{xy^2} \\ \frac{\partial z}{\partial y} = 2xy e^{xy^2} ∂x∂z=y2exy2∂y∂z=2xyexy2
-
计算中间导数:
d x d t = cos t − t sin t d y d t = sin t + t cos t \frac{dx}{dt} = \cos t - t\sin t \\ \frac{dy}{dt} = \sin t + t\cos t dtdx=cost−tsintdtdy=sint+tcost
-
应用链式法则:
d z d t = ( y 2 e x y 2 ) ( cos t − t sin t ) + ( 2 x y e x y 2 ) ( sin t + t cos t ) \frac{dz}{dt} = (y^2 e^{xy^2})(\cos t - t\sin t) + (2xy e^{xy^2})(\sin t + t\cos t) dtdz=(y2exy2)(cost−tsint)+(2xyexy2)(sint+tcost)
-
代入 t = π 2 t = \frac{\pi}{2} t=2π:
-
x = π 2 cos π 2 = 0 x = \frac{\pi}{2} \cos \frac{\pi}{2} = 0 x=2πcos2π=0
-
y = π 2 sin π 2 = π 2 y = \frac{\pi}{2} \sin \frac{\pi}{2} = \frac{\pi}{2} y=2πsin2π=2π
-
计算得:
d z d t = ( π 2 4 ) e 0 ( − π 2 ) + 0 = − π 3 8 \frac{dz}{dt} = \left(\frac{\pi^2}{4}\right)e^0 (- \frac{\pi}{2}) + 0 = -\frac{\pi^3}{8} dtdz=(4π2)e0(−2π)+0=−8π3
-
四、关键要点
-
偏导数与全导数区别:
- 偏导数 ∂ f ∂ x \frac{\partial f}{\partial x} ∂x∂f:仅考虑 x x x 变化对 f f f 的影响
- 全导数 d F d s \frac{dF}{ds} dsdF:综合所有变量通过中间参数 s s s 的变化影响
-
链式法则的几何意义:
- 描述复合函数变化率的叠加效应
- 各路径贡献的加权和(权重为对应导数)
-
计算注意事项:
- 必须保持变量依赖关系的清晰
- 最后代入数值前保持符号运算
- 注意复合函数中各导数的相乘顺序
风险提示与免责声明
本文内容基于公开信息研究整理,不构成任何形式的投资建议。历史表现不应作为未来收益保证,市场存在不可预见的波动风险。投资者需结合自身财务状况及风险承受能力独立决策,并自行承担交易结果。作者及发布方不对任何依据本文操作导致的损失承担法律责任。市场有风险,投资须谨慎。