12. Numerical Solutions of ODEs II

Improved Euler

Improved Euler Method in Numerical Analysis 📘

students, by the end of this lesson you should be able to explain why the Improved Euler method is more accurate than the basic Euler method, describe how it works step by step, and apply it to approximate solutions of ordinary differential equations $\left(\text{ODEs}\right)$. You will also see how it fits into the larger unit on numerical solutions of ODEs II, where methods like Runge-Kutta and system approximations are used to solve problems that are hard or impossible to solve exactly.

The big idea is simple: when you want to approximate the solution of an ODE such as $\frac{dy}{dt}=f\left(t,y\right)$, you do not jump forward using only the slope at the starting point. Instead, the Improved Euler method first predicts where the solution will go, then corrects that prediction by averaging slopes. This makes the method a better estimate of the curve 🌟.

Why We Need Improved Euler

Many real-world situations are modeled by differential equations. For example, the amount of medicine in the body, the speed of a falling object with air resistance, or the growth of a population may all be described by an ODE. Some ODEs have exact formulas, but many do not. When that happens, numerical methods let us build a table of approximate values instead.

The simplest method is Euler’s method. If the initial value problem is

$$

$\frac{dy}{dt}=f\left(t,y\right), \qquad y\left(t_0\right)=y_0,$

$$

then Euler’s method uses the slope at the starting point to estimate the next value:

$$

$y_{n+1}=y_n+h f\left(t_n,y_n\right),$

$$

where $h$ is the step size. This is useful, but it can be inaccurate because the slope may change quickly. Imagine walking uphill by looking only at the ground right in front of your feet. If the hill gets steeper or flatter, your guess can be off.

Improved Euler fixes part of that problem by checking the slope twice. First it uses a predictor step, then it averages the slope at the beginning and the predicted slope at the end. That is why it is also called the modified Euler method or Heun’s method in many textbooks 📈.

The Main Idea of Improved Euler

Suppose students wants to estimate the solution from $t_n$ to $t_{n+1}=t_n+h$. The Improved Euler method works in two stages.

Step 1: Predict

Use Euler’s method to predict a value at the next time point:

$$

$y_{n+1}^{\ast}=y_n+h f\left(t_n,y_n\right).$

$$

Here $y_{n+1}^{\ast}$ is only a predicted value, not the final answer.

Step 2: Correct

Now compute the slope at the predicted point $\left(t_{n+1},y_{n+1}^{\ast}\right)$. Then average the old slope and the new slope:

$$

y_{n+1}=y_n+$\frac{h}{2}$$\left[$f$\left($t_n,y_n$\right)$+f$\left($t_{n+1},y_{n+1}^{\ast}$\right)$$\right]$.

$$

This formula says: use half the step with the old slope and half the step with the predicted new slope. The result is usually much better than simple Euler because it accounts for how the slope changes over the interval.

A helpful way to think about it is to imagine a bike ride 🚲. If the road is changing from flat to uphill, using only the first slope is risky. Improved Euler looks ahead and blends the two slopes, giving a more realistic estimate of the path.

Worked Example with a Step-by-Step Table

Let’s use a concrete example. Consider the ODE

$$

$\frac{dy}{dt}=t+y,$

$$

with initial condition

$$

$y\left(0\right)=1.$

$$

We will use step size $h=0.1$ to estimate $y\left(0.1\right)$.

Predictor

At $t_0=0$ and $y_0=1$,

$$

$f\left(t_0,y_0\right)=0+1=1.$

$$

So the predicted value is

$$

$y_1^{\ast}=1+0.1\left(1\right)=1.1.$

$$

Corrector

Now evaluate the slope at $t_1=0.1$ using the predicted value:

$$

$f\left(t_1,y_1^{\ast}\right)=0.1+1.1=1.2.$

$$

Now average the slopes:

$$

$y_1=1+\frac{0.1}{2}\left(1+1.2\right).$

$$

So

$$

$y_1=1+0.05\left(2.2\right)=1.11.$

$$

That means Improved Euler gives the approximation

$$

$y\left(0.1\right)\approx 1.11.$

$$

For comparison, ordinary Euler would give

$$

$y_1=1+0.1\left(1\right)=1.1,$

$$

so Improved Euler makes a correction upward because the slope increases over the interval.

Why It Is More Accurate Than Euler

The accuracy improvement comes from the average slope. Euler’s method assumes the slope stays constant for the whole step. That is often not true. Improved Euler looks at the slope at both ends of the interval, which gives a better picture of the curve.

A useful geometric idea is this: Euler’s method uses a rectangle-like estimate for the area under the slope, while Improved Euler is closer to the trapezoidal rule. The trapezoidal rule is usually more accurate than a rectangle because it follows the changing height of the graph more closely.

