Approximating Solutions Using Euler's Method
Introduzido| English | Significado |
|---|---|
| Euler's method/ˈɔɪləz ˈmeθəd/ | método de Euler |
| step size/step saɪz/ | tamanho do passo |
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
The slope field and exact exponential solution
This field is $dy/dx=ay$, with exact solution $y=y_0e^{ax}$. It illustrates tangent directions, without calculating Euler steps. The worked Euler example below instead uses $dy/dx=x+y$.
Euler's update rule is $y_{n+1}=$
Dificuldade 1/5 · Moedas 100 + pequeno bônus na primeira conclusão hoje
Old $y$ plus slope times step.
The fixed increment $h$ used at each Euler step is called the ____ size.
Dificuldade 1/5 · Moedas 100 + pequeno bônus na primeira conclusão hoje
$x$ advances by the step size $h$ each iteration.
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.
A favor $\dfrac{dy}{dx}=x+y$, $y(0)=1$, $h=0.5$: the slope at $(0,1)$ é $1$. Find $y_1$.
Dificuldade 2/5 · Moedas 140 + pequeno bônus na primeira conclusão hoje
$1+0.5(1)=1.5$.
A favor $dy/dx=x+y$ with step $h=0.5$, the current point is $(0.5,1.5)$. Find the Euler estimate $y(1)\approx y_2$.
Dificuldade 2/5 · Moedas 140 + pequeno bônus na primeira conclusão hoje
Em $(0.5,1.5)$, the slope is $0.5+1.5=2$. Then $y_2=y_1+h f(x_1,y_1)=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$ generally gives a more accurate estimate for a smooth, stable problem (but more steps).
- On a concave-up curve Euler tends to underestimate; concave-down, overestimate.
- More steps, less error — the classic accuracy trade-off.
Using a smaller step size $h$ generally makes Euler's estimate...
Dificuldade 1/5 · Moedas 100 + pequeno bônus na primeira conclusão hoje
Smaller steps drift less from the true curve.
You must recompute the slope at each new point, not reuse the initial slope.
Dificuldade 1/5 · Moedas 100 + pequeno bônus na primeira conclusão hoje
The slope $f(x_n,y_n)$ changes each step.
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$ generally improves accuracy for a smooth, stable problem.