The data I have is always on a second degree polynomial (quadratic function). I want to find the peak of the interpolated function as accurately as possible.
So far I've been using
and then extract the peak value using
and a simple
loop. Although you can use a large number of newly generated samples in
you can still be more precise using the derivative of the fitted polynomial.
I haven't found a way to do that using
Now the only function I've found that returns the fitted polynomial coefficients is
, but this fitted function is quite inaccurate (most of the time the function doesn't even go through the data points).
I've tried using
and the fitted function seems to be quite accurate and it's very simple to get the derivative spline and its root.
Other polynomial fitting functions (
, ...) state that they are not computing polynomial coefficients for reasons of numerical stability.
How accurate is
and its derivatives, or are there any better options out there?