Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
1st Derivative at Endpoints of 1D Tabulated Function ??
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
monir  
View profile  
 More options Nov 18 2009, 1:20 pm
Newsgroups: sci.math.num-analysis
From: monir <mon...@mondenet.com>
Date: Tue, 17 Nov 2009 21:20:55 -0800 (PST)
Local: Wed, Nov 18 2009 1:20 pm
Subject: 1st Derivative at Endpoints of 1D Tabulated Function ??
(re-posting on the advice of Ken Pledger of the sci.math group)

Hello;

1) I have numerous sufficiently-smooth (analytical) multidimensional
data sets.
Let us only consider the 1D sets.
I need to set the 1st derivative at the endpoints for a cubic spline
interpolation in 1D.
Setting the 2nd derivative to zero (natural spline) at the boundaries
does not appear to be practical, since the 1st derivative would be
close to infinity at those points, and I'd later need the 1st
derivative at all the set points!

2) The simplest alternative approach would be to join the N points of
the set by a polynomial of degree N-1 and calculate the 1st derivative
at the endpoints, and input those values for the cubic spline.
Obviously, if N, say, equals 40 for one data set, then it does not
make sense in this case to apply a 39th deg poly to compute the 1st
derivative at the boundaries!!

3) Instead of using the entire N points, I thought it might be suffice
to use only 3 points (for 2nd deg poly) or 4 points (for 3rd deg poly)
at each end for the 1st derivative.
But would using few points at each end be good enough ??

4) Realizing polys are the easiest to apply and most difficult to
predict, I wonder if there're some mathematical criteria that one
should observe in deciding how many points would be sufficient for a
particular data set, so that the 1st derivative there would be
"realistic and more representative" of the data set.

Would some statistical characteristics describing the data help ??

Do you expert recommend a better approach for setting the 1st
derivative at the endpoints for cubic splines ??

Your comments/suggestions would be greatly appreciated.

Monir


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Peter Spellucci  
View profile  
 More options Nov 18 2009, 11:27 pm
Newsgroups: sci.math.num-analysis
From: spellu...@fb04633.mathematik.tu-darmstadt.de (Peter Spellucci)
Date: Wed, 18 Nov 2009 16:27:25 +0100 (CET)
Local: Wed, Nov 18 2009 11:27 pm
Subject: Re: 1st Derivative at Endpoints of 1D Tabulated Function ??

In article <6a07f408-e5ee-4ec9-855a-f75ebca45...@o31g2000vbi.googlegroups.com>,

 monir <mon...@mondenet.com> writes:
>(re-posting on the advice of Ken Pledger of the sci.math group)

>Hello;

>1) I have numerous sufficiently-smooth (analytical) multidimensional
>data sets.
>Let us only consider the 1D sets.
>I need to set the 1st derivative at the endpoints for a cubic spline
>interpolation in 1D.
>Setting the 2nd derivative to zero (natural spline) at the boundaries
>does not appear to be practical, since the 1st derivative would be
>close to infinity at those points, and I'd later need the 1st
>derivative at all the set points!

this sounds no good, since the interpolation error is dependent on the
(local) derivatives and hence might be huge
(this holds whatever interpolation you might invent)

>2) The simplest alternative approach would be to join the N points of
>the set by a polynomial of degree N-1 and calculate the 1st derivative
>at the endpoints, and input those values for the cubic spline.
>Obviously, if N, say, equals 40 for one data set, then it does not
>make sense in this case to apply a 39th deg poly to compute the 1st
>derivative at the boundaries!!

terrible idea. try this with 10, 20,... equidistant data points and plot
the polynomial. you will never try this again, for sure

>3) Instead of using the entire N points, I thought it might be suffice
>to use only 3 points (for 2nd deg poly) or 4 points (for 3rd deg poly)
>at each end for the 1st derivative.
>But would using few points at each end be good enough ??

much better idea, and for comformity with the spline approximation
which is h^4 (h = grid size) a third order polynomial suffices
(i.e. four points)

>4) Realizing polys are the easiest to apply and most difficult to
>predict, I wonder if there're some mathematical criteria that one
>should observe in deciding how many points would be sufficient for a
>particular data set, so that the 1st derivative there would be
>"realistic and more representative" of the data set.

yes, see above: the interpolation error in the derivative value should not
destroy the goodness of fit of the main scheme

>Would some statistical characteristics describing the data help ??

??? hopefully the data are noise free, otherwise local interpolation
is nothing good at all, and instead of an interpolating spline
you might use a smoothing spline which would not need artificial
end conditions.

>Do you expert recommend a better approach for setting the 1st
>derivative at the endpoints for cubic splines ??

>Your comments/suggestions would be greatly appreciated.

>Monir

with very large derivative values at the end points you better might
obtain estimates of these by using local rational interpolation.
something like
  (a0+a1*x)/(1+b1*x+b2*x^2)

hence y(i) = a0 + a1*x(i) - y(i)*x(i)*b1 -y(i)*x(i)^2*b2  i=0,1,2,3
give a system of four equations for the four unknowns
remainder analysis left as an exercise in taylorseries (for y(x) )
in my next unseen.

anyway, here is a set of formulae for the derivative at the left endpoint x0
of an equidistant grid : values f(x0+i*h) i=0,1,.... get the coefficients
from the list, added up, divided by common denominator)

-1,1   denominator h     error O(h)
-3,4,-1 denominator (2*h) error O(h^2)
-11,18,-9,2  denominator 6*h error O(h^3)
-25,48,-36,16,-3 denominator 12*h  error O(h^4)
-137,300,-300,200,-75,12  denominator 60*h error O(h^5)
-12348,30240,-37800,33600,-18900,6048,-840 denominator 5040*h error O(h^6)

hth
peter


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
monir  
View profile  
 More options Nov 19 2009, 11:32 pm
Newsgroups: sci.math.num-analysis
From: monir <mon...@mondenet.com>
Date: Thu, 19 Nov 2009 07:32:19 -0800 (PST)
Local: Thurs, Nov 19 2009 11:32 pm
Subject: Re: 1st Derivative at Endpoints of 1D Tabulated Function ??
On Nov 18, 10:27 am, spellu...@fb04633.mathematik.tu-darmstadt.de

(Peter Spellucci) wrote:

>  monir <mon...@mondenet.com> writes:
> >(re-posting on the advice of Ken Pledger of the sci.math group)

Peter;

Thank you for your prompt and thoughtful reply.

I tried earlier the 4-point 3rd deg poly at the endpoints, and am
anxious to try your suggested rational form / Taylor series with the
remainder term, and compare the results.

Will report back shortly.
Thanks again for your help.

Monir


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2010 Google