MathGroup Archive 2003

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: smooth/spline derivatives of a list function

  • To: mathgroup at smc.vnet.net
  • Subject: [mg41681] Re: smooth/spline derivatives of a list function
  • From: Bill Rowe <listuser at earthlink.net>
  • Date: Fri, 30 May 2003 03:56:26 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

On 5/29/03 at 8:15 AM, mathma18 at hotmail.com (Narasimham G.L.) wrote:

>Several scattered points (x,y) are given on a list. How to get
>smoothed/splined numerical values of  Integral [y^2 dx], slope dy/dx,
>second derivative d2y/dx2 , and third derivative d3y/dx3 to better
>(smaller) uniform  x- increments ?.  Also, how to obtain these as
>functions of uniformly incremented arc length ?. Thanks in advance.

There are a number of possible ways to proceed but it is difficult to know what to suggest. Your usage of "smoothed" suggests the data points maybe of the form {x, y + error} and you do not want the numeric result to pass through all of the data points in the list. Also, you don't specify whether or not the data points are sampled at equal x intervals.

If the data is sampled at equal x intervals, one way to proceed would be to take the FFT of the y data points. Any desired smoothing could be done by filtering the FFT. Then the derivatives and integral could be computed by multiplying the transformed data by the correct factor and computing the inverse FFT. Details on how to do this (without smoothing) have been previously discussed here and could be found with a search of the archives.

If the data is not sampled at equal x-intervals, you could do a ListInterpolation then perform the desired integration/differention on the resulting interpolating function. Note, this approach will not have any smoothing done.

If smoothing is needed, you could sample the resulting interpolating function at equal x intervals and use the FFT techniques I mentioned above.

Alternatively, you could first smooth the data using one of the functions in Statistics`DataSmoothing then do a ListInterpolation followed by the appropriate integration/differention. Or this package could be used to smooth the results after doing the desired integration/differentiation. Note which order (smoothing first or smoothing last) is better will depend on what you are starting with and exactly what you want to achieve. The results of applying the smoothing in different orders is likely to be similar but not identical.

Finally, you also indicated the possibility of a spline. There is the package NumericalMath`SplineFit` which will compute splines that you could do further operations on.


  • Prev by Date: Re: Re: A bug?......In[1]:= Sum[Cos[x], {x, 0, Infinity, Pi}]......Out[1]= 1/2
  • Next by Date: Re: evaluation until failure
  • Previous by thread: smooth/spline derivatives of a list function
  • Next by thread: PolyGamma - series expansions