📚 The Improved Euler Formula | 改进欧拉公式
In AQA A-Level Mathematics, you need to solve first-order differential equations numerically when an exact solution is difficult or impossible to find. The improved Euler formula, also called Heun’s method, is a powerful extension of Euler’s method that gives better accuracy by averaging two slope estimates at each step.
在 AQA A-Level 数学中,当一阶微分方程难以或无法求出精确解时,需要用数值方法求解。改进欧拉公式,也叫 Heun 方法,是对欧拉方法的一种有力扩展,通过平均每一步的两个斜率估计值来提高精度。
1. Numerical Solutions of Differential Equations | 微分方程的数值解
Many AQA questions give a differential equation of the form dy/dx = f(x, y) with an initial condition y(x₀) = y₀. You are asked to estimate y at a later x-value using a given step size h.
许多 AQA 考题会给出形如 dy/dx = f(x, y) 的微分方程以及初始条件 y(x₀) = y₀,要求你用给定步长 h 估计后续 x 值处的 y 值。
A numerical method produces a sequence of approximate values y₁, y₂, y₃, … at equally spaced points x₁ = x₀ + h, x₂ = x₀ + 2h, and so on. The challenge is to keep these approximations close to the true solution curve.
数值方法会在等距点 x₁ = x₀ + h、x₂ = x₀ + 2h 等处生成近似值序列 y₁、y₂、y₃ 等。难点在于让这些近似值尽量接近真实解曲线。
2. Euler’s Method as a Starting Point | 欧拉方法的出发点
Standard Euler’s method uses only the slope at the current point. It moves along the tangent line for one step:
标准欧拉方法只使用当前点处的斜率,沿切线方向移动一步:
yₙ₊₁ = yₙ + h f(xₙ, yₙ)
This is easy to compute, but the slope of the solution changes continuously. If the step size h is not very small, Euler’s method can drift away from the true curve quickly.
这个方法计算简单,但解的斜率在不断变化。如果步长 h 不是非常小,欧拉方法可能很快偏离真实曲线。
3. The Improved Euler Formula | 改进欧拉公式
The improved Euler formula fixes the main weakness of Euler’s method by taking two slope evaluations per step: one at the start of the interval and one at a predicted end point. The two slopes are then averaged.
改进欧拉公式通过每一步计算两次斜率来修正欧拉方法的主要缺陷:一次在区间起点,一次在预测的终点,然后取平均斜率。
For a differential equation dy/dx = f(x, y), the formula is:
对于微分方程 dy/dx = f(x, y),公式为:
k₁ = f(xₙ, yₙ)
k₂ = f(xₙ + h, yₙ + h k₁)
yₙ₊₁ = yₙ + ½ h (k₁ + k₂)
This is sometimes written in one line as:
有时也写成一行:
yₙ₊₁ = yₙ + (h/2)[f(xₙ, yₙ) + f(xₙ + h, yₙ + h f(xₙ, yₙ))]
k₁ is the slope at the current point, and k₂ is the slope at the point predicted by one standard Euler step. Averaging these two slopes gives a much better approximation for the whole interval.
k₁ 是当前点的斜率,k₂ 是标准欧拉方法预测点处的斜率。对这两个斜率取平均值,可以得到整个区间上更准确的近似。
4. Geometric Interpretation | 几何解释
Geometrically, Euler’s method follows the tangent line at the left end of each interval. The improved Euler method first draws this trial tangent, reaches a predicted point, then calculates the tangent at that predicted point. The average of the two tangent directions is used to move from the original point.
从几何上看,欧拉方法沿着每个区间左端的切线前进。改进欧拉方法先画出这条试验切线到达预测点,再计算预测点处的切线,然后用两条切线方向的平均值从原点出发移动。
This average slope is much closer to the slope of the true solution curve at the midpoint of the interval, so the improved Euler method follows the bending solution path more faithfully than the standard Euler method.
这个平均斜率更接近真实解曲线在区间中点处的斜率,因此改进欧拉方法比标准欧拉方法更忠实地沿着弯曲的解路径前进。
5. Step-by-Step Algorithm | 分步算法
To use the improved Euler formula in an AQA exam, follow these steps carefully:
在 AQA 考试中使用改进欧拉公式时,请仔细遵循以下步骤:
- Start with the known initial values x₀ and y₀. 从已知初始值 x₀ 和 y₀ 开始。
- Set the step size h from the question. 根据题目设定步长 h。
- Compute k₁ = f(xₙ, yₙ). 计算 k₁ = f(xₙ, yₙ)。
- Compute the predicted y-value yₙ + h k₁. 计算预测 y 值 yₙ + h k₁。
- Compute k₂ = f(xₙ + h, yₙ + h k₁). 计算 k₂ = f(xₙ + h, yₙ + h k₁)。
- Update yₙ₊₁ = yₙ + ½ h (k₁ + k₂). 更新 yₙ₊₁ = yₙ + ½ h (k₁ + k₂)。
- Increase n by 1 and repeat until the target x-value is reached. n 增加 1 并重复,直到达到目标 x 值。
Always keep intermediate values to several decimal places. Rounding too early can seriously reduce the accuracy of later steps.
中间值要保留多位小数。过早四舍五入会严重降低后续步骤的精度。
6. Worked Example | 例题
Worked example: Given dy/dx = x + y and y(0) = 1, use the improved Euler formula with h = 0.1 to estimate y(0.1).
例题:已知 dy/dx = x + y 且 y(0) = 1,使用步长 h = 0.1 的改进欧拉公式估计 y(0.1)。
Step 1: Compute k₁ at (x₀, y₀) = (0, 1).
第 1 步:在 (x₀, y₀) = (0, 1) 处计算 k₁。
k₁ = f(0, 1) = 0 + 1 = 1
Step 2: Predict the y-value at x = 0.1 using standard Euler.
第 2 步:用标准欧拉方法预测 x = 0.1 处的 y 值。
y* = y₀ + h k₁ = 1 + 0.1 × 1 = 1.1
Step 3: Compute k₂ at (0.1, 1.1).
第 3 步:在 (0.1, 1.1) 处计算 k₂。
k₂ = f(0.1, 1.1) = 0.1 + 1.1 = 1.2
Step 4: Average the two slopes and update y.
第 4 步:平均两个斜率并更新 y。
y₁ = y₀ + ½ h (k₁ + k₂) = 1 + 0.05 × (1 + 1.2) = 1.11
The improved Euler estimate is y(0.1) ≈ 1.11. The exact solution of this equation is y = 2eˣ − x − 1, which gives y(0.1) ≈ 1.11034, so the improved Euler result is very close.
改进欧拉估计值为 y(0.1) ≈ 1.11。该方程的精确解为 y = 2eˣ − x − 1,得到 y(0.1) ≈ 1.11034,因此改进欧拉结果非常接近。
7. Comparison with Standard Euler’s Method | 与标准欧拉方法的比较
The table below summarises the key differences between the standard Euler method and the improved Euler formula.
下表总结了标准欧拉方法与改进欧拉公式之间的主要区别。
| Feature 特征 | Standard Euler 标准欧拉 | Improved Euler 改进欧拉 |
|---|---|---|
| Slope evaluations per step 每步斜率计算次数 | 1 | 2 |
| Local error 局部误差 | O(h²) | O(h³) |
| Global error 全局误差 | O(h) | O(h²) |
| Accuracy for the same h 相同 h 下的精度 | Lower 较低 | Higher 较高 |
In the worked example above, standard Euler gave 1.1 while improved Euler gave 1.11. The true value is about 1.11034, so the improved Euler estimate is substantially more accurate even with the same step size.
在上面的例题中,标准欧拉得到 1.1,而改进欧拉得到 1.11。真实值约为 1.11034,因此即使步长相同,改进欧拉的估计值也明显更准确。
8. Local and Global Truncation Errors | 局部与全局截断误差
The local truncation error is the error introduced in a single step. For the improved Euler formula, this error is proportional to h³, which means halving h reduces the local error by a factor of about 8.
局部截断误差是单步计算中引入的误差。改进欧拉公式的局部误差与 h³ 成正比,这意味着将 h 减半会使局部误差减少到原来的约 1/8。
The global truncation error is the total error after many steps from x₀ to a fixed final x-value. Since the number of steps is proportional to 1/h, the improved Euler method has a global error proportional to h².
全局截断误差是从 x₀ 到固定终点 x 值经过多步后的总误差。由于步数与 1/h 成正比,改进欧拉方法的全局误差与 h² 成正比。
This is why the improved Euler method is called a second-order method. Standard Euler is only a first-order method because its global error is proportional to h.
这就是为什么改进欧拉方法被称为二阶方法。标准欧拉方法只是一阶方法,因为它的全局误差与 h 成正比。
9. Accuracy, Stability and Step Size | 精度、稳定性与步长
Reducing the step size h generally improves accuracy for both methods, but it also increases the number of calculations. The improved Euler method can achieve the same accuracy as standard Euler with a much larger step size, which saves effort.
减小步长 h 通常会提高两种方法的精度,但也会增加计算量。改进欧拉方法可以用大得多的步长达到与标准欧拉相同的精度,从而节省计算量。
However, the improved Euler method is not perfect. It can still produce poor results for stiff differential equations, where the solution changes very rapidly in some regions. In such cases, small step sizes or more advanced methods such as the Runge-Kutta method may be needed.
然而,改进欧拉方法并非完美。对于刚性微分方程,解在某些区域变化非常快,该方法仍可能产生较差的结果。此时可能需要更小的步长或龙格-库塔法等更高级的方法。
10. Exam Tips and Common Mistakes | 考试提示与常见错误
In AQA exams, always show your working clearly. Write down k₁, the predicted value, k₂, and the final update formula every time. This helps you gain method marks even if a small arithmetic error occurs.
在 AQA 考试中,始终清晰展示计算过程。每次都写出 k₁、预测值、k₂ 和最终更新公式。即使出现小的算术错误,这也有助于获得方法分。
Common mistakes include using k₂ = f(xₙ + h, yₙ) instead of the predicted y-value, forgetting to multiply the average slope by h, and rounding intermediate values too early. Always check that the x-value in k₂ is xₙ + h, not xₙ.
常见错误包括:把 k₂ 写成 f(xₙ + h, yₙ) 而不是代入预测 y 值;忘记将平均斜率乘以 h;以及过早对中间值四舍五入。始终检查 k₂ 中的 x 值是 xₙ + h 而不是 xₙ。
When a question asks for an estimate at x = a, stop only when xₙ equals a. If the target x-value is not reached exactly with the given step size, explain how many steps are needed or use the final x-value reached.
当题目要求估计 x = a 处的值时,只有在 xₙ 等于 a 时才停止。如果给定步长无法正好到达目标 x 值,请说明需要多少步,或使用到达的最终 x 值。
11. Summary | 总结
The improved Euler formula is a second-order numerical method for solving first-order differential equations. It uses the average of the slope at the start of an interval and the slope at a predicted end point:
改进欧拉公式是求解一阶微分方程的二阶数值方法。它使用区间起点斜率和预测终点斜率的平均值:
k₁ = f(xₙ, yₙ)
k₂ = f(xₙ + h, yₙ + h k₁)
yₙ₊₁ = yₙ + ½ h (k₁ + k₂)
It is more accurate than standard Euler’s method for the same step size, but it requires two evaluations of f(x, y) per step. In AQA exams, you should be able to apply the formula, compare it with Euler’s method, and understand its error behaviour.
在相同步长下,它比标准欧拉方法更精确,但每一步需要计算两次 f(x, y)。在 AQA 考试中,你应能应用该公式、将其与欧拉方法进行比较,并理解其误差特性。
Published by TutorHao | Mathematics Revision Series | aleveler.com
更多咨询请联系16621398022(同微信)
屏轩国际教育cambridge primary/secondary checkpoint, cat4, ukiset,ukcat,igcse,alevel,PAT,STEP,MAT, ibdp,ap,ssat,sat,sat2课程辅导,国外大学本科硕士研究生博士课程论文辅导