The Improved Euler Formula | 改进欧拉公式

📚 The Improved Euler Formula | 改进欧拉公式

In AQA A-level Mathematics, numerical methods are used to approximate solutions to first-order differential equations of the form dy/dx = f(x, y) when an exact solution cannot be found. The improved Euler formula, also known as Heun’s method or the Euler-trapezoidal method, refines the basic Euler method by using an average of two slopes. This makes the approximation more accurate without requiring much extra computation.

在 AQA A-level 数学中,当一阶微分方程 dy/dx = f(x, y) 无法求出精确解时,通常使用数值方法近似求解。改进欧拉公式,又称休恩方法或欧拉-梯形方法,通过取两个斜率的平均值来改进基础欧拉方法。这样可以在不大量增加计算量的情况下显著提高近似精度。


1. The Basic Problem | 基本问题

We consider an initial value problem of the form dy/dx = f(x, y) with the starting condition y(x₀) = y₀. The aim is to estimate the value of y at equally spaced x-values such as x₁ = x₀ + h, x₂ = x₀ + 2h, and so on, where h is the step size. The improved Euler formula is a one-step method: it uses the current approximate value yₙ to calculate the next approximate value yₙ₊₁.

我们研究形如 dy/dx = f(x, y) 且满足初始条件 y(x₀) = y₀ 的一阶微分方程初值问题。目标是估计 y 在等距离点 x₁ = x₀ + h、x₂ = x₀ + 2h 等处的值,其中 h 为步长。改进欧拉公式是一种单步法:它利用当前的近似值 yₙ 计算下一个近似值 yₙ₊₁。

In the AQA specification, this topic usually appears under numerical solution of differential equations. Students are expected to use the method for a given step size and to compare the result with the standard Euler method or an exact solution.

在 AQA 考试大纲中,该主题通常出现在微分方程的数值解法部分。学生需要根据给定步长使用该方法,并将结果与标准欧拉方法或精确解进行比较。


2. Why the Standard Euler Method Needs Improvement | 为什么标准欧拉方法需要改进

The standard Euler method uses the slope at the beginning of each interval and assumes it remains constant over the whole step. This works reasonably well if the solution curve is almost straight, but real solution curves often bend. In that case, the slope at the start of the interval can be quite different from the slope at the end, so the Euler step drifts away from the true curve.

标准欧拉方法使用每个小区间起点处的斜率,并假设该斜率在整个步长内保持不变。如果解曲线近似为直线,这种方法效果尚可;但真实的解曲线常常会发生弯曲。此时,区间起点处的斜率与终点处的斜率可能相差很大,欧拉步长就会偏离真实曲线。

For example, for dy/dx = x + y with y(0) = 1 and h = 0.1, the Euler method gives y(0.1) ≈ 1.1. However, the exact value is approximately 1.110340, so the error is about 0.0103. The improved Euler formula reduces this error substantially by using a better estimate of the average slope.

例如,对于 dy/dx = x + y、y(0) = 1、h = 0.1,欧拉方法给出 y(0.1) ≈ 1.1。但精确值约为 1.110340,误差约为 0.0103。改进欧拉公式通过更好地估计平均斜率,大幅减小了这一误差。


3. Geometric Interpretation | 几何解释

At the point (xₙ, yₙ), the derivative f(xₙ, yₙ) gives the direction of the tangent to the solution curve. The Euler method follows this tangent over one step to reach a new point. The improved Euler method first takes a trial step along this tangent to the right endpoint xₙ₊₁. At the trial point, it calculates a second slope.

在点 (xₙ, yₙ) 处,导数 f(xₙ, yₙ) 给出解曲线切线的方向。欧拉方法沿这条切线走一步到达新的点。改进欧拉方法首先沿着这条切线走一个试探步到达右端点 xₙ₊₁。在试探点处,它计算第二个斜率。

The method then returns to the starting point and takes the actual step using the average of the original slope and the slope at the trial point. Geometrically, this is like replacing the curve on the interval by a chord whose direction is the mean of the two endpoint tangents. This usually stays much closer to the true solution than the basic Euler step.

然后该方法回到起点,使用原始斜率与试探点处斜率的平均值进行实际步进。从几何上看,这相当于用一条弦代替该区间上的曲线,而这条弦的方向是两个端点切线方向的平均值。这样通常比基础欧拉步更接近真实解。


4. Derivation from the Trapezium Rule | 由梯形法推导

We can derive the improved Euler formula by integrating the differential equation dy/dx = f(x, y) from xₙ to xₙ₊₁. The exact change in y is given by

我们可以通过从 xₙ 到 xₙ₊₁ 对微分方程 dy/dx = f(x, y) 积分来推导改进欧拉公式。y 的精确改变量为

y(xₙ₊₁) = y(xₙ) + ∫ f(x, y(x)) dx

