Curve fitting is a special case of a least squares problem
were the parameters are the coefficients of a function f
whose graph y=f(x)
should pass through sample points, and
were the objective function is the squared sum of residuals
f(xi)-yi
for observed points
(xi, yi).