Analytical solution to $a^x+b^x=x$

332 Views Asked by At

Maybe stupid question, but I am wondering. Is there an analytical solution to equation $$a^x+b^x=x$$ for general $a$, $b$. How should I tackle this problem, if I want to find at least one $x$. Thanks.

5

There are 5 best solutions below

0
On

There is no closed-form solution in terms of standard functions, except in special cases. If $a$ and $b$ are given, you might try numerical methods, such as Newton's.

13
On

Notice if $a=b=1$, then you get trivial solution $x = 2$. I claim that if $a,b$ are both $\geq2$, then there is NO solution!. To see this, Suppose there is a solution $x$ such that

$$ a^x + b^x = x $$.

Notice since $a$ and $b$ are greater than $2$, then the following is trivially true

$a^x > x $ and $b^x > x $. This implies that $a^x + b^x > 2x $

$$ x = a^x + b^x > 2x \implies x < 0 $$.

However, $a^x, b^x$ are always positive for every $x$, hence $a^x + b^x$ must be positive. Contradiction.

4
On

For $a \ge e^{1/e} = 1.444667861\ldots$, we have $a^x \ge x$ for all $x$. So we require at least $a < e^{1/e}$ and $b < e^{1/e}$.

And for $a > e^{1/2e} = 1.201943368\ldots$, we have $a^x > x/2$ for all $x$. So we require at least $a \le e^{1/2e}$ or $b \le e^{1/2e}$.

You can check these figures by differentiating $f(x) = a^x - x$ (resp. $f(x) = a^x - x/2$) with respect to $x$, setting this derivative to zero to find the value of $x$ that minimises $f(x)$, and choosing $a$ so that this minimum value is zero.

5
On

As an illustration example of this problem, I propose here the basis of a possible algorithm; this will use a second order Newton iteration method and, as usual, the key point will be to find a reasonable starting point.

Assuming that Lambert function is available, let me consider two functions $$f(x) =a^x+b^x-x$$ and $$g(x)=2c^x-x$$ Expanding both functions as Taylor series built at x = 0, parameter "c" is Sqrt[a b] and the solution of g(x)=0 is given by -W(-2z)/z where z=Log(c). From here Newton iterations can start.

Suppose a=0.75 and b=1.25; this leads to c=0.968246 and an estimate equal to 1.88214 for g(x)=0. The successive iterates are 2.14996, 2.15557, 2.15558, 2.15558.

If Lambert function is not available, the first order Taylor expansion of f(x) gives an estimate equal to 2 / (1 - Log(a b)) which, for the selected case, is 1.87875 and the solution path will be identical to the previous one.

The last method clearly shows that there would be a problem if a b = e as already underlined in the comments and answers to the post.

If fact, except if a plot of the function is done, we do not know if solutions exist. So, in the case of any doubt, my suggestion would be to minimize f(x)^2 with respect to x

1
On

Another interesting special case is if $b=\frac{1}{a}\ne 1$, i.e., equation changes to $a^x+a^{-x}=x$.

We can then find that if $a=a^\star=e^{\frac{1}{2\sinh q}}=1.392877\dots$, or $a=a^{\star\star}=e^{-\frac{1}{2\sinh q}}=0.7179\dots$ where $q$ is solution to $\coth q = q$ (this can be found in literature to be $q=1.19967874\dots$) then there is exactly one solution ($x=2\cosh q\approx3.6203\dots$).

If $a>a^\star$ or $a<a^{\star\star}$ then there is no solution, and if $a\in(a^{\star\star},a^\star)=(0.7179,1.392877)$ there are exactly two solutions (both for $x>0$).