TITLE: How do I solve an exponential equation like $2^x-3^x+4=0$?
QUESTION [9 upvotes]: I was wondering if there was a general way to solve an equation like this: $$2^x-3^x+4=0.$$ Can this be done using logarithms? If not, then is there a way to solve it that doesn't involve "guessing" and approximations? The Desmos graphing calculator gives me an answer that is about $1.8453$, but I'm sure the calculator is using Newton's method or something similar to find the zero. I would like to know if logs can be used here.

REPLY [7 votes]: Only numerical method will do the job.
The simplest way would be to write $$f(x)=\log(3^x)-\log(4+2^x)=0$$ that is to say $$f(x)=x\log(3)-\log(4+2^x)=0$$ for which Newton method would converge very fast even (being lazy) starting using $x_0=0$)
$$\left(
\begin{array}{cc}
n & x_n \\
 0 & 0 \\
 1 & 1.6765277714583058979 \\
 2 & 1.8431477981442746026 \\
 3 & 1.8452917833976451640 \\
 4 & 1.8452921405902699713 \\
 5 & 1.8452921405902798862 
 \end{array}
\right)$$
Edit
Just for the fun of it, let us consider the case of $$a^x-(a+1)^x+(a+2)=0$$ what, as before, we can write as $$f(x)=x \log(a+1)-\log(a+2+a^x)=0$$ 
From a numerical point of view, it is amazing to notice that, for all $a \geq 2$, the solution is $1.797 \leq x \leq 2.000$. So, let us use, for any $a$, $x_0=\frac 95$. This gives as first iterate of Newton method $$x_1=\frac{9}{5}-\frac{\frac{9}{5} \log (a+1)-\log \left(a^{9/5}+a+2\right)}{\log
   (a+1)-\frac{a^{9/5} \log (a)}{a^{9/5}+a+2}} $$
The following table gives, for a few values of $a$, the first iterate of Newton method as well as the exact solution (which is reached using a couple of Newton iterations).
$$\left(
\begin{array}{ccc}
a & x_1 & \text{solution} \\
 2 & 1.84513 & 1.84529 \\
 3 & 1.81103 & 1.81105 \\
 4 & 1.80050 & 1.80050 \\
 5 & 1.79759 & 1.79759 \\
 6 & 1.79768 & 1.79768 \\
 7 & 1.79908 & 1.79908 \\
 8 & 1.80105 & 1.80105 \\
 9 & 1.80325 & 1.80326 \\
 10 & 1.80551 & 1.80553
\end{array}
\right)$$ which does not seem to be too bad !

REPLY [6 votes]: We can rewrite our equation in the following form.
$$\left(\frac{2}{3}\right)^x+\frac{4}{3^x}=1$$ and since $f(x)=\left(\frac{2}{3}\right)^x+\frac{4}{3^x}$ decreases, we see that our equation has maximum one root.
But $f(0)>1$, $f(2)<1$ and $f$ is a continuous function, 
which says that our equation has an unique root on $(0,2)$.