Question on Numerical Derivative Algorithm (dfridr)


Ignoramus
12-14-2003, 10:31 AM
Hi all!

I tried using the algorithm dfridr for calculating derivatives (given in chapter 5-7), and kind of liked it :)

I only want to understand a single thing about this algorithm: the fac variable. As it follows from the code, fac is increased by CON2 from column to column of the Neville matrix, while the hh variable (i.e. the step of extrapolation) is increased only by CON. Although the algorithm works perfectly as I experimented with it, it still seems quite weird to me, since Neville algorithm for polynomial extrapolation AFAIK would use the same hh for all columns in this case. As I also tried incrementing fac by CON only, the algorithm seems to work as well, but with somewhat worse convergence.

What is this all about? What is the meaning of fac? Why is it multiplied by CON2 instead of CON?

By the way, I also wonder why CON is 1.4 and NTAB is 10. ;)

Sorry for being meticulous, it's just that I hate Copy-Paste programming ;)

Thanks.

jaje
09-07-2004, 08:01 AM
Only now did I understand fully the dfridr program, so please forgive me if a reply took so long.

The Neville extrapolation algorithm is applied to the central difference approximation (f(x + hh) - f(x - hh))/2hh for Ridder's method. Since its "error series" comes out in even powers of hh (a la Romberg), we scale by CON2 (= CON^2) for each extrapolation, which in effect is knocking out error terms hh^2 at a time. hh, however is scaled only by CON since this corresponds to the prescribed scaling of hh.

Those values for CON and NTAB were arbitrarily chosen by the authors (I think).

Hope this helps.

Jan. M (^_^)