text: I'g got for a smooth aproximation method (like cubic splines) and then I'd calculate derivatives.\nIt's as simple as getting 4 points, calculating a third degree polynomial and that's it, if all you need is thhe derivative in one point.\nIf you need a complete derivative plot, then use that method for the first segment. Next, use two more points and add the restriction of the value of the 8third grade) polynomial as well as its first and second derivatives be same as from the left than from the right in the last point of the previous polynomial; repeat until you have covered all your points.\nThat way, your fucntion and its derivative will be continuous and smooth, which is nice.