Finding an accurate derivative for discrete points

Click For Summary
SUMMARY

This discussion focuses on optimizing the calculation of derivatives from discrete data points, specifically using numerical methods. The user proposes using the formula f'(x) ~ (y2-y1)/(x2-x1) for close points but acknowledges potential inaccuracies due to machine number limitations. To enhance accuracy, the user suggests employing multi-point methods, such as three-point methods, to compute derivatives. The discussion also references a Computational Physics Course lecture for further learning on the topic.

PREREQUISITES
  • Understanding of numerical differentiation techniques
  • Familiarity with machine precision and its effects on calculations
  • Knowledge of multi-point derivative approximation methods
  • Basic concepts of calculus and derivatives
NEXT STEPS
  • Explore multi-point numerical differentiation methods
  • Learn about machine precision and its impact on numerical calculations
  • Study the Computational Physics Course, specifically Lecture 7
  • Investigate optimization techniques for selecting point distances in derivative calculations
USEFUL FOR

Mathematicians, physicists, data analysts, and anyone involved in numerical analysis or computational methods for deriving functions from discrete datasets.

hgonzaga89
Messages
1
Reaction score
0
This is a question i hope someone on the forum can help me answer.
Recently In a lab i had this question pop into my head, here goes:
If I have a set of data and i am asked to find the derivative, I can plot
it using the equation f'(x) ~ (y2-y1)/(x2-x1) if i have sufficently close points.
A complication arrises using machine numbers since if the points are too close
we may calculate a near infinite derivative, so it may be wise to make this
modification f'(x) ~ (y3-y1)/(x3-x1),(y4-y1)/(x4-x1) ... etc. So if assuming I
communicated this background information sufficiently, my question is:
Is there a way to optimize the distance between points a and b such that the
derivative approximation is most accurate?

Any Takers?
 
Physics news on Phys.org
The more sophisticated numerical methods use more than two points on the function to compute it's derivative at one point. (They are naturally called "two point", "three point" ... etc. methods). A entertaining way to learn about this is to watch the 7th lecture in the Computational Physics Course, which you can reach from the page http://www.perimeterscholars.org/266.html ( a link given in this forum in the Math And Science Learning Materials section).

Of course, it would be interesting to discuss it here too.
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 14 ·
Replies
14
Views
4K
Replies
7
Views
2K
  • · Replies 2 ·
Replies
2
Views
8K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
Replies
3
Views
2K
Replies
1
Views
3K