I'm getting a lot of these type of questions, and it's getting increasingly frustrating to solve them by trial and error. I've tried logarithms and derivatives, and they either aren't working or I'm applying them wrong.


The only ways I can solve are either graphing or trial and error, none of which are good options.

Is there a general method to solve such questions? Or a method for just this one in particular?

  • $\begingroup$ I dont think you can find algebriac methods to solve this,numerical options may be your best bet. $\endgroup$ – The Integrator May 21 '18 at 19:21

In some cases you can use the Lambert W function, e.g. for equations $$ p^x = a x + b $$ see here.

But this is a non-elementary function as well, which you might have not available.

So you end up with trial and error, graphing (gave me $x \in \{0, 1, 2 \}$) or some numerical method like fixed point iteration, Newton iteration, bisection etc.


From a formal point of view, the solution is given in terms of the generalized Lambert function. You could be interested by this paper which starts with the problem of $$e^{-c x}=a_0\frac{x-t}{x-s}$$ For your case, it would be $c=-\log(2)$, $a_0=-2$, $t=2$, $s=-4$.

You also could be interested by this very recent paper about Taylor series for the generalized Lambert functions.

However, from a practical point of view (except in special case where the solutions are "obvious" using graphics), consider numerical methods.

For the fun of it, let us change the problem to $$2^x(5-x)=2x+3$$ and consider that you look for the zero of $$f(x)=2^x(5-x)-2x-3$$ with derivatives $$f'(x)=2^x (5\log (2)-x \log (2)-1)-2$$ $$f''(x)=-2^x \log (2) ((x-5) \log (2)+2)$$

Using Lambert function, the first derivative cancels at two points $$x_1=\frac{W_{-1}\left(-\frac{e}{16}\right)+5 \log (2)-1}{\log (2)}\approx -0.487$$ $$x_2=\frac{W\left(-\frac{e}{16}\right)+5 \log (2)-1}{\log (2)}\approx 3.255$$

The second derivative test shows that $x_1$ corresponds to a minimum $(f''(x_1)\approx 0.892)$ and $f(x_1)\approx 1.889$. Similarly, $x_2$ corresponds to a maximum $(f''(x_2)\approx -5.231)$ and $f(x_2)\approx 7.149$. So, there is only one root $x > x_2$.

By inspection, $f(4)=5$ and $f(5)=-13$. Let us start Newton method using, as an initial guess, $x_0=4.5$. This would generate the following iterates $$\left( \begin{array}{cc} n & x_n \\ 0 & 4.500000000 \\ 1 & 4.459113666 \\ 2 & 4.457758000 \\ 3 & 4.457756552 \end{array} \right)$$ which is the solution for ten significant figures.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.