[SciPy-user] Derivative() usage?

Giovanni Samaey Giovanni.Samaey at cs.kuleuven.ac.be
Wed Nov 3 08:48:28 EST 2004


>
> 'n' as in d^n/dx^n .
>
> Somewhat confusingly, 'N' is being used in the docstring as a synonym 
> for 'order' and is the number of discrete points used to evaluate the 
> numerical derivative. I'm going to fix that.
>
> For example, when n=2, and order=3, one is computing the second 
> central derivative using 3 points [x0-dx, x0, x0+dx].

Normally, one would expect "order" to be an indication of the accuracy 
of the derivative.  So, order=p should mean
d^n/dx^n (exact answer) - (what's computed) = O(dx^p) where dx is the 
mesh spacing.
Clearly, with three points for the second derivative, the order is only 
two, so this is clearly not a mathematically correct use of the word 
"order"...


-- 
Giovanni Samaey		 	




More information about the SciPy-User mailing list