Now, let's have a look at the zoo of methods that we've seen so far
and then let's add one further method to that collection.
The forward Euler method work by starting from the current value
and then incrementing that by step size h times the rate of change at the current point.
I'm writing f for the rate of change here.
Heun method also known as the improved or the modified Euler method
advances by the time step times the average of the rate of change at the beginning
plus the rate of change at the position predicted by the forward Euler method.
With the forward Euler method, the error of a numerical solution grows linearly with step size.
If you double the step size, the global error also doubles approximately at least.
The forward Euler method is a method of order 1. This function, the error grows like hÂ¹.
Heun method, however, is the solver of order 2. The error grows like h squared.
If you take half the step size, the error is shrinking to one quarter, which is much more efficient.
For the backward Euler method, you advance by the rate of change at the new position,
which makes this equation difficult--it's an implicit equation.
To complete our zoo of methods, we add a method that looks like Heun method
but is implicit like the backward Euler method.
This new rule is called the trapezoidal rule. Like Heun method, it's a method of order 2.
And if you compare these equations, they look pretty similar.
The trapezoidal rule advances by the average of the rate of change at the beginning
and the rate of change at the end, which means that this is an implicit equation.