Approximating the integral using the trapezium rule over the interval of width h gives

在宽度为 h 的区间上使用梯形法近似该积分,得到

y(xₙ₊₁) ≈ y(xₙ) + (h/2)[f(xₙ, y(xₙ)) + f(xₙ₊₁, y(xₙ₊₁))]

The difficulty is that the right-hand side contains y(xₙ₊₁), which is unknown. The improved Euler method replaces y(xₙ₊₁) in f with an Euler predictor y* = yₙ + h f(xₙ, yₙ). This gives a practical predictor-corrector formula.

困难在于等式右端含有未知的 y(xₙ₊₁)。改进欧拉方法用欧拉预测值 y* = yₙ + h f(xₙ, yₙ) 代替 f 中的 y(xₙ₊₁)。这样就得到了实用的预测-校正公式。

y* = yₙ + h f(xₙ, yₙ)

yₙ₊₁ = yₙ + (h/2)[f(xₙ, yₙ) + f(xₙ₊₁, y*)]

This is why the method is sometimes called the Euler-trapezoidal method: it combines an Euler predictor with a trapezium-rule corrector.

这就是该方法有时被称为欧拉-梯形法的原因:它将欧拉预测与梯形法校正结合在一起。


5. General Formula and Runge-Kutta Notation | 一般公式与龙格-库塔记号

To make the calculation systematic, we define two slopes. The first slope is simply the derivative at the current point:

为了使计算系统化,我们定义两个斜率。第一个斜率就是当前点处的导数:

k₁ = f(xₙ, yₙ)

The second slope is evaluated at the right endpoint after taking an Euler trial step:

第二个斜率是在经过欧拉试探步后,在右端点处计算的斜率:

k₂ = f(xₙ₊₁, yₙ + h k₁)

The improved Euler update is then the average of these two slopes multiplied by the step size:

改进欧拉更新值就是这两个斜率的平均值乘以步长:

yₙ₊₁ = yₙ + (h/2)(k₁ + k₂)

This is a second-order Runge-Kutta method. In an AQA exam, you should write down k₁ and k₂ clearly before substituting values into the final formula.

这是一种二阶龙格-库塔方法。在 AQA 考试中,你应当在代入数值之前先清晰地写出 k₁ 和 k₂。


6. Worked Example: dy/dx = x + y | 例题:dy/dx = x + y

Use the improved Euler formula with step size h = 0.1 to approximate y(0.1) and y(0.2) for the differential equation dy/dx = x + y, given that y(0) = 1.

使用步长 h = 0.1 的改进欧拉公式近似求解微分方程 dy/dx = x + y 在 y(0) = 1 时的 y(0.1) 和 y(0.2)。

Step 1: from x₀ = 0 to x₁ = 0.1. We have f(x, y) = x + y. At the starting point, k₁ = f(0, 1) = 0 + 1 = 1. The Euler predictor is y* = 1 + 0.1 × 1 = 1.1. Then k₂ = f(0.1, 1.1) = 0.1 + 1.1 = 1.2. Therefore

第一步:从 x₀ = 0 到 x₁ = 0.1。我们有 f(x, y) = x + y。在起点处,k₁ = f(0, 1) = 0 + 1 = 1。欧拉预测值为 y* = 1 + 0.1 × 1 = 1.1。然后 k₂ = f(0.1, 1.1) = 0.1 + 1.1 = 1.2。因此

y₁ = 1 + (0.1/2)(1 + 1.2) = 1 + 0.05 × 2.2 = 1.11

Step 2: from x₁ = 0.1 to x₂ = 0.2. Now x₁ = 0.1 and y₁ = 1.11. First, k₁ = f(0.1, 1.11) = 0.1 + 1.11 = 1.21. The predictor is y* = 1.11 + 0.1 × 1.21 = 1.231. Then k₂ = f(0.2, 1.231) = 0.2 + 1.231 = 1.431. Hence

第二步:从 x₁ = 0.1 到 x₂ = 0.2。此时 x₁ = 0.1,y₁ = 1.11。首先,k₁ = f(0.1, 1.11) = 0.1 + 1.11 = 1.21。预测值为 y* = 1.11 + 0.1 × 1.21 = 1.231。然后 k₂ = f(0.2, 1.231) = 0.2 + 1.231 = 1.431。因此

y₂ = 1.11 + (0.1/2)(1.21 + 1.431) = 1.11 + 0.05 × 2.641 = 1.24205

For this example the exact solution is y = 2eˣ − x − 1, so y(0.1) ≈ 1.110340 and y(0.2) ≈ 1.242806. The improved Euler values are very close.

该例题的精确解为 y = 2eˣ − x − 1,因此 y(0.1) ≈ 1.110340,y(0.2) ≈ 1.242806。改进欧拉

Published by TutorHao | A-Level 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