In the previous constructions, we dealt with functions that depended linearly upon the parameters to be fitted. We found them by solving a linear system of equations, a relatively easy task.

However, as explained at the beginning
of this chapter, the same scheme works equally well for any function. In the
general case, though, the resulting system that we must solve to find the
best fit could depend non-linearly on the parameters, and the mere existence
of solutions to such systems is not a trivial problem to settle. Take for
instance, a function such as
*y* = sin(*m*_{i}*x*). Assuming measurements
(*x*_{1}, *y*_{1}),...,(*x*_{k}, *y*_{k}), we may take as our error the function

Sometimes, even if the function does not depend linearly on the coefficients,
it can transformed to one which does. For example, if our
data points
{(*x*_{i}, *y*_{i})} were believed to approximate an
exponential function of the form
*y* = *ae*^{kx}, then setting

(*y*_{i} - *ae*^{kxi})*e*^{kxi} = 0 (*y*_{i} - *ae*^{kxi})*ax*_{i}*e*^{kxi} = 0 .

While this isn't impossible, it is much more straightforward to make a
change of variables.
Assuming the *y*_{i} are all positive (which is reasonable since we
believe the data is exponential), we can let
*z*_{i} = ln *y*_{i}. Then we
are trying to fit a function
*z* = ln*ae*^{kx}, which
reduces to the line
*z* = ln *a* + *kx*. This is familiar territory, and we
can just proceed as before.

2002-08-29