Can I rewrite an exponential with product of powers as product of two terms?

58 Views Asked by At

I have what I thought was a relatively simple problem but cannot quite pinpoint the answer. I want to do a regression of something like $a \times \mathrm{e}^{-b/x}$. However, I can only regress the linear coefficients, i.e., $a$ here, while the functions themselves, like $\mathrm{e}^{-b/x}$, are predetermined by me. Hence, I have to know the functional form. If I give my regression algorithm $\mathrm{e}^{-b/x}$ as the form with the correct $b$, I get the correct results and everything works out. But if I just give a basic $\mathrm{e}^{-1/x}$ and regress, hopefully changing $a$ accordingly, the whole thing fails.

Based on the graphs of the functions, I see the changes happen in the horizontal rather than vertical direction, so the argument of the exponent would change. So I am not very hopeful, but there might be something someone knows, which allows for some simplification or rewriting. In short, I somehow need to rewrite the left-hand side in the form of the right-hand side below (I don't even mind a simple $c(x)$ actually): $$ \mathrm{e}^{-b/x} = c \times \mathrm{e}^{-1/x}, \qquad x> 0 $$

<span class=$\mathrm{e}^{-1/x}$ in blue and $\mathrm{e}^{-3/x}$ in orange, both asymptote to 1 but "scaled" in $x$-direction" />

I want to add I don't want to just identify $a$ and $b$ via regression here directly or I could just take ln of both sides. Let's say it's more like $y=1 + a_1 x + a_2 x^2 + a_3 e^{-a_4/x} + a_5 \sin(x)$ with $\{x,y\}$ data. So there's no easy way to just take $\ln$ of only the exponential term and get the $d$ down into the equation.

1

There are 1 best solutions below

2
On

Unless I completely misunderstand what you are looking for, this might be of use.

Given a data set $\{(x_k,y_k)\}_{k=1}^N$ and a law $y=a\exp(-b/x)$ find the values of constants $a,b$ which give the best fit in the least squares sense.

Take the logarithm of both sides to get $\ln y=\ln a-\frac{b}{x}$. Then substitute $Y=\ln y$ and $A=\ln a$ to get $$ Y=A-\frac{b}{x} $$

Define $S=\sum (Y-Y_k)^2=\sum(A-\frac{b}{x_k}-Y_k)^2$.

Next, try to find optimal values of $A,b$ by setting the first partials of $S$ with respect to $A$ and $b$ equal to $0$.

\begin{eqnarray} \frac{\partial S}{\partial A}&=&2\left(AN-b\sum\frac{1}{x_k}-\sum Y_k\right)=0\\ A&=&\frac{1}{N}\left(b\sum\frac{1}{x_k}+\sum Y_k\right)\tag{1} \end{eqnarray}

\begin{eqnarray} \frac{\partial S}{\partial b}&=&2\sum\left(A-\frac{b}{x_k}-Y_k\right)\left(\frac{-1}{x_k}\right)=0\\ b&=&\frac{A\sum\left(\frac{1}{x_k}\right)-\sum\frac{Y_k}{x_k}}{\sum\left(\frac{1}{x_k^2}\right)}\tag{2} \end{eqnarray}

Next we make an initial guess for a possible value of $A$ and compute the corresponding value of $b$ using equation (2).

Substitute that value of $b$ into equation (1) to get an iteration of the value of $A$.

Continue this iteration of $A$ and $b$ and pray for convergence.