-1
$\begingroup$

There is common way in which one can approximate $f(x) = a\cdot e^{bx}$ . Just use $ln$ for both formula's sides and make it linear. What about $f(x) = a\cdot e^{bx}+c$ ? How to determine $a$, $b$ and $c$ having set of $(x,y)$ pairs?

$\endgroup$
  • 1
    $\begingroup$ \cdot for multiply $\endgroup$ – user645636 Dec 31 '19 at 4:21
  • 1
    $\begingroup$ And \exp for the exponential function $\endgroup$ – Ross Millikan Dec 31 '19 at 4:29
  • $\begingroup$ The $c$ does not "matter" for large values of $x$. The line $\ln(a)+bx$ quickly approaches $\ln(a\cdot\exp(bx)+c)$ for any value of $c$. And by quickly, I mean: desmos.com/calculator/xiw3rmm21k $\endgroup$ – David Peterson Dec 31 '19 at 4:39
2
$\begingroup$

Adding in the parameter $c$ means you cannot use linear least squares any more because the function cannot be linearized. You need a multidimensional minimizer. They are discussed in any numerical analysis text. If your data go out far enough the exponential will become close to $0$ and you can just take $c$ to be the average of the last few data points, then use the linearized form on $f(x)-c$

$\endgroup$
0
$\begingroup$

The model $$y=a e^{bx}+c$$ is nonlinear because of $b$. Now, suppose you fix $b$ at a given arbitrary value and definine $t_i=e^{b x_i}$ you face the linear model $y=at+c$ which is easy to solve.

When done, compute the sum of squares of residuals $SSQ(b)$ and repeat the process for a few values of $b$ until you see more or less a minimum. At this point, you know the corresponding values of $a$ and $c$ and you can start the nonlinear regression. If you do not have such a tool, continue with the plot zooming more end more around the minimum.

Another solution for obtaining "reasonable" guesses (assuming not too much moise in the data) is to pick (even "by eye" from a scatter plot) three data points $(x_1,y_1)$, $(x_2,y_2)$, $(x_3,y_3)$. So, you have $$y_1=a e^{bx_1}+c \tag 1$$ $$y_2=a e^{bx_2}+c \tag 2$$ $$y_3=a e^{bx_3}+c \tag 3$$ from which $$y_2-y_1=a(e^{bx_2}-e^{bx_1})\tag 4$$ $$y_3-y_2=a(e^{bx_3}-e^{bx_2})\tag 5$$ $$\frac{y_3-y_2 } {y_2-y_1 }=\frac{e^{bx_3}-e^{bx_2}}{e^{bx_2}-e^{bx_1}}\tag 6$$

But, you selected the points such that $x_2=x_1+d$ and $x_3=x_1+2d$. This makes $$\frac{y_3-y_2 } {y_2-y_1 }=e^{bd} \implies b=\frac 1 d \log\left(\frac{y_3-y_2 } {y_2-y_1 } \right)\tag 7$$ Go back to $(4)$ or $(5)$ to get $a$ and then to $(1)$, $(2)$ or $(3)$ to get $c$.

Now you can start the nonlinear regression using all the data points.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.