YYnotesYYNotes

学习目标Learning Objectives - Note

#学习目标#关键概念#定义与公式#推导

第7周:积分误差与外推Week 7 - Integration Error and Extrapolation

第7周先回顾数值微分,再重点推导积分误差并讨论外推改进。Bilingual notes on Simpson error, trapezoid-midpoint comparison, and Romberg ideas.

第7周先回顾数值微分,再重点推导积分误差(Error)并讨论外推改进。

Week 7 reviews numerical differentiation and then emphasizes integration error derivation and extrapolation.

学习目标

Learning Objectives

  • 在均匀网格上重新推导三点微分公式。

  • Re-derive three-point differentiation formulas on uniform grids.

  • Derive Simpson error order from Taylor expansion.

  • 由泰勒展开推导 Simpson 误差(Error)阶。

  • 比较梯形法与中点法误差(Error)结构。

  • Compare trapezoid and midpoint error structures.

  • Understand Romberg-style extrapolation as weighted error cancellation.

  • 理解 Romberg 型外推本质是加权误差(Error)消去。

关键概念

Key Concepts

  • 对光滑函数,求积误差(Error)可按 hh 的幂展开。

  • For smooth ff, quadrature error can be expanded in powers of hh.

  • Simpson can be interpreted as a weighted combination of trapezoid and midpoint rules.

  • Simpson 可解释为梯形法与中点法的加权组合。

  • 通过选取权重消去主导误差(Error)项。

  • Error cancellation is achieved by choosing weights that eliminate leading terms.

  • 外推通过组合粗网格与细网格结果提升精度。

  • Extrapolation combines coarse and fine-grid estimates to improve accuracy.

定义与公式

Definitions and Formulas

均匀三点导数回顾:

Uniform three-point derivative review:

f(x)f(x+h)f(xh)2h,f(x)f(x+h)2f(x)+f(xh)h2f'(x)\approx\dfrac{f(x+h)-f(x-h)}{2h},\quad f''(x)\approx\dfrac{f(x+h)-2f(x)+f(x-h)}{h^2}.

Single-panel Simpson on [h,h][-h,h]:

区间 [h,h][-h,h] 的单面板 Simpson:

S(h)=2hf(h)+4f(0)+f(h)6S(h)=2h\cdot\dfrac{f(-h)+4f(0)+f(h)}{6}.

Classical local Simpson error form:

经典 Simpson 局部误差(Error)形式:

S(h)hhf(x)dx=Ch5,Cf(4)(ξ)S(h)-\int_{-h}^{h}f(x)\,dx = C h^5,\quad C\propto f^{(4)}(\xi).

梯形法与中点法主导误差(Error)符号相反,可用于加权抵消。

Trapezoid and midpoint leading errors have opposite signs, enabling weighted cancellation.

推导

Derivations

Simpson Error via Taylor Series

用泰勒级数推导 Simpson 误差(Error)

Expand f(x)=a+bx+cx2+dx3+ex4+f(x)=a+bx+cx^2+dx^3+ex^4+\cdots around 00.

  1. 00 点附近展开 f(x)=a+bx+cx2+dx3+ex4+f(x)=a+bx+cx^2+dx^3+ex^4+\cdots

  2. 在对称区间 [h,h][-h,h] 上逐项积分。

  3. Integrate term-by-term over symmetric interval [h,h][-h,h].

  4. Compare with Simpson weighted average of f(h),f(0),f(h)f(-h),f(0),f(h).

  5. 与 Simpson 对 f(h),f(0),f(h)f(-h),f(0),f(h) 的加权平均比较。

  6. 首个未被消去的项与 h5h^5 成正比,因此局部误差(Error)O(h5)O(h^5)

  7. The first non-canceled term is proportional to h5h^5, so the local error is O(h5)O(h^5).

梯形-中点混合

Trapezoid-Midpoint Mixing

ET,EME_T,E_M 分别表示梯形法与中点法误差(Error)

Let ETE_T and EME_M denote trapezoid and midpoint errors.

选择混合公式 λT+(1λ)M\lambda T+(1-\lambda)M 使主导 O(h3)O(h^3) 面积误差(Error)为零。

Choose mixture λT+(1λ)M\lambda T+(1-\lambda)M so leading O(h3)O(h^3) area error vanishes.

The resulting weights recover Simpson's (1,4,1)/6(1,4,1)/6 pattern.

由此得到 Simpson 的 (1,4,1)/6(1,4,1)/6 权重结构。

Coarse-Fine Extrapolation (Romberg Idea)

粗细网格外推(Romberg 思想)

Suppose Ih=I+Khp+I_h=I+Kh^p+\cdots and Ih/2=I+K(h/2)p+I_{h/2}=I+K(h/2)^p+\cdots.

