I suppose you asked a similar question at MATLAB Central the other day. You did not post your data there, so I could not give a good answer.
Estimating a second derivative is a difficult task. This is not a valid issue. Differentiation itself is a noise amplifier, so evaluating the second derivative βtwiceβ as bad. This is simply not an easy task, of course, not very good.
Using this set of points, I decided to evaluate the spline model with
A simple plot tells me, along with your comments, that I expect this function to be a monotonous decreasing function. Apparently, it is asymptotically linear at each end, like a hyperbolic segment, with positive curvature throughout the region.
So now I will use this information to create a model for your data using my SLM toolbar.
slm = slmengine(x,f,'plot','on','decreasing','on','knots',20, ... 'concaveup','on','endconditions','natural');
slmengine is designed to receive information from you in the form of recipes for the shape of the curve. You will find that by providing such information, it greatly adjusts the form of the result to match your knowledge of the process. Here I just made a few guesses about the shape of the curve from your comments.
In the above call, I gave the SLM command:
- schedule the result
- create a monotonic decreasing function x
- Use 20 evenly spaced nodes.
- make the curve have everywhere a positive second derivative
- set the second derivatives at the end are zero
The plot as generated is gui itself, allowing you to build a function and data, as well as build derivatives of the result. The vertical green lines are the locations of the nodes.

Here we see that matching a curve is a reasonable approximation to what you are looking for.
What about the second derived chart? Of course, SLM is a piecewise cubic tool. Therefore, the second derivatives are only piecewise linear. This is problem? Will you ask me to provide a tool for higher order splines? Sorry, but no, I wonβt. These higher order derivatives are too poorly rated to require a very smooth result. In fact, I would be pleased with this prediction. Please note that the glitches in the second derivative were consistent. If I used more nodes or less, they were still there. This is a good way to find out if a shape is a curve shape or just an artifact of the placement of nodes.
See that the restrictions that I imposed on the shape of the curve led to the fact that it was quite reasonable, despite the fact that I used a lot more nodes than I had data. SLM did not have any problems in pricing.

If I want to try a smoother estimate of the second derivative, just use more nodes. SLM is relatively fast. Thus, with 50 nodes, we get a very similar result for the second derivative of the curve.

You can find SLM (here) on MATLAB Central. This requires an optimization toolbar.