Linearization of $axe^{-bx}$

4.4k Views Asked by At

I need to perform linearization of the function $axe^{-bx}$ in order to perform least squares fitting algorithm. The closest to linear I got is this: $\ln{y}-\ln{x}=\ln{a}+\beta x$ .

I tried to google it and found this old post. It is written here that $\ln{y}-\ln{x}=\ln{a}+\beta x$ is linear, and if we want it to fit into the form of $y'=mx'+b$ , we can just take: $y'=\ln{y}-\ln{x} , b=\ln{a} , x'=x , m=\beta $.
But as far as I know, $y'$ needs to be a function of $y$, without any more variables. So how could this be possible to take $y'=\ln{y}-\ln{x}$ here?
And if this indeed incorrect as I think, is there a way for linearize this function?

3

There are 3 best solutions below

1
On

By "linearization" I would assume they mean at a point, say, $(c,ace^{-bc})$. Then the linearization could be taken to be $y= (a-abc)e^{-bc}(x-c)+ace^{-bc}$. This comes from $y= f'(x_1)(x-x_1)+f(x_1)$.

0
On

The suggestion you're following goes like this: given your data points $(x_k,y_k)$, consider the data set $(x_k,\ln(y_k)-\ln(x_k))$. Fit this data set to a linear function $L$. Then consider your fit to the original data to be $y=e^{\ln(x)+L(x)}=xe^{L(x)}$. This works because if $y=axe^{-bx}$ then $\ln(y)-\ln(x)=\ln(a)-bx$, and the right side is a linear function of $x$.

The problem I have with this formulation is that its error metric is not based only on "vertical" residuals, like in the ordinary linear case or in the most familiar exponential fitting case. The residuals will involve $x,y$ together. This may not be appropriate in your application, for example if the $x$ data is known to be exact and the $y$ data is not.

In this situation I'd be inclined to just use nonlinear least squares. This is necessarily an iterative technique, but that's fine, it should converge easily unless your data set very poorly matches the fit or is very large.

9
On

You have $n$ data points $(x_i,y_i)$ (for $i=1,2,\cdots,n$) and you wanr to fit the model $$y=a\,x\,e^{-bx}$$ which is nonlinear with respect to parameters; so nonlinear regression will be required. But using nonlinear regression implies that you need (in most cases) to provide "reasonable" estimates of the searched parameters. This is why, when possible, we try to linearize the model.

In the given case, let us define $z_i=\frac {y_i}{x_i}$. Then, the model becomes $$z=a \,e^{-bx}\implies \log(z)=\log(a)-bx=c + dx$$ Define $t_i=\log(z_i)$ and the model becomes $$t=c+dx$$ which is simple and a trivial linear regression will provide $c$ and $d$.

From here, we the have $a=e^c$ and $b=-d$. These are only estimates. From here, you now need nonlinear regression because what is measured is $y_i$ and nothing else (neither $z_i$ nor $t_i$).

For illustration purposes, let us consider the following data points $$\left( \begin{array}{cc} x_i & y_i \\ 2 & 150 \\ 3 & 180 \\ 4 & 190 \\ 5 & 190 \\ 6 & 180 \\ 7 & 160 \\ 8 & 150 \\ 9 & 130 \\ 10 & 110 \\ 11 & 100 \\ 12 & 80 \end{array} \right)$$

This will generate the following values $$\left( \begin{array}{cccc} x_i & y_i & z_i & t_i\\ 2 & 150 & 75. & 4.31749 \\ 3 & 180 & 60. & 4.09434 \\ 4 & 190 & 47.5 & 3.86073 \\ 5 & 190 & 38. & 3.63759 \\ 6 & 180 & 30. & 3.40120 \\ 7 & 160 & 22.8571 & 3.12926 \\ 8 & 150 & 18.75 & 2.93119 \\ 9 & 130 & 14.4444 & 2.67031 \\ 10 & 110 & 11. & 2.39790 \\ 11 & 100 & 9.09091 & 2.20727 \\ 12 & 80 & 6.66667 & 1.89712 \end{array} \right)$$

The linear regression leads to $$t=4.82315 -0.240393 x \implies a=124.356 \qquad b=0.240$$ Starting with these estimates, the nonlinear regression will give $$y=123.537\,x\, e^{-0.238825 x}$$