Ih=I+Khp+I_h=I+Kh^p+\cdotsIh/2=I+K(h/2)p+I_{h/2}=I+K(h/2)^p+\cdots

通过线性组合可消去 KhpKh^p,得到更高阶估计。

A linear combination can eliminate KhpKh^p and produce higher-order estimates.

This is the central mechanism of Romberg extrapolation.

这就是 Romberg 外推的核心机制。

例题精讲

Worked Examples

例题模块1:三点微分回顾

Example Block 1: Review of Three-Point Differentiation

给定 xh,x,x+hx-h,x,x+h 处样本,使用中心公式计算 f(x)f'(x)f(x)f''(x)

Given samples at xh,x,x+hx-h,x,x+h, use central formulas for f(x)f'(x) and f(x)f''(x).

这与本周复习表格结构一致。

This matches the week review table structure.

Example Block 2: Simpson on 0111+x2dx\int_0^1\dfrac{1}{1+x^2}dx 例题模块2:Simpson 计算 0111+x2dx\int_0^1\dfrac{1}{1+x^2}dx

Using points 0,0.5,10,0.5,1, Simpson gives 16(1+40.8+0.5)=0.78333\dfrac{1}{6}(1+4\cdot0.8+0.5)=0.78333\ldots.

使用点 0,0.5,10,0.5,1,Simpson 给出 16(1+40.8+0.5)=0.78333\dfrac{1}{6}(1+4\cdot0.8+0.5)=0.78333\ldots

真值为 π/40.785398\pi/4\approx0.785398\ldots误差(Error)较小。

True value is π/40.785398\pi/4\approx0.785398\ldots, so error is small.

例题模块3:误差(Error)-权重图解释

Example Block 3: Error-Weight Plot Interpretation

课堂比较显示梯形与中点法主导误差(Error)项具有比例关系且趋势相反。

Lecture comparison indicates trapezoid and midpoint leading terms have ratio and opposite tendency.

Weighted mixing suppresses leading error and motivates Simpson-type coefficients.

加权混合可抑制主误差(Error),从而得到 Simpson 型系数。

Example Block 4: Five-Point Newton-Cotes Pattern (Lecture Extension) 例题模块4:五点 Newton-Cotes 结构(课堂扩展)

组合粗细网格估计可得到与 (7,32,12,32,7)(7,32,12,32,7) 成比例的五点权重。

Combining coarse and fine estimates yields a five-point weight vector proportional to (7,32,12,32,7)(7,32,12,32,7).

This is consistent with higher-order closed Newton-Cotes construction.

这与高阶闭型 Newton-Cotes 构造一致。

误差(Error)分析

Error Analysis

  • Simpson local panel error is O(h5)O(h^5), much smaller than trapezoid/midpoint local errors.

  • Simpson 单面板局部误差(Error)O(h5)O(h^5),显著小于梯形/中点法。

  • 复化方法会累积各面板误差(Error),从而形成不同全局阶次。

  • Composite methods accumulate local errors across panels, giving different global orders.

  • 外推通过消去已知渐近误差(Error)项来提高阶次。

  • Extrapolation improves order by canceling known asymptotic terms.

常见错误

Common Mistakes

警示模块

Warning Block

  • 混淆局部误差(Error)阶与全局误差(Error)阶。

  • Mixing local-error and global-error orders.

  • 在泰勒误差(Error)常数中遗漏阶乘因子。

  • Dropping factorial factors in Taylor-based error constants.

  • Using Simpson combination weights incorrectly when panel widths differ.

  • 在面板宽度不一致时错误套用 Simpson 组合权重。

  • 在缺少光滑性条件时误以为外推必然提高精度。

  • Assuming extrapolation always improves accuracy without smoothness conditions.

总结

Summary

总结模块

Summary Block

  • 第7周贯通了微分回顾、积分误差(Error)理论与外推设计。

  • Week 7 connected differentiation review, integration error theory, and extrapolation design.

  • 核心原则是结构化的:先识别主导误差(Error)项,再通过加权组合将其消去。

  • The main principle is structural: identify dominant error terms, then cancel them by weighted combinations.

  • This principle underlies Simpson refinement and Romberg-style acceleration.

  • 这一原则支撑了 Simpson 改进与 Romberg 型加速。

练习题

Practice Questions

  • Derive Simpson local error on [h,h][-h,h] up to the h5h^5 term using Taylor expansion.

  • 用泰勒展开推导 [h,h][-h,h] 上 Simpson 的局部误差(Error)h5h^5 项。

  • Show algebraically how combining trapezoid and midpoint rules yields Simpson weights.

  • 用代数推导说明如何由梯形法与中点法组合得到 Simpson 权重。

  • Given coarse and fine Simpson estimates, design an extrapolated estimate that cancels the leading error term.

  • 给定粗网格与细网格 Simpson 结果,构造能消去主导误差(Error)项的外推估计。