课程回顾与目标Review and Learning Objectives - Note
笔记:week8Week 8 - Numerical Differentiation and Integration Review and Error Analysis
数值微分与积分的综合复习,重点推导公式、误差估计及外推方法。A thorough review of numerical differentiation and integration focusing on derivations, error formulas, and Romberg extrapolation.
课程回顾与目标
Review and Learning Objectives
-
本周结合数值微分与积分的核心内容,重点复习三点差分公式、积分近似规则及误差(Error)推导。
-
This week combines core concepts in numerical differentiation and integration with a focus on reviewing three-point difference formulas, quadrature rules, and error analysis.
-
学习目标包括:
-
Learning objectives include:
-
利用三个采样点拟合多项式导出均匀与非均匀网格差分公式。
-
Derive difference formulas on uniform and non-uniform grids via polynomial interpolation.
-
理解梯形法与 Simpson 公式的推导过程及其误差(Error)阶。
-
Understand derivations of trapezoid and Simpson rules along with their error orders.
-
掌握外推技术(如 Romberg 外推)以提升数值积分(Numerical Integration)精度。
-
Master extrapolation techniques (e.g. Romberg extrapolation) to improve numerical integration accuracy.
-
分析积分误差(Error)的符号和权重,理解误差(Error)消除原理。
-
Analyze the signs and weights of integration errors, and understand the error cancellation principle.
数值微分回顾
Numerical Differentiation Review
三点差分法基础
Three-Point Differentiation Formulas
给定节点 及对应函数值 ,通过二次插值
Given nodes with values , fit quadratic
导数近似为
Derivatives approximated by
均匀网格简化版本:设 ,则
Uniform grid simplification at :
- 一阶导数中心差分公式
- First derivative central difference:
- 二阶导数中心差分公式
- Second derivative central difference:
实例练习
Example Practice
给定数据点 ,用三点公式估计 。
ExampleBlock:
Given points , estimate using three-point formulas.
数值积分(Numerical Integration)基本方法
Fundamental Numerical Integration Methods
右端点近似法 (REA)
Right-Endpoint Approximation (REA)
区间 均匀划分 段,步长 ,用右端点采样值近似面积:
Partition into subintervals each of width , approximate area by right endpoints:
梯形法
Trapezoid Rule
复化梯形公式(Trapezoidal Rule)权重在内点翻倍,公式为:
Simpson 法
Composite Simpson Rule
当 为偶数时,采样点分为奇数和偶数索引点,权重结构为:
Simpson 单区间权重
Simpson Single Panel Weights
单面板 Simpson 法权重比例为 。
积分误差(Error)分析
Integration Error Analysis
Taylor 展开与误差(Error)阶
Taylor Expansion and Error Order
以函数在点 处展开:
积分区间取对称区间 ,真积分值计算为:
Simpson 近似权重为 ,样本分别在 ,权重向量为 ,有:
Simpson 局部误差(Error)
Local Error of Simpson Rule
优化 使得二次项误差(Error)补偿,得 ,权重即为 Simpson 的 。
局部误差(Error)项主导为:
即 Simpson 公式具有五阶局部误差(整体四阶精度)。
梯形法与中点法误差(Error)符号互异
Opposite Signs of Trapezoid and Midpoint Errors
-
梯形法误差(Error)为:
-
中点法误差(Error)为:
符号相反,利用这一对立可以进行误差(Error)消除。
The errors have opposite signs enabling weighted error cancellation.
Simpson 公式为梯形与中点混合
Simpson as a Mixture of Trapezoid and Midpoint Rules
选择混合参数 使得 主导误差(Error)消除,即
由此得到 Simpson 权重为:
Romberg 外推方法
Romberg Extrapolation
粗细网格积分近似
Coarse-Fine Grid Approximations
记 和 分别为步长为 与 的积分近似:
通过线性组合消除主误差(Error)项 ,得更高阶近似:
这是 Romberg 外推的核心思想。
五点 Newton-Cotes 权重通过混合获得
Five-Point Newton-Cotes Weights by Error-Weight Plot
利用粗网格和细网格的加权和,解误差(Error)线性方程获得五点权重:
对应 Simpson 相关较高阶的 Newton-Cotes 配置。
总结
Summary
- 三点差分法为数值微分提供方便的多点插值模板,均匀网格下有简洁公式。
- 右端点法、梯形法与 Simpson 法为常用的数值积分(Numerical Integration)方法,权重设计决定精度与误差(Error)结构。
- Simpson 公式等价于梯形与中点法的误差(Error)消除型加权组合,达到更高的局部误差(Error)阶。
- Romberg 外推通过多尺度积分估计线性组合,实现误差(Error)高阶抵消与数值精度提升。
练习题
Practice Questions
<PracticeQuestionBlock>- 给定函数 在 处的值为 ,计算利用三点差分法估计 。
- Given values at , compute the estimate for using three-point formula.
- 通过右端点近似法计算 在 区间上分成 段的积分近似值,并与精确积分比较。
- Use the right-endpoint approximation to estimate the integral of on with subintervals and compare with the exact value.
- 推导梯形法在区间 上积分误差(Error)的主导项。
- Derive the leading error term of the trapezoid rule approximating the integral over .
- 证明 Simpson 公式的近似误差(Error)为局部 ,整体为 。
- Prove that Simpson's rule has local error order and global error order .
- 利用 Romberg 外推法给出 和 ,组成更高阶积分近似公式。
- Using Romberg extrapolation, given integrals and compute a higher-order accurate integral estimate.