The Improved Euler Formula | 改进欧拉公式

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

When faced with a first-order ordinary differential equation of the form d y / d x = f(x, y) together with an initial condition, we often cannot find a simple analytical solution. In such cases, numerical methods give approximate values of y at chosen points. The improved Euler formula, also known as Heun’s method, is a powerful refinement of the basic Euler method and is a standard topic in AQA A-Level Mathematics.

当我们遇到形如 d y / d x = f(x, y) 的一阶常微分方程并附带初始条件时,往往无法找到简单的解析解。此时,数值方法可以在选定的点上给出 y 的近似值。改进欧拉公式,又称亨氏法,是基本欧拉法的重要改进,也是 AQA 数学考试中的标准内容。


1. The Initial Value Problem and Numerical Approximation | 初值问题与数值近似

An initial value problem for a first-order ODE can be written as d y / d x = f(x, y), with the condition y(x₀) = y₀. The goal is to estimate y(x) over an interval using steps of width h.

一阶常微分方程的初值问题可以写成 d y / d x = f(x, y),并满足条件 y(x₀) = y₀。我们的目标是在一个区间上用步长 h 估计 y(x) 的取值。

Numerical methods split the interval into steps: x₀, x₁, x₂, …, where xₙ₊₁ = xₙ + h. At each step, an estimate yₙ₊₁ for the true solution y(xₙ₊₁) is computed from the previous estimate yₙ.

数值方法将区间分割成若干步:x₀, x₁, x₂, …,其中 xₙ₊₁ = xₙ + h。在每一步,从上一个估计值 yₙ 计算出真解 y(xₙ₊₁) 的估计值 yₙ₊₁。


2. Review of Euler’s Method | 欧拉法回顾

The basic Euler method uses the current slope f(xₙ, yₙ) to step forward:

基本欧拉法利用当前斜率 f(xₙ, yₙ) 向前推进:

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

This formula comes from the tangent line approximation. It is simple but has limited accuracy because it uses only the slope at the left end of the interval.

这个公式来自切线近似。它简单,但精度有限,因为它只使用了区间左端点的斜率。


3. Why We Need an Improved Method | 为什么需要改进方法

Euler’s method often underestimates or overestimates the solution when the slope changes quickly across the interval [xₙ, xₙ₊₁]. A better approach is to average two slopes: one at the start and one at a predicted point near the end.

欧拉法在区间 [xₙ, xₙ₊₁] 上斜率变化较快时,往往会低估或高估解。更好的办法是对两个斜率取平均:一个是起始点的斜率,另一个是在接近终点处预测点的斜率。

This idea leads to the improved Euler formula, sometimes called the midpoint rule for slopes or the predictor-corrector method.

这一思想引出了改进欧拉公式,有时也称为斜率中点法或预测-校正法。


4. The Improved Euler Formula: Derivation | 改进欧拉公式的推导

Instead of using only the slope at (xₙ, yₙ), we first make a trial step to obtain a predicted value:

我们不只使用点 (xₙ, yₙ) 处的斜率,而是先做一个试探步得到预测值:

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

We then calculate the slope at the predicted point f(xₙ₊₁, uₙ₊₁). The improved Euler formula averages the two slopes:

然后计算预测点处的斜率 f(xₙ₊₁, uₙ₊₁)。改进欧拉公式对这两个斜率取平均:

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

This is also often written using k₁ and k₂ notation:

这一公式也常用 k₁ 和 k₂ 的记号表示:

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

yₙ₊₁ = yₙ + ½ (k₁ + k₂)

The method is equivalent to applying the trapezoidal rule to the equation y′ = f(x, y).

该方法等价于对方程 y′ = f(x, y) 应用梯形法则。


5. The Algorithm in Steps | 算法步骤

To implement the improved Euler formula, follow these steps.

实现改进欧拉公式时,请按以下步骤进行。

  • Start with x₀, y₀ and choose a step size h.
  • Compute k₁ = h f(x₀, y₀).
  • Compute k₂ = h f(x₀ + h, y₀ + k₁).
  • Find y₁ = y₀ + ½(k₁ + k₂).
  • Repeat with x₁ = x₀ + h.
  • 从 x₀, y₀ 出发,选择步长 h。
  • 计算 k₁ = h f(x₀, y₀)。
  • 计算 k₂ = h f(x₀ + h, y₀ + k₁)。
  • 求 y₁ = y₀ + ½(k₁ + k₂)。
  • 令 x₁ = x₀ + h,重复以上步骤。

6. A Full Worked Example | 完整示例

Consider the initial value problem d y / d x = x + y, y(0) = 1. Use the improved Euler formula with h = 0.2 to estimate y(0.4).

考虑初值问题 d y / d x = x + y, y(0) = 1。用改进欧拉公式,取 h = 0.2,估计 y(0.4)。

First step: x₀ = 0, y₀ = 1.

第一步:x₀ = 0, y₀ = 1。

k₁ = 0.2 × (0 + 1) = 0.2

k₂ = 0.2 × (0.2 + 1.2) = 0.2 × 1.4 = 0.28

