How to obtain the best fit?

88 Views Asked by At

I have a complex function say $f(x,a,b,c)$ where $x$ is variable and $a,b,c$ are the parameters. Parameters $a,b$ are linked as $d = (1/a^2) - (i*pi/b)$. The limits of x is very small say -0.02 to 0.02

f(x,d,c) = (Abs[0.5*Sqrt[Pi/d]*Exp[-(((Pi*x)^2)/d]*(1 - Erf[c*Sqrt[d] + I*Pi*x/Sqrt[d]])])^2

Now when I numerically integrate this function w.r.t $x$ for a particular value of $c$, I get a point and a list of values of $c$ gives me list of points (keeping $a,b$ constant at some value). Joining these points resembles a curve similar to Error function.

Now I have a data set of points and points from $f(x)$, using these two I have to optimize values of $a,b$ to obtain the best fit.

How can I do this? I just know the least squares method of regression and have no knowledge of curve fittings.

Kindly help me out.