Improved Euler Method Notes
These Improved Euler Method Notes explain how to approximate the solution of an initial value problem more accurately than plain Euler, with the working shown line by line. A first slope predicts where the step lands, a second slope is read at that predicted point, and the average of the two is what the step actually uses. Averaging the two slopes is what cancels most of the error. Following the same pattern every time keeps predictor and corrector distinct.
Step-by-step method
- Set up the problem.
- Write the update rule.
- Apply the rule step by step.
- Write the approximation.
Formula: Improved Euler Method
The slope at the start and the slope at the end of a trial step are averaged, which gives a far better step than Euler's method.
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. Work out \(k_{2}\) at the end of the trial step, \(x_{k} + h\) and \(y_{k} + hk_{1}\), not at the original point.
Required knowledge
- How the basic step works, covered in the Euler's Method Calculator.
- How to evaluate f at a point, covered in the Function Evaluator Calculator.
Where Is the Improved Euler Method Used?
The improved Euler method, also called Heun's method, is a simple predictor-corrector scheme, the same idea used in many professional solvers. Its error falls much faster than Euler's as h shrinks, so it is used where a cheap but reasonably accurate step is needed, such as in simple engineering simulations, orbit sketches and biological growth models.
- Predictor-corrector simulations
- Engineering models with moderate accuracy
- Orbital and projectile sketches
- Biological growth models
- Teaching error and step size
Improved Euler 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. Compare the answers with Euler's method.
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: Improved Euler Method
The slope at the start and the slope at the end of a trial step are averaged, which gives a far better step than Euler's method.
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: The improved Euler method, also called Heun's method, works out the slope at the start of the step and the slope at the end of a trial Euler step, then moves using the average of the two. This is much more accurate than Euler's method.
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: From \((x_{0}, y_{0}) = (0,\; 2)\), the slope at the start is \(k_{1} = f(0,\; 2) = - 0 + {2} = 2\). A trial Euler step gives \(y_{k} + hk_{1} = 2 + 0.2 \times 2 = 2.4\), and the slope there is \(k_{2} = f(0.2,\; 2.4) = - 0.2 + {2.4} = 2.2\). Averaging the two slopes gives \(y_{1} = 2 + \frac{0.2}{2}\left(2 + 2.2\right) = 2.42\).
Step 3b
Step 3b - Step 2.
In this problem: From \((x_{1}, y_{1}) = (0.2,\; 2.42)\), the slope at the start is \(k_{1} = f(0.2,\; 2.42) = - 0.2 + {2.42} = 2.22\). A trial Euler step gives \(y_{k} + hk_{1} = 2.42 + 0.2 \times 2.22 = 2.864\), and the slope there is \(k_{2} = f(0.4,\; 2.864) = - 0.4 + {2.864} = 2.464\). Averaging the two slopes gives \(y_{2} = 2.42 + \frac{0.2}{2}\left(2.22 + 2.464\right) = 2.8884\).
Step 3c
Step 3c - Step 3.
In this problem: From \((x_{2}, y_{2}) = (0.4,\; 2.8884)\), the slope at the start is \(k_{1} = f(0.4,\; 2.8884) = - 0.4 + {2.8884} = 2.4884\). A trial Euler step gives \(y_{k} + hk_{1} = 2.8884 + 0.2 \times 2.4884 = 3.38608\), and the slope there is \(k_{2} = f(0.6,\; 3.38608) = - 0.6 + {3.38608} = 2.78608\). Averaging the two slopes gives \(y_{3} = 2.8884 + \frac{0.2}{2}\left(2.4884 + 2.78608\right) = 3.415848\).
Step 3d
Step 3d - Step 4.
In this problem: From \((x_{3}, y_{3}) = (0.6,\; 3.415848)\), the slope at the start is \(k_{1} = f(0.6,\; 3.415848) = - 0.6 + {3.415848} = 2.815848\). A trial Euler step gives \(y_{k} + hk_{1} = 3.415848 + 0.2 \times 2.815848 = 3.979018\), and the slope there is \(k_{2} = f(0.8,\; 3.979018) = - 0.8 + {3.979018} = 3.179018\). Averaging the two slopes gives \(y_{4} = 3.415848 + \frac{0.2}{2}\left(2.815848 + 3.179018\right) = 4.015335\).
Step 3e
Step 3e - Step 5.
In this problem: From \((x_{4}, y_{4}) = (0.8,\; 4.015335)\), the slope at the start is \(k_{1} = f(0.8,\; 4.015335) = - 0.8 + {4.015335} = 3.215335\). A trial Euler step gives \(y_{k} + hk_{1} = 4.015335 + 0.2 \times 3.215335 = 4.658401\), and the slope there is \(k_{2} = f(1,\; 4.658401) = - 1 + {4.658401} = 3.658401\). Averaging the two slopes gives \(y_{5} = 4.015335 + \frac{0.2}{2}\left(3.215335 + 3.658401\right) = 4.702708\).
Step 4
Step 4 - Write the approximation.
In this problem: After 5 steps the approximation is \(y(1) \approx 4.702708\).
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: Improved Euler Method
The slope at the start and the slope at the end of a trial step are averaged, which gives a far better step than Euler's method.
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: The improved Euler method, also called Heun's method, works out the slope at the start of the step and the slope at the end of a trial Euler step, then moves using the average of the two. This is much more accurate than Euler's method.
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: From \((x_{0}, y_{0}) = (0,\; 1)\), the slope at the start is \(k_{1} = f(0,\; 1) = 0 \times {1} = 0\). A trial Euler step gives \(y_{k} + hk_{1} = 1 + 0.1 \times 0 = 1\), and the slope there is \(k_{2} = f(0.1,\; 1) = 0.1 \times {1} = 0.1\). Averaging the two slopes gives \(y_{1} = 1 + \frac{0.1}{2}\left(0 + 0.1\right) = 1.005\).
Step 3b
Step 3b - Step 2.
In this problem: From \((x_{1}, y_{1}) = (0.1,\; 1.005)\), the slope at the start is \(k_{1} = f(0.1,\; 1.005) = 0.1 \times {1.005} = 0.1005\). A trial Euler step gives \(y_{k} + hk_{1} = 1.005 + 0.1 \times 0.1005 = 1.01505\), and the slope there is \(k_{2} = f(0.2,\; 1.01505) = 0.2 \times {1.01505} = 0.20301\). Averaging the two slopes gives \(y_{2} = 1.005 + \frac{0.1}{2}\left(0.1005 + 0.20301\right) = 1.020175\).
Step 3c
Step 3c - Step 3.
In this problem: From \((x_{2}, y_{2}) = (0.2,\; 1.020175)\), the slope at the start is \(k_{1} = f(0.2,\; 1.020175) = 0.2 \times {1.020175} = 0.204035\). A trial Euler step gives \(y_{k} + hk_{1} = 1.020175 + 0.1 \times 0.204035 = 1.040579\), and the slope there is \(k_{2} = f(0.3,\; 1.040579) = 0.3 \times {1.040579} = 0.312174\). Averaging the two slopes gives \(y_{3} = 1.020175 + \frac{0.1}{2}\left(0.204035 + 0.312174\right) = 1.045986\).
Step 4
Step 4 - Write the approximation.
In this problem: After 3 steps the approximation is \(y(0.3) \approx 1.045986\).
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: Improved Euler Method
The slope at the start and the slope at the end of a trial step are averaged, which gives a far better step than Euler's method.
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: The improved Euler method, also called Heun's method, works out the slope at the start of the step and the slope at the end of a trial Euler step, then moves using the average of the two. This is much more accurate than Euler's method.
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: From \((x_{0}, y_{0}) = (0,\; 1)\), the slope at the start is \(k_{1} = f(0,\; 1) = 0 + {1} = 1\). A trial Euler step gives \(y_{k} + hk_{1} = 1 + 0.1 \times 1 = 1.1\), and the slope there is \(k_{2} = f(0.1,\; 1.1) = 0.1 + {1.1} = 1.2\). Averaging the two slopes gives \(y_{1} = 1 + \frac{0.1}{2}\left(1 + 1.2\right) = 1.11\).
Step 3b
Step 3b - Step 2.
In this problem: From \((x_{1}, y_{1}) = (0.1,\; 1.11)\), the slope at the start is \(k_{1} = f(0.1,\; 1.11) = 0.1 + {1.11} = 1.21\). A trial Euler step gives \(y_{k} + hk_{1} = 1.11 + 0.1 \times 1.21 = 1.231\), and the slope there is \(k_{2} = f(0.2,\; 1.231) = 0.2 + {1.231} = 1.431\). Averaging the two slopes gives \(y_{2} = 1.11 + \frac{0.1}{2}\left(1.21 + 1.431\right) = 1.24205\).
Step 3c
Step 3c - Step 3.
In this problem: From \((x_{2}, y_{2}) = (0.2,\; 1.24205)\), the slope at the start is \(k_{1} = f(0.2,\; 1.24205) = 0.2 + {1.24205} = 1.44205\). A trial Euler step gives \(y_{k} + hk_{1} = 1.24205 + 0.1 \times 1.44205 = 1.386255\), and the slope there is \(k_{2} = f(0.3,\; 1.386255) = 0.3 + {1.386255} = 1.686255\). Averaging the two slopes gives \(y_{3} = 1.24205 + \frac{0.1}{2}\left(1.44205 + 1.686255\right) = 1.398465\).
Step 3d
Step 3d - Step 4.
In this problem: From \((x_{3}, y_{3}) = (0.3,\; 1.398465)\), the slope at the start is \(k_{1} = f(0.3,\; 1.398465) = 0.3 + {1.398465} = 1.698465\). A trial Euler step gives \(y_{k} + hk_{1} = 1.398465 + 0.1 \times 1.698465 = 1.568312\), and the slope there is \(k_{2} = f(0.4,\; 1.568312) = 0.4 + {1.568312} = 1.968312\). Averaging the two slopes gives \(y_{4} = 1.398465 + \frac{0.1}{2}\left(1.698465 + 1.968312\right) = 1.581804\).
Step 4
Step 4 - Write the approximation.
In this problem: After 4 steps the approximation is \(y(0.4) \approx 1.581804\).
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: Improved Euler Method
The slope at the start and the slope at the end of a trial step are averaged, which gives a far better step than Euler's method.
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: The improved Euler method, also called Heun's method, works out the slope at the start of the step and the slope at the end of a trial Euler step, then moves using the average of the two. This is much more accurate than Euler's method.
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: From \((x_{0}, y_{0}) = (0,\; 0)\), the slope at the start is \(k_{1} = f(0,\; 0) = 2 \times 0 = 0\). A trial Euler step gives \(y_{k} + hk_{1} = 0 + 0.5 \times 0 = 0\), and the slope there is \(k_{2} = f(0.5,\; 0) = 2 \times 0.5 = 1\). Averaging the two slopes gives \(y_{1} = 0 + \frac{0.5}{2}\left(0 + 1\right) = 0.25\).
Step 3b
Step 3b - Step 2.
In this problem: From \((x_{1}, y_{1}) = (0.5,\; 0.25)\), the slope at the start is \(k_{1} = f(0.5,\; 0.25) = 2 \times 0.5 = 1\). A trial Euler step gives \(y_{k} + hk_{1} = 0.25 + 0.5 \times 1 = 0.75\), and the slope there is \(k_{2} = f(1,\; 0.75) = 2 \times 1 = 2\). Averaging the two slopes gives \(y_{2} = 0.25 + \frac{0.5}{2}\left(1 + 2\right) = 1\).
Step 3c
Step 3c - Step 3.
In this problem: From \((x_{2}, y_{2}) = (1,\; 1)\), the slope at the start is \(k_{1} = f(1,\; 1) = 2 \times 1 = 2\). A trial Euler step gives \(y_{k} + hk_{1} = 1 + 0.5 \times 2 = 2\), and the slope there is \(k_{2} = f(1.5,\; 2) = 2 \times 1.5 = 3\). Averaging the two slopes gives \(y_{3} = 1 + \frac{0.5}{2}\left(2 + 3\right) = 2.25\).
Step 3d
Step 3d - Step 4.
In this problem: From \((x_{3}, y_{3}) = (1.5,\; 2.25)\), the slope at the start is \(k_{1} = f(1.5,\; 2.25) = 2 \times 1.5 = 3\). A trial Euler step gives \(y_{k} + hk_{1} = 2.25 + 0.5 \times 3 = 3.75\), and the slope there is \(k_{2} = f(2,\; 3.75) = 2 \times 2 = 4\). Averaging the two slopes gives \(y_{4} = 2.25 + \frac{0.5}{2}\left(3 + 4\right) = 4\).
Step 4
Step 4 - Write the approximation.
In this problem: After 4 steps the approximation is \(y(2) \approx 4\).
Final Answer
Calculator and Practice Mode
Want to check your own working? The Improved Euler (Heun) 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, Improved Euler (Heun) 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.