next up previous
Next: About this document ... Up: Predictor - Corrector Methods Previous: Predictor - Corrector Methods

4.1 Algorithm (Predictor-corrector Method)

For the IVP (1.1) set $ X_0=a,\,\, Y_0=y_0$ and a choose a step size h. Let $ X_i=a+ih, i=0,1,2,..n$ with $ X_n=b$. Let M be the tolerance or the number of iteration for each step Let $ \epsilon_{ref}$ be the tolerance on the relative error at each step. For k=0,1,2,..n
(a) compute

$\displaystyle Y^0_{k+1}=Y_k+hf(x_k,Y_k)$

(b) for m=0,1,2...M compute

$\displaystyle Y^{m+1}_{k+1}=Y_k+\frac{h}{2}\{f(x_k,Y_k)+f(x_{k+1},Y^m_{k+1})\}$

(c) Stop the iterations whenever the absolute of the relative error

$\displaystyle \vert(Y^{m+1}_{k+1}-Y^m_{k+1})\vert/Y^{k+1}_{k+1} \quad < \epsilon$

Remark: The tolerance in the number of inner iteration has been incorporated in (6) by setting m = 0,1,2...M.



root 2006-02-14