[Tutor] hi

Oscar Benjamin oscar.j.benjamin at gmail.com
Mon Aug 12 16:18:16 CEST 2013


On 12 August 2013 13:08, Oscar Benjamin <oscar.j.benjamin at gmail.com> wrote:
>
> I would report a comparison of timings between this code and my
> decimal rk4 but I think it would be unfair as I think there may be
> something wrong with the way your's is implemented. Unless I've
> misunderstood something it's not achieving the proper benefits of the
> mpmath library since for some reason the error bottoms out at 1e-18. I
> replaced the bottom of your script with this:

I'm interested to have this DOPRIS8 integrator in my own collection of
integrators so I checked the source of the error. It turns out that
the coefficients you are using are only rational approximations to the
true coefficients as published in [1]. The rational approximations are
intended to be good enough for use with double precision but are
insufficient for the 30 dps setting that you are using. The reason
given by the authors for publishing approximate coefficients is that
(in 1981) it was deemed computationally intractable to compute the
exact rational coefficients. However that may not still be the case
with modern computing power. I doubt that I'll attempt this any time
soon but if you're able (and bothered) to do that I'd love to know
what the coefficients would be.


Oscar

References:
[1] P.J. Prince, J.R. Dormand, High order embedded Runge-Kutta
formulae, Journal of Computational and Applied Mathematics, Volume 7,
Issue 1, March 1981, Pages 67-75, ISSN 0377-0427,
http://dx.doi.org/10.1016/0771-050X(81)90010-3.
(http://www.sciencedirect.com/science/article/pii/0771050X81900103)


More information about the Tutor mailing list