10.2. Heun's method If we choose a small interval [,
] and
.
(approximate intergal) Use what we learned from Euler
Hence the Heun's method:
^^^^^^^^^^^^^^^^^^^ In general, to approximate Heun's method
Accuracy of the method (final global error):
2nd order accurate. e.g. Solve u' = (t - u)/2 with u(0) = 1 Exact result:
. Using h = 1, 1/2, 1/4, 1/8, we get (Obviously, the smaller "h", the better accuracy.) t_k h=1 h=1/2 h=1/4 h=1/8 Exact 1 .875 .831 .822 .820 .8196 2 1.172 1.117 1.107 1.104 1.1036 3 1.732 1.682 1.672 1.670 1.6694 10.3. Taylor series method: Taylor series:
u' = f u''
u''' = ... Taylor series method of order N is accurate of
. e.g. Solve u' = (t - u)/2 with u(0) = 1 (learn to compare) t_k h=1 h=1/2 h=1/4 h=1/8 Exact 1 .820 .8196 .8196 .8196 .8196 2 1.1045 1.1037 1.1036 1.1036 1.1036 3 1.6702 1.6694 1.6694 1.6694 1.6694 This method is very accurate, but tedious (particularly the machine has to figure out the derivatives.) 10.4. Runge-Kutta method : (of order 4 is the most popular!) Recall the Heun's method
If we define
then,
![]()
, This is the so-called 2nd order RK----RK2. This method is derived by matching coefficients in Taylor series with a general form for ODE solver:
![]()
![]()
![]()
![]()
After matching coefficients, We get,
(no free parameters)
![]()
![]()
The RK4:
e.g. Solve u' = (t u)/2 with u(0) = 1 (learn to compare) t_k h=1 h=1/2 h=1/4 h=1/8 Exact 1 .820 .8196 .8196 .8196 .8196 2 1.1045 1.1037 1.1036 1.1036 1.1036 3 1.6702 1.6694 1.6694 1.6694 1.6694 VERY similar to the 4th order Taylor series method. Why? 10.5. Predictor-corrector (we are using all old results.) The orginal equation can be written as
We can get approximately,
We can assume f(t,u) is a polynomial, then we can get the coefficients for the above equation and the solution of the IVP
![]()
This is something we knew already from Taylor. A newer formula:
A problem with this formula: We are computing
, how do we know it? we predict one and then correct the prediction.
Last Modified: 10/08/00