Approximating Solutions Using Euler's Method · 使用欧拉法逼近解
| English | 中文 | Pinyin · 拼音 |
|---|---|---|
| Euler's method/ˈɔɪləz ˈmeθəd/ | 欧拉法 | ōu lā fǎ |
| step size/step saɪz/ | 步长 | bù zhǎng |
Walking a solution one small step at a time
- Not every differential equation can be solved with a formula — but you can still approximate the solution numerically.
- Euler's method 欧拉法 follows the slope field in tiny straight steps from a starting point.
- At each point, use the differential equation to get the slope, then step forward along it.
- Repeat, and you trace an approximate solution curve.
一小步一小步地"走"出解
- 并非每个微分方程都能用公式解出——但你仍能用数值方法近似解。
- 欧拉方法从起点出发,用微小的直线步跟随斜率场。
- 在每一点,用微分方程求出斜率,再沿它向前迈一步。
- 重复,你就描出一条近似解曲线。
The update rule
- Given $\dfrac{dy}{dx}=f(x,y)$ and a start $(x_0,y_0)$, take a fixed step size 步长 $h$:
-
$$y_{n+1}=y_n+h\,f(x_n,y_n),\qquad x_{n+1}=x_n+h$$
- The new $y$ = old $y$ + (slope there) × (step $h$).
- It's "current value plus slope times step" — a tangent-line jump.
更新规则
- 给定 $\dfrac{dy}{dx}=f(x,y)$ 与起点 $(x_0,y_0)$,取固定步长 $h$:
-
$$y_{n+1}=y_n+h\,f(x_n,y_n),\qquad x_{n+1}=x_n+h$$
- 新的 $y$ = 旧的 $y$ + (那里的斜率) × (步长 $h$)。
- 就是"当前值加上斜率乘步长"——一次切线跳跃。
Stepping along the slope field · 沿斜率场步进
Euler's method takes short straight steps along the slope field — smaller steps hug the true curve better. · 欧拉法沿着斜率场走短直线段 —— 步长越小,越贴近真实曲线。
Euler's update rule is $y_{n+1}=$ · 欧拉更新公式是 $y_{n+1}=$
Old $y$ plus slope times step. · 旧值 $y$ 加上斜率乘以步长。
The fixed increment $h$ used at each Euler step is called the ____ size. · 欧拉法每步使用的固定增量 $h$ 称为 ____ 大小。
$x$ advances by the step size $h$ each iteration. · $x$ 每次迭代按步长 $h$ 推进。
Marching through a table
- Organize the work in a table: at each row, read $(x_n,y_n)$, compute the slope $f(x_n,y_n)$, then get $y_{n+1}$.
- Advance $x$ by $h$ each row and repeat until you reach the target $x$.
- Each step is just arithmetic; the differential equation supplies the slope.
- After a few rows you have an approximate $y$ at the target.
用表格逐行推进
- 把工作组织成表格:每行读 $(x_n,y_n)$,算斜率 $f(x_n,y_n)$,再得 $y_{n+1}$。
- 每行把 $x$ 前进 $h$,重复直到到达目标 $x$。
- 每一步只是算术;微分方程提供斜率。
- 几行之后你就得到目标处 $y$ 的近似值。
For · 支持 $\dfrac{dy}{dx}=x+y$, $y(0)=1$, $h=0.5$: the slope at $(0,1)$ is $1$. Find $y_1$. · 对于 $\dfrac{dy}{dx}=x+y$, $y(0)=1$, $h=0.5$:在 $(0,1)$ 处的斜率为 $1$。求 $y_1$。
$1+0.5(1)=1.5$.
Continuing ($y_1=1.5$ at $x=0.5$, slope $=2$), find $y(1)\approx y_2$. · 继续($y_1=1.5$ 在 $x=0.5$,斜率 $=2$),求 $y(1)\approx y_2$。
$1.5+0.5(2)=2.5$.
Accuracy and step size
- Euler's method is only an approximation — it follows straight tangents, so it drifts from the true curve.
- A smaller step size $h$ gives a more accurate estimate (but more steps).
- On a concave-up curve Euler tends to underestimate; concave-down, overestimate.
- More steps, less error — the classic accuracy trade-off.
精度与步长
- 欧拉方法只是一个近似——它沿直线切线走,所以会偏离真实曲线。
- 更小的步长 $h$ 给出更准确的估计(但步数更多)。
- 在上凹曲线上,欧拉倾向低估;下凹则高估。
- 步数越多,误差越小——经典的精度权衡。
Using a smaller step size $h$ generally makes Euler's estimate... · 使用更小的步长 $h$ 通常会使欧拉估计...
Smaller steps drift less from the true curve. · 较小的步长偏离真实曲线的程度更小。
You must recompute the slope at each new point, not reuse the initial slope. · 必须在每个新点重新计算斜率,不能重复使用初始斜率。
The slope $f(x_n,y_n)$ changes each step. · 斜率 $f(x_n,y_n)$ 每一步都会变化。
Use the slope at the current point $(x_n,y_n)$ for each step, not a fixed slope. And each step updates both $x$ (by $h$) and $y$ (by $h\cdot f$). A common error is reusing the initial slope for every step — the slope must be recomputed at each new point.
每一步用当前点 $(x_n,y_n)$ 处的斜率,而非固定斜率。而且每一步同时更新 $x$(加 $h$)和 $y$(加 $h\cdot f$)。一个常见错误是每步都沿用初始斜率——斜率必须在每个新点重新计算。
Approximate $y(1)$ for $\dfrac{dy}{dx}=x+y$, $y(0)=1$, with step $h=0.5$.
- Step 1: slope at $(0,1)$ is $0+1=1$; $y_1=1+0.5(1)=1.5$, $x_1=0.5$.
- Step 2: slope at $(0.5,1.5)$ is $0.5+1.5=2$; $y_2=1.5+0.5(2)=2.5$, $x_2=1$.
- So $y(1)\approx 2.5$.
用步长 $h=0.5$ 近似 $\dfrac{dy}{dx}=x+y$、$y(0)=1$ 的 $y(1)$。
- 第一步:$(0,1)$ 处斜率 $0+1=1$;$y_1=1+0.5(1)=1.5$,$x_1=0.5$。
- 第二步:$(0.5,1.5)$ 处斜率 $0.5+1.5=2$;$y_2=1.5+0.5(2)=2.5$,$x_2=1$。
- 所以 $y(1)\approx 2.5$。
Euler's method approximates a differential equation's solution by stepping along tangents: $y_{n+1}=y_n+h\,f(x_n,y_n)$ with fixed step size $h$, recomputing the slope at each point. It's approximate (straight steps drift from the curve); a smaller $h$ improves accuracy.
欧拉方法通过沿切线迈步来近似微分方程的解:$y_{n+1}=y_n+h\,f(x_n,y_n)$,固定步长 $h$,在每点重新计算斜率。它是近似的(直线步偏离曲线);更小的 $h$ 提高精度。