Finding an accurate derivative for discrete points

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.
 
Back
Top