In fact, if $f\left(t,y\right)$ behaves smoothly, Improved Euler generally has a smaller error than Euler’s method for the same step size $h$. Its local truncation error is on the order of $h^3$, and its global error is on the order of $h^2$. For Euler’s method, the global error is on the order of $h$. That means if you cut the step size in half, Improved Euler typically improves much faster than Euler 📊.

How to Use Improved Euler in Practice

When solving a problem by hand or on a calculator, students can follow these steps:

  1. Start with the initial value $\left(t_0,y_0\right)$.
  2. Choose a step size $h$.
  3. Compute the predictor using

$$

$ y_{n+1}^{\ast}=y_n+h f\left(t_n,y_n\right).$

$$

  1. Evaluate the slope again at $\left(t_{n+1},y_{n+1}^{\ast}\right)$.
  2. Compute the corrected value using

$$

y_{n+1}=y_n+$\frac{h}{2}$$\left[$f$\left($t_n,y_n$\right)$+f$\left($t_{n+1},y_{n+1}^{\ast}$\right)$$\right]$.

$$

  1. Repeat for the next interval.

This process can be organized in a table with columns for $t_n$, $y_n$, $f\left(t_n,y_n\right)$, $y_{n+1}^{\ast}$, and $y_{n+1}$. Tables are useful because they keep the calculations clear and reduce mistakes.

One important detail is that the method is still an approximation. A smaller $h$ usually gives better results, but it also means more calculations. This is one of the main trade-offs in numerical analysis: accuracy versus effort.

Connection to Numerical Solutions of ODEs II

Improved Euler is part of a bigger family of methods for solving ODEs numerically. In the same topic area, you may also study Runge-Kutta methods, which improve accuracy even more by sampling the slope several times within each step. Improved Euler is a special case of a predictor-corrector idea, where a rough estimate is made first and then improved using extra information.

It also connects naturally to system approximations. If one ODE is hard to solve, a system of ODEs can be handled by applying a numerical method to each component. For example, if a quantity depends on both position and velocity, the problem may be rewritten as a system of first-order equations. Improved Euler can be applied component by component in that setting.

So when students studies Numerical Solutions of ODEs II, Improved Euler is an important bridge. It shows how a basic idea from Euler’s method can be refined to create better estimates without jumping all the way to the more complex Runge-Kutta formulas.

Common Mistakes and Good Habits

A frequent mistake is to forget that the predicted value $y_{n+1}^{\ast}$ is not the final answer. It is only used to compute the corrected slope. Another mistake is to use the slope at $\left(t_n,y_n\right)$ twice by accident. The whole point of the method is to use the slope at the predicted endpoint as well.

Good habits include checking units, writing every step carefully, and keeping track of the step size $h$. It also helps to ask whether the solution should be increasing or decreasing. For example, if the differential equation says the slope is positive, the approximate values should usually rise as $t$ increases.

Improved Euler is especially useful when you want a method that is still simple enough to calculate by hand but more reliable than basic Euler. That balance makes it a favorite introductory method in numerical analysis classes ✨.

Conclusion

Improved Euler is a two-step numerical method for approximating solutions to first-order ODEs. It begins with a predictor, then improves the estimate by averaging the slope at the start and the predicted slope at the end of the interval. This makes it more accurate than Euler’s method while still being easy to understand and apply.

students, the key takeaway is that Improved Euler is not just a formula to memorize. It is an example of a larger numerical strategy: use information from more than one point to build a better approximation. That idea appears again in Runge-Kutta methods and in numerical methods for systems of differential equations. Understanding Improved Euler helps build a strong foundation for the rest of Numerical Solutions of ODEs II.

Study Notes

  • Improved Euler is also called the modified Euler method or Heun’s method.
  • It solves initial value problems of the form $\frac{dy}{dt}=f\left(t,y\right)$ with $y\left(t_0\right)=y_0$.
  • The predictor step is $y_{n+1}^{\ast}=y_n+h f\left(t_n,y_n\right)$.
  • The corrector step is $y_{n+1}=y_n+\frac{h}{2}\left[f\left(t_n,y_n\right)+f\left(t_{n+1},y_{n+1}^{\ast}\right)\right]$.
  • It averages two slopes, so it is usually more accurate than Euler’s method.
  • For smooth problems, its global error is on the order of $h^2$.
  • It is part of the broader topic of numerical solutions of ODEs II and connects to Runge-Kutta methods.
  • It can also be used as a building idea for approximating systems of ODEs.
  • Smaller step sizes usually improve accuracy, but they require more calculations.
  • The method is useful when an exact solution is difficult or impossible to find.

Practice Quiz

5 questions to test your understanding

Improved Euler — Numerical Analysis | A-Warded