Euler's Step-by-Step Method and Slope Fields | Analysis and Approaches IB Maths notes
Free preview: Euler's Step-by-Step Method and Slope Fields
Euler's Method: Walking Along the Tangent
Analysis and approaches: HL only (AHL 5.18). Applications and interpretation: HL only (AHL 5.15 slope fields, AHL 5.16 Euler's method)
Let's start with the problem. Some differential equations can be solved exactly, by separating the variables. But most equations, like , have no exact solution you can write down. We can still build the solution curve numerically, one small step at a time.
- We have a first-order differential equation and a starting point (the initial condition).
- At any point the equation tells us the gradient of the solution curve through that point.
- Idea: walk a short distance h in x along that gradient (the tangent), then work out the new gradient and repeat.
๐ก In plain words
- New y = old y + step ร gradient at the old point.
- Rise = run ร gradient, exactly like moving along a straight line.
The recipe
- Set up a table with columns r, , , gradient , new y. Why: each row feeds the next, and the marks are for the rows.
- Work out the gradient at the current point. Why: Euler always uses the gradient at the start of the step.
- New y = old y + h ร gradient; new x = old x + h.
- Repeat until you reach the x you want. Why: number of steps = (target x โ start x) รท h.
๐ Watch me do it: dy/dx = x + y, y(0) = 1, h = 0.1: estimate y(0.3)
| What I write | Why I do it |
|---|---|
| r = 0: gradient ; | Start at (0, 1). |
| r = 1: gradient ; | Now at (0.1, 1.1). |
| r = 2: gradient ; | Now at (0.2, 1.22). |
| Three steps of 0.1 reach x = 0.3. | |
| Exact (by integrating factor) : . | Our error is about โ0.038. |
| r | ||||
|---|---|---|---|---|
| 0 | 0 | 1 | 1 | 1.1 |
| 1 | 0.1 | 1.1 | 1.2 | 1.22 |
| 2 | 0.2 | 1.22 | 1.42 | 1.362 |
| 3 | 0.3 | 1.362 |
โ๏ธ YOUR TURN 1
Try this first:
Use Euler's method with h = 0.2 to estimate y(0.6) for . The exact solution is ; find the error.
Answer:
- r = 0: gradient 0 ร 1 = 0, so .
- r = 1: gradient 0.2 ร 1 = 0.2, so .
- r = 2: gradient 0.4 ร 1.04 = 0.416, so .
- Exact . Error about โ0.074.
Why Euler Drifts

Following the diagram
- The exact curve from x = 0 to 1, and Euler's method with h = 0.25 as a chain of straight segments.
- Each pink segment starts with the gradient at the start of the step: from (0, 1) the gradient is 0 + 1 = 1, so we reach (0.25, 1.25).
- But the true curve gets steeper during the step (it bends upwards), so the segment ends up below it.
- The next step starts from the wrong point, so the errors build up: at x = 1, Euler gives 2.8828 against the exact 3.4366.
- Notice the dashed gaps get bigger at every step.

What the picture shows
- Here is the opposite case, as a made-up example: , y(0) = 0, h = 0.5. The exact solution bends downwards.
- Euler uses the gradient at the start of each step. On a curve that flattens out, that gradient is too steep, so each pink segment ends above the curve.
- The errors build up: at x = 2 Euler gives 0.9375 against the exact .
- So Euler undershoots when the curve bends up and overshoots when it bends down.
๐ Watch me do it: follow the overshoot for
| What I write | Why I do it |
|---|---|
| Gradient ; | Exact : already too high. |
| Gradient ; | Exact . |
| Gradient 0.25; . Gradient 0.125; | Each step uses the steeper gradient from the start of the step. |
| At x = 2: 0.9375 against 0.8647. | The curve flattens as it goes, so the start-of-step gradient is always too steep: overshoot. |
๐ Here's the trap
Unlock the full note: start 7 days free.
Log in or subscribe to read the rest of this note. Members also get the AI tutor, practice quizzes, mock exams and flashcards for this topic.
Log in ยท Subscribe ยท Start free trial
All notes in HL: Differential equations and Maclaurin series (AHL 5.18, 5.19)
- Solving Separable Differential Equations
- Homogeneous Differential Equations: the Substitution y = vx
- First-Order Differential Equations: Families of Solutions and the Integrating Factor
- Euler's Step-by-Step Method and Slope Fields
- Maclaurin Series: Building a Polynomial from Derivatives at Zero
- The Standard Maclaurin Series, Their Ranges of Validity and Composite Expansions
- Series Solutions and Substitutions for Differential Equations
What's inside for this topic
7 teacher notes, 64 practice questions, 40 flashcards, 2 quizzes.
Get the full notes, every practice question, flashcards, quizzes and mock papers.
Previous note: First-Order Differential Equations: Families of Solutions and the Integrating Factor Next note: Maclaurin Series: Building a Polynomial from Derivatives at Zero