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