Solving $a_1 b_1^x + a_2 b_2^x = c$ the sum of exponentials

81 Views Asked by At

Is there an analytical solution for the sum of exponential functions ? $$a_1 b_1^x + a_2 b_2^x = c$$ If not, is there an algorithm to compute an approximate solution ?

I plotted the graph for an example :

https://www.wolframalpha.com/input?i2d=true&i=Solve+Power%5B10%2Cx%5D+%2B+Power%5B5%2Cx%5D+%3D+400

But i could not find the solution on searchonmath.

1

There are 1 best solutions below

4
On

If $a_1=a_2$, the problem would be simple for an approximation. Take logarithms to make the function "almost" linear (plot it) and use Newton method.

For your case with Wolfram Alpha $$f(x)=\log(10^x+5^x)-\log(400) \qquad \implies \qquad f'(x)=\frac{5^x \log (5)+10^x \log (10)}{5^x+10^x}$$ Being lazy $$x_0=0 \qquad \implies \qquad x_1=-\frac{2 (\log (2)-\log (400))}{\log (5)+\log (10)}=2.70874$$ while the solution is $x=2.53284$.

If both $a_1$ and $a_2$ are both positive, use the same approach for approximations.

Without loss of generality, assume $b_1>b_2$ and rewrite $$f(x) =a_1\,b_1^x+a_2\,b_2^x-c$$ as $$g(x)=x \log(b_1)+\log\left(1+\frac {a_2}{a_1}\left(\frac{b_2}{b_1}\right)^x \right)-\log\left(\frac c {a_1}\right)$$

For illustration $$a_1=1 \qquad b_1=10 \qquad a_2=1234 \qquad b_2=5 \qquad c=123456789$$ $$x_0=0 \qquad \implies \qquad x_1=-\frac{1235 (\log (1235)-\log (123456789))}{1234 \log (5)+\log (10)}=7.15067$$ while the solution is $x=7.08866$.

Edit

Being less lazy, build the Taylor expansion of $f(x)$ around $x=0$ to obtain $$x_0=\frac{(a_1+a_2)\log \left(\frac{c}{a_1+a_2}\right)}{a_1 \log (b_1)+a_2 \log (b_2)}$$

Since $$f(0) <0 \quad \quad\text{and} \quad\quad f''(0)=\frac{a_1\,a_2\,\log ^2\left(\frac{b_1}{b_2}\right)}{(a_1+a_2)^2 } >0$$ by Darboux theorem, we know that $x_0$ is an overestimate of the solution (but this will be the only overshoot of the solution).