Euler's Method Notes
These Euler's Method Notes explain how to approximate the solution of an initial value problem step by step, with the working shown line by line. At each point the slope given by the equation is treated as constant across one step, so the curve is followed by a short straight line. Repeating that from the starting point walks the approximation forward. Following the same pattern every time makes it clear how the error grows with the step size.
Step-by-step method
- Set up the problem.
- Write the update rule.
- Apply the rule step by step.
- Write the approximation.
Formula: Euler's Method
Each step follows the tangent line at the current point for a distance h, using the slope f(x, y) given by the equation.
Useful Tips to Remember
A smaller step size h gives a more accurate answer but needs more steps. Keep x and y moving together: every step adds h to x and uses the new y in the next slope. Round only the final answer, and keep the working values as accurate as you can. Check that \(x_{0} + nh\) is the x value you want to reach. Euler's method is the simplest of the step methods, so its error is the largest for the same h.
Required knowledge
- How to evaluate f at a point, covered in the Function Evaluator Calculator.
- What a first-order equation means, covered in the First Order ODE Solver Calculator.
Where Is Euler's Method Used?
Most differential equations in science and engineering cannot be solved exactly, so they are stepped forward numerically, and Euler's method is the starting point for all of these methods. It shows how computers simulate motion, heat flow and population changes one small time step at a time. Game physics engines and simple simulations still use it because each step is so cheap.
- Simple physics simulations and games
- Teaching how numerical solvers work
- Population and epidemic models
- Quick estimates of growth and decay
- Checking the shape of a solution
Euler's Method Practice Problems
Example 1 steps \(y' = y - x\) from \(y(0) = 2\) with \(h = 0.2\) for 5 steps, and Example 2 steps \(y' = xy\) from \(y(0) = 1\) with \(h = 0.1\) for 3 steps. Examples 3 and 4 give you two more problems of the same kind to try. Build the table one row at a time.
The worked examples below go through the same pattern from start to finish, so you can compare every step with your own working. Try each problem on paper first, then open the example and check your working one step at a time, so you can see exactly which step went wrong if your answer does not match. Use them to check your answers and to understand why each step works.
See Example 1 Hide Example 1
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the update rule.
- Apply the rule step by step.
- Write the approximation.
Formula
Formula: Euler's Method
Each step follows the tangent line at the current point for a distance h, using the slope f(x, y) given by the equation.
Step 1
Step 1 - Set up the problem.
In this problem: We are approximating the solution of \(y' = - x + y\) starting from \(y(0) = 2\), taking 5 steps of size \(h = 0.2\) to reach \(x = 1\).
Step 2
Step 2 - Write the update rule.
In this problem: Euler's method follows the tangent line for one step at a time. The slope at the current point is \(f(x_{k}, y_{k})\), so moving a distance \(h\) to the right changes \(y\) by \(h\,f(x_{k}, y_{k})\).
Step 3
Step 3 - Apply the rule step by step.
In this problem: The rule is applied 5 times, and each step starts where the last one ended. The table shows every point, rounded to 6 decimal places.
Step 3a
Step 3a - Step 1.
In this problem: At \(x_{0} = 0\) the slope is \(f(x_{0}, y_{0}) = f(0,\; 2) = - 0 + {2} = 2\). Moving one step along it gives \(y_{1} = 2 + 0.2 \times 2 = 2.4\) at \(x_{1} = 0 + 0.2 = 0.2\).
Step 3b
Step 3b - Step 2.
In this problem: At \(x_{1} = 0.2\) the slope is \(f(x_{1}, y_{1}) = f(0.2,\; 2.4) = - 0.2 + {2.4} = 2.2\). Moving one step along it gives \(y_{2} = 2.4 + 0.2 \times 2.2 = 2.84\) at \(x_{2} = 0.2 + 0.2 = 0.4\).
Step 3c
Step 3c - Step 3.
In this problem: At \(x_{2} = 0.4\) the slope is \(f(x_{2}, y_{2}) = f(0.4,\; 2.84) = - 0.4 + {2.84} = 2.44\). Moving one step along it gives \(y_{3} = 2.84 + 0.2 \times 2.44 = 3.328\) at \(x_{3} = 0.4 + 0.2 = 0.6\).
Step 3d
Step 3d - Step 4.
In this problem: At \(x_{3} = 0.6\) the slope is \(f(x_{3}, y_{3}) = f(0.6,\; 3.328) = - 0.6 + {3.328} = 2.728\). Moving one step along it gives \(y_{4} = 3.328 + 0.2 \times 2.728 = 3.8736\) at \(x_{4} = 0.6 + 0.2 = 0.8\).
Step 3e
Step 3e - Step 5.
In this problem: At \(x_{4} = 0.8\) the slope is \(f(x_{4}, y_{4}) = f(0.8,\; 3.8736) = - 0.8 + {3.8736} = 3.0736\). Moving one step along it gives \(y_{5} = 3.8736 + 0.2 \times 3.0736 = 4.48832\) at \(x_{5} = 0.8 + 0.2 = 1\).
Step 4
Step 4 - Write the approximation.
In this problem: After 5 steps the approximation is \(y(1) \approx 4.48832\).
Final Answer
See Example 2 Hide Example 2
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the update rule.
- Apply the rule step by step.
- Write the approximation.
Formula
Formula: Euler's Method
Each step follows the tangent line at the current point for a distance h, using the slope f(x, y) given by the equation.
Step 1
Step 1 - Set up the problem.
In this problem: We are approximating the solution of \(y' = x y\) starting from \(y(0) = 1\), taking 3 steps of size \(h = 0.1\) to reach \(x = 0.3\).
Step 2
Step 2 - Write the update rule.
In this problem: Euler's method follows the tangent line for one step at a time. The slope at the current point is \(f(x_{k}, y_{k})\), so moving a distance \(h\) to the right changes \(y\) by \(h\,f(x_{k}, y_{k})\).
Step 3
Step 3 - Apply the rule step by step.
In this problem: The rule is applied 3 times, and each step starts where the last one ended. The table shows every point, rounded to 6 decimal places.
Step 3a
Step 3a - Step 1.
In this problem: At \(x_{0} = 0\) the slope is \(f(x_{0}, y_{0}) = f(0,\; 1) = 0 \times {1} = 0\). Moving one step along it gives \(y_{1} = 1 + 0.1 \times 0 = 1\) at \(x_{1} = 0 + 0.1 = 0.1\).
Step 3b
Step 3b - Step 2.
In this problem: At \(x_{1} = 0.1\) the slope is \(f(x_{1}, y_{1}) = f(0.1,\; 1) = 0.1 \times {1} = 0.1\). Moving one step along it gives \(y_{2} = 1 + 0.1 \times 0.1 = 1.01\) at \(x_{2} = 0.1 + 0.1 = 0.2\).
Step 3c
Step 3c - Step 3.
In this problem: At \(x_{2} = 0.2\) the slope is \(f(x_{2}, y_{2}) = f(0.2,\; 1.01) = 0.2 \times {1.01} = 0.202\). Moving one step along it gives \(y_{3} = 1.01 + 0.1 \times 0.202 = 1.0302\) at \(x_{3} = 0.2 + 0.1 = 0.3\).
Step 4
Step 4 - Write the approximation.
In this problem: After 3 steps the approximation is \(y(0.3) \approx 1.0302\).
Final Answer
See Example 3 Hide Example 3
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the update rule.
- Apply the rule step by step.
- Write the approximation.
Formula
Formula: Euler's Method
Each step follows the tangent line at the current point for a distance h, using the slope f(x, y) given by the equation.
Step 1
Step 1 - Set up the problem.
In this problem: We are approximating the solution of \(y' = x + y\) starting from \(y(0) = 1\), taking 4 steps of size \(h = 0.1\) to reach \(x = 0.4\).
Step 2
Step 2 - Write the update rule.
In this problem: Euler's method follows the tangent line for one step at a time. The slope at the current point is \(f(x_{k}, y_{k})\), so moving a distance \(h\) to the right changes \(y\) by \(h\,f(x_{k}, y_{k})\).
Step 3
Step 3 - Apply the rule step by step.
In this problem: The rule is applied 4 times, and each step starts where the last one ended. The table shows every point, rounded to 6 decimal places.
Step 3a
Step 3a - Step 1.
In this problem: At \(x_{0} = 0\) the slope is \(f(x_{0}, y_{0}) = f(0,\; 1) = 0 + {1} = 1\). Moving one step along it gives \(y_{1} = 1 + 0.1 \times 1 = 1.1\) at \(x_{1} = 0 + 0.1 = 0.1\).
Step 3b
Step 3b - Step 2.
In this problem: At \(x_{1} = 0.1\) the slope is \(f(x_{1}, y_{1}) = f(0.1,\; 1.1) = 0.1 + {1.1} = 1.2\). Moving one step along it gives \(y_{2} = 1.1 + 0.1 \times 1.2 = 1.22\) at \(x_{2} = 0.1 + 0.1 = 0.2\).
Step 3c
Step 3c - Step 3.
In this problem: At \(x_{2} = 0.2\) the slope is \(f(x_{2}, y_{2}) = f(0.2,\; 1.22) = 0.2 + {1.22} = 1.42\). Moving one step along it gives \(y_{3} = 1.22 + 0.1 \times 1.42 = 1.362\) at \(x_{3} = 0.2 + 0.1 = 0.3\).
Step 3d
Step 3d - Step 4.
In this problem: At \(x_{3} = 0.3\) the slope is \(f(x_{3}, y_{3}) = f(0.3,\; 1.362) = 0.3 + {1.362} = 1.662\). Moving one step along it gives \(y_{4} = 1.362 + 0.1 \times 1.662 = 1.5282\) at \(x_{4} = 0.3 + 0.1 = 0.4\).
Step 4
Step 4 - Write the approximation.
In this problem: After 4 steps the approximation is \(y(0.4) \approx 1.5282\).
Final Answer
See Example 4 Hide Example 4
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the update rule.
- Apply the rule step by step.
- Write the approximation.
Formula
Formula: Euler's Method
Each step follows the tangent line at the current point for a distance h, using the slope f(x, y) given by the equation.
Step 1
Step 1 - Set up the problem.
In this problem: We are approximating the solution of \(y' = 2 x\) starting from \(y(0) = 0\), taking 4 steps of size \(h = 0.5\) to reach \(x = 2\).
Step 2
Step 2 - Write the update rule.
In this problem: Euler's method follows the tangent line for one step at a time. The slope at the current point is \(f(x_{k}, y_{k})\), so moving a distance \(h\) to the right changes \(y\) by \(h\,f(x_{k}, y_{k})\).
Step 3
Step 3 - Apply the rule step by step.
In this problem: The rule is applied 4 times, and each step starts where the last one ended. The table shows every point, rounded to 6 decimal places.
Step 3a
Step 3a - Step 1.
In this problem: At \(x_{0} = 0\) the slope is \(f(x_{0}, y_{0}) = f(0,\; 0) = 2 \times 0 = 0\). Moving one step along it gives \(y_{1} = 0 + 0.5 \times 0 = 0\) at \(x_{1} = 0 + 0.5 = 0.5\).
Step 3b
Step 3b - Step 2.
In this problem: At \(x_{1} = 0.5\) the slope is \(f(x_{1}, y_{1}) = f(0.5,\; 0) = 2 \times 0.5 = 1\). Moving one step along it gives \(y_{2} = 0 + 0.5 \times 1 = 0.5\) at \(x_{2} = 0.5 + 0.5 = 1\).
Step 3c
Step 3c - Step 3.
In this problem: At \(x_{2} = 1\) the slope is \(f(x_{2}, y_{2}) = f(1,\; 0.5) = 2 \times 1 = 2\). Moving one step along it gives \(y_{3} = 0.5 + 0.5 \times 2 = 1.5\) at \(x_{3} = 1 + 0.5 = 1.5\).
Step 3d
Step 3d - Step 4.
In this problem: At \(x_{3} = 1.5\) the slope is \(f(x_{3}, y_{3}) = f(1.5,\; 1.5) = 2 \times 1.5 = 3\). Moving one step along it gives \(y_{4} = 1.5 + 0.5 \times 3 = 3\) at \(x_{4} = 1.5 + 0.5 = 2\).
Step 4
Step 4 - Write the approximation.
In this problem: After 4 steps the approximation is \(y(2) \approx 3\).
Final Answer
Calculator and Practice Mode
Want to check your own working? The Euler Method Calculator solves any problem you type in and shows every step, so you can compare it line by line with your answer and find exactly where a mistake crept in. When you are ready to test yourself, Euler Method Practice gives you a new problem at Easy, Medium or Hard level, checks your answer and shows the full working whenever you get one wrong. Practice Mode for this calculator is available on the Pro plan.