Talk:Predictor–corrector method
Proposed example
Example of a trapezoidal predictor-corrector method
first calculate an initial guess value via Euler ( note in this example h = ) :
next improve the initial guess through iteration of the trapezoidal rule:
...
until the guesses converge to within some error tolerance e:
Once convergence is reached, then use the final guess as the next step:
If the guesses don't converge within some number of steps, such as reduce h and repeat the step or repeat the integration since h was too large. If I remember correctly, the iterative process converges quadratically. As an alternative to an error tolerance, the iteration count can be just some fixed number n. If the guesses converge very quickly, you might consider increasing h, but note that the overall error is unrelated to convergence in the algorithm but instead to the step size and the core method, which in this example is a trapezoidal, (linear) approximation of the actual function. The step size h ( ) needs to be relatively small in order to get a good approximation. Also see stiff equation