Is it possible to figure out the coefficients of an exponential equation given a certain number of points?

248 Views Asked by At

For exponential equations in the form of:

$$f(x) = a^x + b^x ,$$

is it possible to solve for a and b if you have a certain number of points?

The answers to the similar question here pertain to equations in the form of $f(x)=ae^{bx}$, and this question pertains to $f(x) = ab^x$, but it's not clear to me whether similar techniques can be used on $f(x) = a^x + b^x$.

4

There are 4 best solutions below

7
On BEST ANSWER

$$f(x) = a^x + b^x $$

You need two equations to solve for both $a$ and $b$.

$$f(x_1)=c=a^{x_1}+b^{x_1}$$

and

$$f(x_2)=d=a^{x_2}+b^{x_2}$$

Of course, there are some obvious restrictions on what points can be used to yield unique solutions.

$$x_1 \not = x_2 \not =0 $$

Of course, in all likelihood, you'll end up having to solve these equations using numerical methods.

3
On

A straightforward method (not iterative, no initial guessed values required) is described with a numerical example in the paper : https://fr.scribd.com/doc/14674814/Regressions-et-equations-integrales , in chapter "Double exponential regression - Double power regression", pages 71-73. The method (addapted to the present case) is shown below with in addition a numerical example.

The form of the equation is slightly different, so a minor change is necessary.

In the case where the coefficients should be $b=c=1$ , the values are found slightly different. In the example below the computed values are : $b_1\simeq 1.06$ and $c_1\simeq 0.98$. This is due to the scatter of the data.

enter image description here

enter image description here

0
On

Assuming that you have $n$ data points $(x_i,y_i)$, the fit of the model $$y=a^x+b^x$$ (which is nonlinear) requires reasonable estimates of parameters $a$ and $b$ to start the nonlinear regression.

Suppose that the data are not in too much error. You can probably find among the data points two of them $(x_1,y_1)$, $(x_2,y_2)$ such that $x_2\approx 2x_1$. So, we can look at two equations $$y_1=a^{x_1}+b^{x_1}$$ $$y_2=a^{x_2}+b^{x_2}\approx a^{2x_1}+b^{2x_1}$$ Defining $A=a^{x_1}$, $B=b^{x_1}$, this give as equations $$y_1=A+B$$ $$y_2=A^2+B^2$$ Elimintaing $A$ for the first equation and replacing in the second equation leads to a quadratic in $B$ $$2 B^2-2 B {y_1}+(y_1^2-y_2)=0 $$ and then the solutions are $$A=\frac{1}{2} \left({y_1}-\sqrt{2 {y_2}-{y_1}^2}\right)$$ $$B=\frac{1}{2} \left({y_1}+\sqrt{2 {y_2}-{y_1}^2}\right)$$ from which $a=A^{1/x_1}$, $b=B^{1/x_1}$.

Let us try with JJacquelin's data points; using the $10^{th}$ and $20^{th}$ data points, we obtain $a=0.122$ and $b=1.488$. Starting the nonlinear regression with these initial values should be reasonable.

Using the whole set of data points, the iterative process converge in a small number of iterations and leads to $$y=0.100644^x+1.50081^x$$ to which corresponds $R^2=0.999828$ which shows an almost perfect fit of the data.

Edit

As marty cohen suggested, if $x_2\approx 3x_1$, doing the same as above, the equation in $B$ remains a quadratic (since the $B^3$ terms has the good idea to disappear) $$3 {y_1}B^2-3 {y_1^2}B+({y_1^3}-{y_2})=0$$ and gives $$B=\frac{ \sqrt{3y_1(4 y_2-y_1^3)}+3 y_1^2}{6 y_1}$$ Using the $5^{th}$ and $15^{th}$ data points, we obtain $a=0.083$ and $b=1.516$

0
On

In special cases, an exact solution is possible.

Suppose the $x$ values are $x$ and $2x$. Then you have $u = a^x + b^x$ and $v = a^{2x}+b^{2x}$.

Squaring, $u^2 = a^{2x}+2a^xb^x+b^{2x} = v+2a^xb^x $, so $a^xb^x =(u^2-v)/2 $.

Since $a^x + b^x =u $, $a^x$ and $b^x$ are the roots of $0 =(z-a^x)(z-b^x) =z^2-z(a^x+b^x)+a^xb^x =z^2-uz+(u^2-v)/2 $.

Setting $d = u^2-2(u^2-v) =2v-u^2 $, the roots are $a^x, b^x =\dfrac{u \pm \sqrt{d}}{2} =\dfrac{u \pm \sqrt{2v-u^2}}{2} $.

Similar calculations can be done if the points are at $x$ and $nx$ for small $n$, such as $3$.