Euler’s Method: Numerical Solution of First-Order Differential Equations | 欧拉方法:一阶微分方程数值求解

📚 Euler’s Method: Numerical Solution of First-Order Differential Equations | 欧拉方法:一阶微分方程数值求解

When a first-order differential equation cannot be solved neatly by separation or integration, Euler’s method provides a straightforward numerical alternative. It constructs a solution step by step, using only the slope given by the differential equation and a chosen step size.

当一阶微分方程无法通过分离变量或积分直接求解时,欧拉方法提供了一种直接而有效的数值解法。它仅仅利用微分方程给出的斜率和一个选定的步长,逐步构造出近似解。


1. What Is Euler’s Method? | 什么是欧拉方法?

A first-order ordinary differential equation can be written as y′ = f(x, y), with the initial condition y(x₀) = y₀. Euler’s method treats the derivative as a finite ratio and moves forward in small steps of size h.

一阶常微分方程可以写成 y′ = f(x, y),并带有初始条件 y(x₀) = y₀。欧拉方法将导数看成一个有限的差比,并以步长 h 向前推进。

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

Here (xₙ, yₙ) is the current point, and f(xₙ, yₙ) is the slope of the tangent at that point.

其中 (xₙ, yₙ) 是当前点,f(xₙ, yₙ) 是这一点处切线的斜率。


2. The Geometry of Tangent Steps | 切线步进的几何意义

Imagine the true solution as a smooth curve on the x-y plane. At the initial point, the differential equation gives the slope of the curve. Euler’s method follows that tangent line for a short distance h, reaches a new point, then recalculates the tangent slope at that new point.

把真实解想象成 x-y 平面上的一条光滑曲线。在初始点处,微分方程给出曲线的斜率。欧拉方法沿这条切线前进一小段距离 h,到达一个新点,然后在新点处重新计算切线斜率。

Each step is therefore a straight-line approximation, and the approximate solution is a polygonal line that hugs the true curve more closely when h is small.

因此每一步都是直线近似,而近似解就是一条折线。当 h 较小时,这条折线与真实曲线贴合得更紧密。


3. Deriving Euler’s Formula from Taylor’s Expansion | 由泰勒展开推导欧拉公式

To understand why Euler’s method works, expand the true solution around xₙ using Taylor’s theorem:

为了理解欧拉方法为何有效,我们利用泰勒定理在 xₙ 附近展开真实解:

y(xₙ + h) = y(xₙ) + h y′(xₙ) + O(h²)

Since y′ = f(x, y), we can replace y′(xₙ) by f(xₙ, yₙ). Dropping the O(h²) remainder gives the Euler formula.

因为 y′ = f(x, y),所以可以用 f(xₙ, yₙ) 替换 y′(xₙ)。忽略 O(h²) 的余项,就得到欧拉公式。

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

The dropped term is the local truncation error, which will be examined later.

被忽略的项就是局部截断误差,后面我们会详细讨论。


4. Worked Example: Radioactive Decay | 实例:放射性衰变

Consider the differential equation for radioactive decay:

考虑放射性衰变的微分方程:

dy/dt = −λy, y(0) = 100

Let λ = 0.1 s⁻¹ and choose h = 1 s. The Euler recurrence is yₙ₊₁ = yₙ + h(−λyₙ) = yₙ(1 − λh).

取 λ = 0.1 s⁻¹,步长 h = 1 s。欧拉递推式为 yₙ₊₁ = yₙ + h(−λyₙ) = yₙ(1 − λh)。

n t (s) Euler y Exact y = 100e⁻⁰·¹ᵗ
0 0 100.000 100.000
1 1 90.000 90.484
2 2 81.000 81.873
3 3 72.900 74.082
4 4 65.610 67.032
5 5 59.049 60.653

Because the true curve is concave upward in this case, Euler’s tangent steps lie below the curve and underestimate the answer.

在本例中真实曲线是上凹的,因此欧拉的切线步进位于曲线下方,导致结果偏低。


5. Worked Example: Newton’s Law of Cooling | 实例:牛顿冷却定律

Newton’s law of cooling is a classic first-order equation:

牛顿冷却定律是一阶微分方程的经典例子:

dT/dt = −k(T − T_env), T(0) = 80°C

Take the surrounding temperature T_env = 20°C, k = 0.

Published by TutorHao | IB Physics Revision Series | aleveler.com

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

Comments

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

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

Exit mobile version