Trapezoidal Rule for Approximate Integration | 梯形法则近似积分

📚 Trapezoidal Rule for Approximate Integration | 梯形法则近似积分

When you meet a definite integral such as ∫₀¹ exp(−x²) dx, there is no elementary antiderivative that can be written in terms of standard functions. Even if a function has an antiderivative, it may be too complicated to use. The trapezoidal rule offers a simple numerical way to estimate such integrals to any required accuracy.

当你遇到诸如 ∫₀¹ exp(−x²) dx 的定积分时,不存在用初等函数表示的原函数。即使一个函数有原函数,也可能过于复杂而不便使用。梯形法则提供了一种简单的数值方法,可按需要精度估计这类积分。


1. Introduction | 引言

The definite integral ∫ₐᵇ f(x) dx represents the area between the curve y = f(x), the x-axis, and the vertical lines x = a and x = b. In many practical problems, this area cannot be found exactly because the antiderivative is unknown or because the function is only given as a table of values. Numerical integration methods, such as the trapezoidal rule, are then used to obtain a good approximation.

定积分 ∫ₐᵇ f(x) dx 表示曲线 y = f(x)、x 轴以及直线 x = a、x = b 所围成的面积。在许多实际问题中,由于原函数未知或函数仅以数值表形式给出,这一面积无法精确求出。此时便可使用数值积分方法(如梯形法则)来获得较好的近似值。


2. The Basic Idea | 基本思想

The trapezoidal rule approximates the area under a curve by dividing the interval [a, b] into several narrow strips. Instead of using rectangles, it uses trapezoids, whose slanted top edges follow the straight line connecting two adjacent points on the curve. The sum of the areas of these trapezoids gives an estimate of the definite integral.

梯形法则通过将区间 [a, b] 分成若干窄条来逼近曲线下的面积。它不用矩形,而是用梯形;梯形的斜边是连接曲线上两个相邻点的直线。所有这些梯形面积之和就构成对定积分的估计值。


3. Derivation of the Formula | 公式推导

Divide [a, b] into n equal subintervals. The endpoints are x₀ = a, x₁, …, xₙ = b, and the common width is h = (b − a)/n. The vertical height at each endpoint is yᵢ = f(xᵢ). The area of the trapezoid formed between xᵢ and xᵢ₊₁ is h(yᵢ + yᵢ₊₁)/2.

将 [a, b] 分成 n 个相等子区间。端点依次为 x₀ = a, x₁, …, xₙ = b,公共宽度为 h = (b − a)/n。每个端点处的纵坐标为 yᵢ = f(xᵢ)。在 xᵢ 与 xᵢ₊₁ 之间形成的梯形面积为 h(yᵢ + yᵢ₊₁)/2。

Adding the areas of all n trapezoids from i = 0 to n − 1, and noticing that every interior y-value appears twice, gives the composite trapezoidal rule:

将所有 n 个梯形从 i = 0 到 n − 1 相加,并注意每个内部 y 值出现两次,即可得到复合梯形法则:

∫ₐᵇ f(x) dx ≈ h/2 [y₀ + yₙ + 2(y₁ + y₂ + … + yₙ₋₁)]


4. Worked Example | 实例

Estimate ∫₁² (1/x) dx using the trapezoidal rule with n = 4. Here a = 1, b = 2, so h = (2 − 1)/4 = 0.25. The x-values are 1, 1.25, 1.5, 1.75 and 2. Their corresponding y-values are listed below.

用梯形法则以 n = 4 估计 ∫₁² (1/x) dx。这里 a = 1,b = 2,故 h = (2 − 1)/4 = 0.25。x 值分别为 1、1.25、1.5、1.75 和 2,对应的 y 值如下表所示。

x 1 1.25 1.5 1.75 2
y = 1/x 1 0.8 0.6667 0.5714 0.5

Substituting into the formula:

将数值代入公式:

I ≈ 0.25/2 [1 + 0.5 + 2(0.8 + 0.6667 + 0.5714)]

= 0.125 [1.5 + 2(2.0381)] = 0.125 × 5.5762 = 0.6970

The true value is ln 2 ≈ 0.6931, so the trapezoidal approximation of 0.6970 is very close.

真实值为 ln 2 ≈ 0.6931,因此梯形近似值 0.6970 非常接近。


5. Overestimate and Underestimate | 高估与低估

For a function that is concave up on the whole interval (f″

Published by TutorHao | Mathematics Revision Series | aleveler.com

更多咨询请联系16621398022(同微信)

Comments

屏轩国际教育cambridge primary/secondary checkpoint, cat4, ukiset,ukcat,igcse,alevel,PAT,STEP,MAT, ibdp,ap,ssat,sat,sat2课程辅导,国外大学本科硕士研究生博士课程论文辅导

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from aleveler.com

Subscribe now to keep reading and get access to the full archive.

Continue reading