学习目标Learning Objectives - Note
第5周:数值微分Week 5 - Numerical Differentiation
第5周介绍如何由采样函数值近似导数。Bilingual notes on finite-difference derivative formulas.
第5周介绍如何由采样函数值近似导数。
Week 5 introduces derivative approximation from sampled function values.
学习目标
Learning Objectives
-
使用前向、后向和中心差分近似一阶导数。
-
Use forward, backward, and central differences for first derivatives.
-
由二次插值推导三点公式。
-
Derive the three-point formulas from quadratic interpolation.
-
在非均匀与均匀网格上进行导数估计。
-
Handle both non-uniform and uniform grids in derivative estimation.
-
利用差商(Divided Difference)结构计算二阶导数近似。
-
Compute second derivatives from divided-difference structure.
关键概念
Key Concepts
-
差分法通过邻近函数值近似导数。
-
Finite differences approximate derivatives using nearby function values.
-
网格记号:步长 ,节点 (均匀网格)。
-
Grid notation: step size , nodes (uniform case).
-
差商(Divided Difference)提供了从模型出发推导导数公式的路径。
-
Divided differences provide a model-based path to derivative formulas.
-
在内点处,中心公式通常比单边公式更精确。
-
Central formulas are often more accurate than one-sided formulas at interior points.
定义与公式
Definitions and Formulas
前向差分:
Forward difference:
.
后向差分:
Backward difference:
.
三点中心一阶导(均匀网格):
Three-point central first derivative (uniform grid):
.
三点二阶导:
Three-point second derivative:
.
非均匀三点模型:若节点为 ,使用
Non-uniform three-point model: if nodes are , use
,再计算 。
and evaluate .
推导
Derivations
中心差分是前向与后向的平均
Central Difference as Average of Forward and Backward
.
该表达在泰勒展开中会抵消一阶偏差项。
This cancels first-order bias terms in Taylor expansion.
由牛顿二次插值推导三点公式
Three-Point Formula from Newton Quadratic
Fit through .
通过 拟合 。
对 求导并在各节点取值以近似导数。
Differentiate and evaluate at each node to approximate derivatives.
当间距均匀且 时,公式化简为中心差分形式。
For uniform spacing , formulas simplify to central differences.
例题精讲
Worked Examples
例题模块1: 在 的估计
Example Block 1: at ,
前向差分:。
Forward difference: .
后向差分:。
Backward difference: .
中心差分:(本例恰为精确值)。
Central difference: (exact here).
例题模块2: 的指数函数样本
Example Block 2: Exponential Samples at
使用三点框架估计 。
Use non-uniform/three-point framework to estimate .
与单边差分相比,中心估计在内点更接近真值 。
Compared with one-sided differences, central estimates better match true value at interior point.
例题模块3:在 的三点多项式恢复
Example Block 3: Three-Point Polynomial Recovery at
对 ,重构二次模型可得精确导数 、、。
For , reconstructed quadratic gives exact derivatives , , .
误差(Error)分析
Error Analysis
-
前向/后向差分是一阶精度:误差(Error) 。
-
Forward/backward differences are first-order accurate: error .
-
中心一阶导公式是二阶精度:误差(Error) 。
-
Central first-derivative formula is second-order accurate: error .
-
在均匀网格上,三点二阶导公式同样是二阶精度。
-
Three-point second-derivative formula is also second-order accurate on uniform grids.
-
即使截断误差(Error)随 减小,过小 也会放大舍入误差(Error)。
-
Too small can increase round-off error even if truncation error decreases.
常见错误
Common Mistakes
警示模块
Warning Block
-
在中心差分分母中误写 。
-
Using incorrectly in central denominator.
-
在非均匀节点上误用均匀网格公式。
-
Applying uniform-grid formulas on non-uniform nodes.
-
在差商(Divided Difference)中混淆索引顺序。
-
Mixing index order in divided differences.
-
解释导数量级时忽略 的单位与尺度。
-
Ignoring unit/scale of when interpreting derivative magnitude.
总结
Summary
总结模块
Summary Block
-
第5周建立了由离散数据进行导数估计的实用方法。
-
Week 5 established practical derivative estimation from tabulated data.
-
三点框架统一了非均匀与均匀情形。
-
The three-point framework unifies non-uniform and uniform formulas.
-
中心差分是相对于单边差分的重要精度提升。
-
Central differences are a key accuracy upgrade over one-sided approximations.
练习题
Practice Questions
-
对 ,取 ,分别用前向、后向、中心差分估计 。
-
Estimate for using forward, backward, and central differences with .
-
给定节点 ,用差商(Divided Difference)形式推导 。
-
Using nodes , , , derive in divided-difference form.
-
在 处比较 的数值二阶导与精确值,并测试多个 。
-
Compare numerical and exact second derivatives for at for several values.