y₁ = 1 + ½(0.2 + 0.28) = 1 + 0.24 = 1.24

Second step: x₁ = 0.2, y₁ = 1.24.

第二步:x₁ = 0.2, y₁ = 1.24。

k₁ = 0.2 × (0.2 + 1.24) = 0.2 × 1.44 = 0.288

k₂ = 0.2 × (0.4 + 1.528) = 0.2 × 1.928 = 0.3856

y₂ = 1.24 + ½(0.288 + 0.3856) = 1.24 + 0.3368 = 1.5768

Hence the improved Euler estimate for y(0.4) is 1.5768. For comparison, the exact solution y = 2eˣ − x − 1 gives y(0.4) ≈ 1.5836, so the error is small.

因此 y(0.4) 的改进欧拉估计值为 1.5768。比较可得,精确解 y = 2eˣ − x − 1 给出 y(0.4) ≈ 1.5836,误差很小。


7. Error Analysis | 误差分析

Each step of Euler’s method has a local truncation error proportional to h², and the global error over a fixed interval is proportional to h. For the improved Euler method, the local error is proportional to h³, while the global error is proportional to h².

欧拉法每一步的局部截断误差与 h² 成正比,在固定区间上的全局误差与 h 成正比。对于改进欧拉法,局部误差与 h³ 成正比,而全局误差与 h² 成正比。

This means that halving h in the improved Euler method reduces the global error by a factor of four, whereas with Euler’s method it only halves. Thus the improved Euler formula is a second-order method.

这意味着在改进欧拉法中将 h 减半,全局误差会缩小为原来的四分之一,而欧拉法则只缩小一半。因此改进欧拉公式是二阶方法。

Local error: Euler O(h²), Improved Euler O(h³)

Global error: Euler O(h), Improved Euler O(h²)


8. Comparison: Euler vs Improved Euler | 比较:欧拉法与改进欧拉法

Method Formula Global Error Work per step
Euler yₙ₊₁ = yₙ + h f(xₙ, yₙ) O(h) 1 evaluation of f
Improved Euler yₙ₊₁ = yₙ + ½(k₁ + k₂) O(h²) 2 evaluations of f

The improved Euler method costs twice as many evaluations of f per step, but it is far more accurate, often allowing a larger step size for the same accuracy.

改进欧拉法每一步需要计算两次 f,但精度高得多,因此在达到同样精度时往往可以使用更大的步长。


9. Limitations and Practical Use | 局限性与实际应用

Like all explicit numerical methods, the improved Euler formula can become unstable if the step size is too large. It is also only an approximation and cannot capture complicated behaviour such as chaos unless h is very small or a higher-order method is used.

与所有显式数值方法一样,如果步长过大,改进欧拉公式可能会变得不稳定。它也只是近似方法,除非 h 很小或改用更高阶方法,否则无法捕捉混沌等复杂行为。

In practice, the improved Euler formula is used when a balance between simplicity and accuracy is needed. It is also a stepping stone to the classical Runge–Kutta fourth-order method, which is used in most computational software.

在实践中,当需要兼顾简单与精度时,会使用改进欧拉公式。它也是通向经典四阶龙格-库塔方法的桥梁,后者被大多数计算软件所采用。


10. Exam Tips for AQA | AQA考试提示

In AQA examinations, use the formula book correctly and show all values of k₁, k₂ clearly. Work to at least 4 decimal places in intermediate calculations.

在 AQA 考试中,要正确使用公式册,并清晰写出每一步 k₁、k₂ 的数值。中间计算至少保留 4 位小数。

  • Write down the recurrence formulas before substituting numbers.
  • Use tables to organise xₙ, yₙ, k₁, k₂, yₙ₊₁.
  • If asked to compare with a known value, state error = |exact − approximate|.
  • Be careful with h: it is the step length between consecutive x values.
  • 代入数值前先写出递推公式。
  • 用表格整理 xₙ, yₙ, k₁, k₂, yₙ₊₁。
  • 若要求与已知值比较,说明误差 = |精确值 − 近似值|。
  • 注意 h 是相邻 x 值之间的步长。

11. Summary | 总结

The improved Euler formula is a second-order numerical method for solving initial value problems. It improves on Euler’s method by averaging two slopes: one at the start of the interval and one at a predicted point at the end.

改进欧拉公式是求解初值问题的二阶数值方法。它对区间起始点和区间末端预测点的两个斜率取平均,从而改进了欧拉法。

The key formulas are k₁ = h f(xₙ, yₙ), k₂ = h f(xₙ + h, yₙ + k₁), and yₙ₊₁ = yₙ + ½(k₁ + k₂). With a global error of order h², it is a practical and examinable method in A-Level Mathematics.

关键公式为 k₁ = h f(xₙ, yₙ),k₂ = h f(xₙ + h, yₙ + k₁),以及 yₙ₊₁ = yₙ + ½(k₁ + k₂)。其全局误差为 h² 阶,是 A-Level 数学中实用且需要掌握的考试方法。

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