There is an infinite number of functions that would fit the brief. Perhaps you're looking for a polynomial fit, a spline fit, or something else. It's hard to know with so little information.
would be a function that fits the brief (and errors for any input that is not in a). I doubt it is what you want.