## Least Squares Fitting on an Integral Equation

##### Abstract

The object was to develop an algorithm for calculating the optimal parameter values (A,B,fD) of an equation Y=AX(fn)+B, such that the change in the error was less than a predetermined amount. Different methods of fitting were investigated and the method of least squares was found to be the best method for this particular problem.
The X(fD) in the equation is an integral equation dependent on the parameter fD. Methods of numerically evaluating this integral had to be looked into in order to find one that would give a fairly accurate estimate of the value of the integral while not requiring an excessive amount of time to perform the evaluation.
A search for the minimum error was done in two parts. The first was a "blind" step search, in which the parameter fD was changed. by a factor of 10, until the error began to rise. The second part was a parabolic extrapolation using the last three error values in calculating the new fD value. When the search was done the optimal parameter values, along with their uncertainties, were printed out.