Euler's Method Calculator
This Euler Method Calculator approximates the solution of an initial value problem step by step, and shows the working 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. Build the table one row at a time. For two more free worked examples, check out the Euler's Method Notes.
The worked examples below go through the same pattern from start to finish, so you can compare every step with your own working. For more practice, the notes page goes further with extra worked examples and fuller explanations of the ideas behind each step. Use them together 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
Notes and Practice Mode
Want to understand the method more deeply? The Euler Method Notes go through the same pattern with extra worked examples and fuller explanations of the ideas behind each step, so you can see why every step works and not just what to do. 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.
Login and upgrade to Pro to unlock the full step solution.
Example Problems
Click one to load it into the box and solve it.