Considering a centered finite difference approximation for the derivative, what is a reasonable approximation for the first and last points?

  • $\begingroup$ I have rewritten your question. Please check that I didn't change what you meant. $\endgroup$
    – nicoguaro
    Jun 23 at 19:12
  • $\begingroup$ I think it means the same, thanks for the edit. $\endgroup$ Jun 23 at 19:14
  • 2
    $\begingroup$ What is reasonable depends on what you want. So what is your application? $\endgroup$
    – davidhigh
    Jun 23 at 21:38
  • $\begingroup$ I am analyzing the first and second derivatives to find knee point in a 2D curve. $\endgroup$ Jun 23 at 21:48

Given that you are using center difference formula to to get second order derivatives in your domain. The common practice at the ends is to use forward and backward difference formula ( start and end ) . Again this strictly depends on the nature of your problem and what you consider as reasonable approximation

  • $\begingroup$ That is indeed a possibility, and I have already tried that but the estimation of these values was poor. I also tough on simply copying the second and second to last values to the first and last position respectively $\endgroup$ Jun 24 at 14:55
  • $\begingroup$ is that a time-dependent problem or a stationary problem ? that you are trying to solve $\endgroup$ Jun 28 at 13:34
  • $\begingroup$ I am not sure how to answer that, so I am going to try to describe the problem. Consider a 2D curve defined by a set of points (x,y), usually, these points define one performance metric (for example cluster aggregation metric) the idea is to analyse the derivatives to find the knee/elbow points. There is no constraints regarding the spacing between the x points. $\endgroup$ Jun 28 at 15:00
  • $\begingroup$ But your suggestion worked, when I used the LaGrange 3 point derivative to compute the derivative on uneven time series. After that change, the first and last points were computed correctly. $\endgroup$ Jun 28 at 15:02
  • 1
    $\begingroup$ Glad you found it helpfull $\endgroup$ Jun 28 at 15:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.