From: spellucci@mathematik.tu-darmstadt.de (Peter Spellucci) Subject: Re: Controling the step in numerical resolution of ODEs Date: 29 May 2000 15:11:49 GMT Newsgroups: sci.math.num-analysis Summary: [missing] In article <8gttpb$kbd$1@wanadoo.fr>, "Alexandre Hammer" writes: |> Hello, |> I have to study the solutions of a differential equation by using the BDF4 |> method (4th order). |> There are no problems with a constant step but now I have to introduce a |> method of Richarson to control it. I'm not sure about what is a such method; |> can someone say it to me ? |> I've found another method for my problem (maybe it is Richarson), but, to |> use it, I need to know "instantaneously" an approximation of the error of |> consistance(I'm not sure if this is the good term in english...). |> My algorithm to solve the equation is: |> -RK3 (to compute the 3 first values knowing the ICs) |> -Prediction-Correction where Adams-Bashforth of 3th order is the predictor |> and BDF4 is the corrector. |> So the question: how can I obtain (easily) an estimation of the error of |> consistance with this algorithm ? the difference between a forth order method and a third order method gives an estimate for the local error of the t h i r d o r d e r m e t h o d. Richardson extrapolation would proceed as follows: perform a step with stepsize dt. repeat by two steps with stepsize dt/2. for a forth order method the second result should be by a factor 1/16 more accurate. this gives you a way to control the stepsize. but what you are doing is a nonsense, numerically. using BDF makes sense for stiff problems only, because of the implicitness. to use Adams-Bashforth as a predictor (with its extremely small region of absolute stability) will result in a disaster. If you indeed need an implicit scheme, use a variable order BDF scheme as done by Gear himself (and Petzold in DASSL). This variable order scheme also allows you to control the local error. If you want to use a more analytic way, you could formally derive the leading term of the local truncation error of BDF, since it is a linear multistep method. Books on numerical solving ODE's show you how to do that. the error will be of the form cons*y^(5)(x)*h^5 where cons is known. you could try to estimate y^(5)(x) from finite differences of the computed grid values of f(t,y) (the forth divided differences, of course), but this will be quite unsafe for small or largely varying stepsizes. hope that helps peter