[Tutor] hi

Oscar Benjamin oscar.j.benjamin at gmail.com
Sat Aug 10 03:03:25 CEST 2013


On 9 August 2013 21:51, Vick <vick1975 at orange.mu> wrote:
> Oscar wrote:
>> Can you respond inline and trim the part you're not quoting instead of
>> top-posting please?
>
> Ok. But may I ask why please?

You may. It makes for better communication. Isn't it easier to read
this as a conversation with the context I'm replying to above my
reply? Also you please don't trim the who wrote what header line (so
that I don't have to add in the "Oscar wrote" part above.

>> What do you mean by best? There are different ODE solvers for different
>> problems.
>
> I meant best accuracy in digits.

But for what problem? Different ODE solvers are better at solving
different types of ODEs, or even at finding different solutions of the
same ODEs. Do you mean the best solver for non-smooth problems, for
stiff problems, for getting hyper-accurate solutions to super-smooth
problems, etc.?

[snip]
> I just didn't realize that scipy had an ODE solver!

Always check this kind of thing before reinventing the wheel. Scipy's
odeint is a very good general purpose solver.

> Ok, but what is the best
> one you have? Of course in terms of digits accuracy?

Even the simplest solvers can usually be made as accurate as desired
by reducing the step-size and increasing the precision. When people
talk about one solver as being more accurate than another they usually
mean that it is better accuracy for a given precision (and a
particular ODE, initial condition etc.) or that it achieves a better
accuracy given the same amount of computation time. The question
you've asked is ill-posed as we can easily construct a solver to any
arbitrary degree of accuracy (for well-behaved ODEs).


Oscar


More information about the Tutor mailing list