$$e^{a+bx}+e^{c+dx}=1$$ The problem comes from formula (14) in this paper, which says the solution is found numerically. My questions are:
- Does there exist an analytical solution?
- How to derive the numerical solution?
PS. My post tags might be inaccurate and false, but I am sorry that I cannot figure out proper tags, someone may fix it.
EDIT I found C++ program(line 1002, function computeExpSPRT) solving the equation in paper, now rewrite the equation as $$ \exp(\log \epsilon+h\log \frac{\delta_i}{\epsilon_i})+\exp(\log (1-\epsilon)+h\log \frac{1-\delta_i}{1-\epsilon_i})=1$$ $\epsilon,\delta_i,\epsilon_i$ are known and lie in $(0,1)$ and $\epsilon \ge \epsilon_i$, now the target is to search a $h$ satisfying above equation with $h>1$. According to the program, $h$ can be numerically found as follows: $$al=\log(\frac{\delta_i}{\epsilon_i}),be=\log \frac{1-\delta_i}{1-\epsilon_i}$$ $$x_0=-\frac{1}{be}\log(1-\epsilon),v_0=\epsilon\exp (al\cdot x_0)$$ $$x_1=\frac{1}{be}\log{\frac{1-2v_0}{1-\epsilon}},v_1=\epsilon \exp(al \cdot x_1)+(1-\epsilon)\exp(be \cdot x_1)$$ $$h=\frac{1-v_1}{1+v_0-v_1}x_0+\frac{v_0}{1+v_0-v_1}x_1$$ Can anyone help me analyzing the thread?
Considering the more specific case of $$f(x)=a\,e^{bx}+(1-a)\,e^{cx}-1$$ where $0<a<1$, we have $$f'(x)=a b\, e^{b x}+(1-a) c\, e^{c x}$$ $$f''(x)=a b^2 \,e^{b x}+(1-a) c^2\, e^{c x}\, >0 \qquad \forall x$$ The first derivative cancels at $$x_{min}=\frac{\log \left(\frac{-(1-a) c}{a b}\right)}{b-c}$$ which, in the real domain exists if $bc<0$ and this is a minimum and, since $f(0)=0$, the solution of $f(x)=0$ is away from $x_{min}$.
Since $f(x_{min}) <0$, we need to find a value $x_*$ such that $f(x_*)>0$ in order to start Newton iterations and this would be safe (no overshoot of the solution since at this point $f(x_*)\,f''(x_*)>0$ - by Draboux theorem).
To find this point, we could use a golden search that is to say define a sequence $$x_k=\phi^k \,x_{min}$$ (where $\phi$ is the golden ratio) and run it until $f(x_k)>0$. If you prefer, replace $\phi$ by any number $>1$.
For example, using $a=0.123$, $b=0.234$, $c=-0.345$, we get $x_{min}=4.06312$. So $$x_1=6.57426\implies f(x_1)=-0.336410$$ $$x_2=10.6374\implies f(x_2)=+0.504618$$ Now, Newton iterates $$\left( \begin{array}{cc} n & x_{(n)} \\ 0 & 10.63738381 \\ 1 & 9.149460984 \\ 2 & 8.788301285 \\ 3 & 8.769596643 \\ 4 & 8.769548495 \end{array} \right)$$ which is the solution for ten significant figures.