Fitting an exponential curve with squared exponent through three points

calculusgraphing-functionsleast squaresstatistics

I apologize if the format is horrible! I am not sure how to do this.

\begin{center}
I am using least squares regression to fit an exponential to my data. Thus, I need to find a good guess for initial parameters. The model function for this data is
\end{center}

\begin{equation}
y\ =\ ae^{bK^{2}} +c
\end{equation}

\begin{center}

where $\displaystyle K\ =b^{-1} \ \sqrt{2( x+3/2)}$ and $\displaystyle b\ =\ 0.15$
\end{center}
Here is the method that i have done, however it does not result in a very good fit.

\begin{gather*}
y_{1} \ =\ ae^{bK^{2}_{1}} +c\\
y_{2} \ =\ ae^{bK^{2}_{2}} +c\\
y_{3} =ae^{bK^{2}_{3}} +c
\end{gather*}

Thus,
\begin{gather*}
y_{1} '\ =\ 2abK_{1} e^{bK^{2}_{1}}\\
y_{2} '\ =\ 2abK_{2} e^{bK^{2}_{2}}
\end{gather*}

\begin{equation*}
\frac{y_{2} '}{y1'} =\frac{K_{2}}{K_{1}} e^{b\left( K^{2}_{2} -K1^{2}\right)}
\end{equation*}

Moreover, note that $\displaystyle y_{2} '\ =\ \frac{dy_{2}}{dK_{2}} =\frac{y_{3} -y_{2}}{K_{3} -K_{2}}$ and similarly, $\displaystyle y_{1} '=\ \frac{y_{2} -y_{1}}{K_{2} -K_{1}}$.

Thus $\displaystyle b$ is equal to

\begin{gather*}
b\ =\ \ln\left(\frac{y_{2} 'K_{1}}{y_{1} 'K_{2}}\right) /\left( K^{2}_{2} -K^{2}_{1}\right)\\
\end{gather*}

Now to find $\displaystyle a$, we will eliminate $\displaystyle c$ by

\begin{gather*}
y_{2} -y_{1} \ =\ a\left( e^{bK^{2}_{2}} -e^{bK^{2}_{1}}\right)\\
y_{3} -y_{2} \ =\ a\left( e^{bK^{2}_{3}} -e^{bK^{2}_{2}}\right)
\end{gather*}

so
\begin{gather*}
a_{1} \ =\ \frac{y_{2} -y_{1}}{e^{bK^{2}_{2}} -e^{bK^{2}_{1}}}\\
a_{2} \ =\ \frac{y_{3} -y_{2}}{e^{bK^{2}_{3}} -e^{bK^{2}_{2}}}
\end{gather*}

and we have $\displaystyle a\ =\frac{a_{1} +a_{2}}{2}$.

Now for $\displaystyle c$ we just plug in all the values into each equation and solve for $\displaystyle c$. i.e

\begin{gather*}
c_{1} \ =\ ae^{bK^{2}_{1}} -y_{1}\\
c_{2} \ =\ ae^{bK^{2}_{2}} -y_{2}\\
c_{3} =ae^{bK^{2}_{3}} -y_{3}
\end{gather*}

so $\displaystyle c\ =\ \frac{c_{1} +c_{2} +c_{3}}{3}$ .

When I plot this fit against the data, the curve only really fits through the first three points. I am not sure what is going on or where the problem is.

DATA:
\begin{gather*}
( 2,2.35448742279577\ \ )\\
( 4,-1.368206934161941)\\
( 6,-3.305390118335089)\\
( 8,-4.482711701457797)\\
( 10,-5.266602875206834)\\
( 12,-5.820768423448095)\\
( 14-6.229391391650249)\\
( 16,-6.540202260195814)\\
( 18-6.782285215077716)\\
( 20-6.974372715890539)
\end{gather*}

THE ATTEMPT PLOTTED IS HERE

Best Answer

This question will probably win the contest of the most muddled wording.

The first step is to simplify it. $$y=ae^{bK^2}+c\quad;\quad K=b^{-1}\sqrt{2(x+3/2)}$$ $$y=ae^{(2x+3)/b}+c$$ $$y=ae^{3/b}e^{(2/b)x}+c$$ Let $\quad \beta=a e^{3/b}\quad$ ; $\quad\gamma=\frac{2}{b}\quad $ and $\quad\alpha=c$ .

$$\boxed{y=\alpha +\beta e^{\gamma x}}$$ The question becomes very simple : How to fit this function to the given data. That is all the problem if I well understand the original question.

The answer is : Use any available non-linear regression solftware.

Alternatively we will use another method which doesn't require iterative calculus.

The principle is explained in https://fr.scribd.com/doc/14674814/Regressions-et-equations-integrales . Copy below of the application to the present problem.

enter image description here

enter image description here

The notations $a,b,c$ in the referenced paper are not the same as the notations $a,b,c$ in the question of the OP. This is confusing. In order to clarify the relationships are written below, in coming back to the notations of the OP.

enter image description here

Both equations give the same blue curve on the graph.

Related Question