Not all differential equations can be solved analytically. Euler's Method is a simple numerical technique for approximating solutions to initial value problems. It uses the slope at a point to "step forward" along the solution curve, producing a sequence of approximate points.

🎯 In this section you will learn

📌 Euler's Method Formula

$$ y_{n+1} = y_n + h \cdot f(x_n, y_n) $$
where $h$ is the step size, and $\frac{dy}{dx} = f(x, y)$
💡 The Idea

Starting from the initial point $(x_0, y_0)$, we use the slope $f(x_0, y_0)$ to estimate the next point after a step of size $h$ in $x$: $x_1 = x_0 + h$, $y_1 = y_0 + h \cdot f(x_0, y_0)$. Repeat.

📋 Step-by-Step Process

Identify the DE and initial condition
$\frac{dy}{dx} = f(x, y)$, with $y(x_0) = y_0$.
Choose a step size $h$
Smaller $h$ gives more accurate approximations.
Iterate
For $n = 0, 1, 2, \dots$: $x_{n+1} = x_n + h$, $y_{n+1} = y_n + h \cdot f(x_n, y_n)$.
Example 1Basic Euler's Method

Use Euler's Method with $h = 0.1$ to approximate $y(0.2)$ for $\frac{dy}{dx} = x + y$, $y(0) = 1$.

Step 1: $n=0$, $x_0=0$, $y_0=1$
$f(0,1) = 0 + 1 = 1$
$x_1 = 0 + 0.1 = 0.1$
$y_1 = 1 + 0.1 \times 1 = 1.1$
Step 2: $n=1$, $x_1=0.1$, $y_1=1.1$
$f(0.1, 1.1) = 0.1 + 1.1 = 1.2$
$x_2 = 0.1 + 0.1 = 0.2$
$y_2 = 1.1 + 0.1 \times 1.2 = 1.1 + 0.12 = 1.22$
Conclusion
$y(0.2) \approx 1.22$
Example 2Euler's Method with $h = 0.2$

Use Euler's Method with $h = 0.2$ to approximate $y(0.4)$ for $\frac{dy}{dx} = xy$, $y(0) = 1$.

Step 1: $x_0=0$, $y_0=1$
$f(0,1) = 0 \times 1 = 0$
$x_1 = 0.2$, $y_1 = 1 + 0.2 \times 0 = 1$
Step 2: $x_1=0.2$, $y_1=1$
$f(0.2, 1) = 0.2 \times 1 = 0.2$
$x_2 = 0.4$, $y_2 = 1 + 0.2 \times 0.2 = 1 + 0.04 = 1.04$
Conclusion
$y(0.4) \approx 1.04$
Example 3Multiple Steps to a Target Value

Use Euler's Method with $h = 0.1$ to approximate $y(0.5)$ for $\frac{dy}{dx} = 2x$, $y(0) = 0$. (Exact solution is $y = x^2$, so $y(0.5)=0.25$).

Initialize
$x_0=0$, $y_0=0$, $f(x,y)=2x$
Step 1
$f(0,0)=0$ → $x_1=0.1$, $y_1=0$
Step 2
$f(0.1,0)=0.2$ → $x_2=0.2$, $y_2=0 + 0.1 \times 0.2 = 0.02$
Step 3
$f(0.2,0.02)=0.4$ → $x_3=0.3$, $y_3=0.02 + 0.1 \times 0.4 = 0.06$
Step 4
$f(0.3,0.06)=0.6$ → $x_4=0.4$, $y_4=0.06 + 0.1 \times 0.6 = 0.12$
Step 5
$f(0.4,0.12)=0.8$ → $x_5=0.5$, $y_5=0.12 + 0.1 \times 0.8 = 0.20$
Compare with exact
Euler gives $0.20$, exact is $0.25$ (error $=0.05$).
⚠️ Common Mistakes
🔍 Key Takeaways
← Back to Module Page