I am trying to approximate a function $f(x)$ (strictly positive x if that helps) based on the following information.
I have estimates (uncertain, their uncertainty quantified) for 435 intervals of x, so for a and b in 1 to 30 I have an estimate of:
$$f(b) - f(a) / (b-a)$$
or a direct estimate of:
$$f(b) - f(a)$$
but never of:
$$f(b)$$
or
$$f(a)$$
separately
how can I estimate a function f(x) that closely satisfies these 435 slopes? I realise there might be many least square like estimators (polynomials, splines etc etc) that could help me. but I am unsure how to specify these seeing as I don't have observations for $x$ and $f(x)$ but rather these slopes.
I am happy for the function to have the correct shape but lack a defined centre or mean (happy to fix it at 0 for example).
Note I am looking for an approximation of a function that closely satisfies the slopes, not the true generating function f(x).
Edit, adding a approach I tried
So I tried the following, given I have 435 distance, i defined the folling equation to be minimized:
$$argmin_c((f(b) - f(a)) - (\sum _{k=0}^{n}c_{k}b^{k} - \sum _{k=0}^{n}c_{k}a^{k})) $$
and I numerically optimize (find parameters for) the vector of coefficients of a 7th degree polynomial (I can obviously evaluate other polynomials balancing between minimising error and overfitting)
My remaining worry, polynomials obviously aren't always great approximations, are there more general alternatives to consider? I cant quite figure out how splines would fit into this solution as the splines are build up out of local polynomials and the information I have ( e.g. f(b) - f(a) ) frequently would cross the "knots", when a and b are far apart, in a spline their value would each be governed by a different local polynomial? would that be an issue?