学习目标Learning Objectives - Note
第6周:数值积分公式Week 6 - Numerical Integration Rules
第6周聚焦于在原函数难求或不存在闭式表达时对曲线下面积进行近似。Bilingual notes on right endpoint, trapezoid, and Simpson methods.
第6周聚焦于在原函数难求或不存在闭式表达时对曲线下面积进行近似。
Week 6 focuses on approximating area under curve when antiderivatives are difficult or unavailable.
学习目标
Learning Objectives
-
Interpret AUC (area under curve) as a definite integral.
-
将 AUC(曲线下面积)解释为定积分。
-
在均匀划分上计算右端点近似。
-
Compute right-endpoint approximations on uniform partitions.
-
Apply trapezoid and Simpson rules with correct weight vectors.
-
正确使用梯形法与 Simpson 法及其权向量。
-
理解细分加密对积分近似精度的影响。
-
Understand refinement effects when increasing subdivision count.
关键概念
Key Concepts
-
AUC notation: .
-
AUC 记号:。
-
均匀剖分:,节点为 。
-
Uniform partition: and .
-
数值积分(Numerical Integration)可写为“总底长乘加权平均高度”。
-
Numerical integration can be written as base times weighted average height.
-
常见公式的差异主要体现在采样点与权重上。
-
Common rules differ mainly by sampling pattern and weights.
定义与公式
Definitions and Formulas
Right-endpoint approximation (REA):
右端点法(REA):
.
复化梯形公式(Trapezoidal Rule):
Composite trapezoid rule:
.
Composite Simpson rule (even ):
复化 Simpson 公式( 为偶数):
.
Single-panel Simpson weights are proportional to .
单区间 Simpson 法的权重与 成比例。
推导
Derivations
右端点和作为黎曼近似(Riemann Approximation)
Right-Endpoint Sum as Riemann Approximation
将区间分成 个宽度为 的小区间。
Partition interval into subintervals of width .
每个小区间用“右端点高度的矩形”近似面积。
Approximate each subarea by rectangle with right endpoint height.
Summing all rectangles gives REA.
所有矩形求和得到 REA。
梯形法权重结构
Trapezoid Weight Structure
每个内点在相邻两个梯形中各出现一次。
Each interior node appears in two neighboring trapezoids.
因此内点权重相对于端点翻倍。
Thus interior weights are doubled relative to endpoints.
Simpson from Quadratic Interpolation
由二次插值得到 Simpson 公式
在一个面板上用左端点、中点、右端点拟合二次多项式。
Fit a quadratic through left, midpoint, and right sample values on a panel.
对该二次多项式积分得到 权重结构。
Integrating that quadratic gives the weight pattern.
例题精讲
Worked Examples
Example Block 1: REA for on with 例题模块1: 在 上 的 REA
,节点为 、。
, nodes are , .
.
真值为 。
True value is .
例题模块2: 在 上 的梯形法
Example Block 2: Trapezoid for on with
.
Example Block 3: Simpson for on 例题模块3: 在 上的 Simpson
.
For this quadratic, Simpson is exact.
对该二次函数,Simpson 公式给出精确结果。
例题模块4:近似
Example Block 4: Approximating
Use with Simpson sampling at .
利用 ,在 处使用 Simpson 采样。
.
误差(Error)分析
Error Analysis
-
Right-endpoint and trapezoid methods are generally lower-order than Simpson.
-
右端点法与梯形法通常低阶于 Simpson 法。
-
For smooth functions, Simpson often provides much smaller error for similar sample count.
-
对光滑函数,在相近采样数下 Simpson 往往误差(Error)更小。
-
网格加密()通常提升精度,但计算成本上升。
-
Refinement (, ) usually improves approximation but increases cost.
常见错误
Common Mistakes
警示模块
Warning Block
-
Using odd with composite Simpson without handling panel pairing.
-
在复化 Simpson 中使用奇数 且未处理面板配对。
-
在梯形法中遗漏端点的半权重。
-
Forgetting endpoint half-weights in trapezoid rule.
-
将节点索引 与分割数 混淆。
-
Confusing node index with subinterval count .
总结
Summary
总结模块
Summary Block
-
Week 6 built the core quadrature toolkit: REA, trapezoid, and Simpson rules.
-
第6周建立了核心求积工具:REA、梯形法与 Simpson 法。
-
所有方法都可视为采样高度的加权和。
-
All methods can be viewed as weighted sums of sampled heights.
-
权重设计决定了偏差结构与精度阶次。
-
Weight design determines both bias and accuracy order.
练习题
Practice Questions
-
Compute REA, trapezoid, and Simpson approximations for with comparable grids.
-
在可比网格下计算 的 REA、梯形法和 Simpson 近似值。
-
Derive the composite Simpson weight vector for three panels on .
-
推导区间 上三面板复化 Simpson 的权向量。
-
Verify numerically that Simpson is exact for any cubic polynomial on one panel.
-
通过数值实验验证单面板 Simpson 对任意三次多项式是精确的。