Приближенное решение методом Эйлера
Введено| English | Значение |
|---|---|
| Euler's method/ˈɔɪləz ˈmeθəd/ | метод Эйлера |
| step size/step saɪz/ | шаг интегрирования |
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.

Euler's method steps along the tangent; the estimate drifts from the true solution
Шаги вдоль поля направлений
Метод Эйлера делает короткие прямые шаги вдоль поля направлений — чем меньше шаг, тем точнее он следует истинной кривой.
Формула обновления метода Эйлера: $y_{n+1}=$
Сложность 1/5 · 100 монет + небольшой бонус за первое выполнение сегодня
Старое значение $y$ плюс наклон, умноженный на шаг.
Фиксированный прирост $h$, используемый на каждом шаге Эйлера, называется размером шага.
Сложность 1/5 · 100 монет + небольшой бонус за первое выполнение сегодня
Переменная ⟨$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.
Для значений $\dfrac{dy}{dx}=x+y$, $y(0)=1$, $h=0.5$: наклон в точке $(0,1)$ равен $1$. Найдите значение $y_1$.
Сложность 2/5 · 140 монет + небольшой бонус за первое выполнение сегодня
$1+0.5(1)=1.5$.
Продолжая (значение ⟨$y_1=1.5$⟩ в точке ⟨$x=0.5$⟩, наклон ⟨$=2$⟩), найдите значение ⟨$y(1)\approx y_2$⟩.
Сложность 2/5 · 140 монет + небольшой бонус за первое выполнение сегодня
$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$ обычно делает оценку Эйлера...
Сложность 1/5 · 100 монет + небольшой бонус за первое выполнение сегодня
Меньшие шаги меньше отклоняются от истинной кривой.
Необходимо пересчитывать наклон в каждой новой точке, а не использовать начальный наклон.
Сложность 1/5 · 100 монет + небольшой бонус за первое выполнение сегодня
Наклон $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.
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$.
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.