Re: Recommendation for numerical differentiation formulas?
- From: spellucci@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (Peter Spellucci)
- Date: Thu, 13 Jul 2006 10:53:47 +0000 (UTC)
In article <1152734860.671170.151780@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
1940LaSalle@xxxxxxxxx writes:
Here's the situation: I have a series of data in a spread***; thethis is a special situation insofar as you want the derivative for all
independent variables are spaced equally. I need to determine the
first derivative at each of the values of the independent variable,
including the endpoints, within the spread***, and would prefer to do
it automatically, rather than do a new regression for every case study.
Could someone please (1) recommend a numerical differentiation scheme,
and (2) mention the source with explicit formulas (ideally, formulas
suitable for spread*** use)?
Thanks.
points in the table. there exist special schemes for this, and here
is a good one: (compact difference scheme of order 6)
alpha*u(i-1)+u(i)+alpha*u(i+1) = (beta/(2*h))*(f(i+1)-f(i-1))
+(gamma/(4*h))*(f(i+2)-f(i-2))
for i=2,...,n-1. here f(i)=f(x(i)) , x(i+1)-x(i)=h for all i
u(i) is the approximation for f'(x(i)).
alpha=1/3, beta=14/9, gamma=1/9;
this is a linear system of equations with tridigonal matrix, which can be solved
efficiently.
you miss here approximations for the first i=0 and last i=n+1 point. for these
endpoints you must use secail one sided formulas, for example
f'(x(0))=(1/(2*h))*(-3*f(0)+4*f(1)-f(2)) error const*h^2
f'(x(0))=(1/12*h))*(-25*f(0)+48*f(1)-36*f(2)+16*f(3)-3*f(4)) error const*h^4
for the right endpoint you complete flip these formulas .
hth
peter
.
- Prev by Date: Re: How to get the analytical PDF of this expression?
- Next by Date: Re: Compating double with Interval Problem Matlab
- Previous by thread: Re: Recommendation for numerical differentiation formulas?
- Next by thread: Re: Recommendation for numerical differentiation formulas?
- Index(es):