5

If $a=b^x$, then $x$ could be written in terms of $a$ and $b$; $x=\dfrac{\log(a)}{\log(b)}$.

What about $a=b^x+c^x$?

Could $x$ be written in terms of $a, b$ and $c$? $x={}$?

japseow
  • 311
  • Have you tried taking the log of both sides? Both $b$ and $c$ are raised to the power $x$ – meiji163 Jun 18 '15 at 15:44
  • I have done a similar question before, this is what you would need, http://math.stackexchange.com/questions/1328668/how-to-solve-the-following-exponential-equation/1328773#1328773 – Someone Jun 18 '15 at 15:46
  • Yup, I can't find any useful properties of log(b^x + c^x) to isolate x though. – japseow Jun 18 '15 at 15:48
  • 1
    I think if possible, Fermat's last theorem would have proved before Wiles. – Piquito Jun 18 '15 at 16:37

3 Answers3

3

The best we can do (in terms of algebraic solutions) is as follows: rewrite the equation as $$ a = \left(e^x\right)^{\ln(b)} + \left(e^x\right)^{\ln(c)} $$ setting $y = e^x$, this becomes an equation on $y$: $$ a = y^{\ln(b)} + y^{\ln(c)} $$ Or, rearranging, $$ y^{\ln(b)} + y^{\ln(c)} - a = 0 $$ In other words, we're looking for $x > 0$ that satisfy $$ x^\beta + x^\gamma - a = 0 $$ There is no general way to solve for $x$ if $\beta,\gamma$ are integers, let alone if $\beta$ and $\gamma$ can be arbitrary real numbers.

Ben Grossmann
  • 225,327
  • What is gained by transforming the equation the way you did? Why not just do numerical (rather than algebraic) work with the equation in its original form? ${}\qquad{}$ – Michael Hardy Jun 18 '15 at 15:48
  • @MichaelHardy my thought was that it's easier to see why the new equation is difficult to solve, and that the two equations are equivalent in some sense. – Ben Grossmann Jun 18 '15 at 15:50
  • @MichaelHardy and since OP asked for $x$ "in terms of $a,b,$ and $c$", I presume he's looking for some form of algebraic expression for $x$. – Ben Grossmann Jun 18 '15 at 15:51
  • I would just represent it as some , $$x=\ln (+\Re\text{root}(y^{\ln(b)}+y^{\ln(c)}-a))$$

    The way i would think of to represent $x$, in some algebraic way.

    – Someone Jun 18 '15 at 15:57
  • @Mann that doesn't feel to me like a real solution. – Ben Grossmann Jun 18 '15 at 16:02
  • Indeed , me too. :/ I wouldn't lie. @Omnomnomnom – Someone Jun 18 '15 at 16:06
  • this is a great way to transform the problem into something more familiar which we have a better intuitive understanding of why there's no general solution – MichaelChirico Jun 18 '15 at 16:56
3

As Omnomnomnom answered, in general, there will not be explicit solutions and numerical methods, such as Newton, would be used.

Considering $$f(x)=b^x+c^x-a$$ we know that the function is such bracketted by $2 b^x-a$ and $2c^x-a$ which allows to define an approximate range for the solution.

But the function $f(x)$ can be very stiff and so the convergence could be rather slow. If instead we consider $$g(x)=\log(b^x+c^x)-\log(a)$$ the function would probably look like a straight line and convergence could be very fast.

Just in case you need it, starting with a "reasonable" guess of the solution $x_0$, Newton method will update it according to $$x_{n+1}=x_n-\frac{F(x_n)}{F'(x_n)}$$

For illustration purposes, let us choose $b=2$, $c=3$, $a=10^6$. Using the bounding functions, we know that the solution $x$ will be more or less between $12$ and $19$. So, let us start with $x_0=15$.

With $f(x)$, the successive iterates will then be $14.1523$, $13.4017$, $12.8562$, $12.6105$, $12.5708$, $12.5699$ which is the solution for six significant figures.

Doing the same with $g(x)$ and the same starting point, the successive iterates will then be $12.5713$, $12.5699$. Quite faster, isn't it ?

Edit

For the initial guess of the solution, we can do much better :

  • use the bounding functions to get the upper and lower bounds of the solution
  • compute the value of function $g(x)$ at these two points
  • assume that these two points are along a straight line ($g(x)\approx A x+B$ in the interval)
  • compute parameters $A$ and $B$ and $x=-\frac BA$. This gives as an estimate $x_0$ of the solution.

The two points having coordinates $$x_b=\frac{\log \left(\frac{a}{2}\right)}{\log (b)}~~~~\,~~~~ y_b=\log(b^{x_b}+c^{x_b})-\log(a) $$ $$x_c=\frac{\log \left(\frac{a}{2}\right)}{\log (c)}~~~~\,~~~~ y_c=\log(b^{x_c}+c^{x_c})-\log(a)$$ $$A=\frac{{x_c} {y_b}-{x_b} {y_c}}{{x_c}-{x_b}}~~~~\,~~~~ B= \frac{{y_c}-{y_b}}{{x_c}-{x_b}}$$ $$x_0=\frac {x_c y_b-x_b y_c}{y_b-y_c}$$ For the worked example, this gives $x_0\approx 12.5689$ and one single Newton iteration should suffice.

Edit

By the way, you could use the same procedure for finding the root of $$f(x)=\sum_{i=1}^n a_i^x-b=0$$ rewriting it as $$g(x)=\log\Big(\sum_{i=1}^n a_i^x\Big)-\log(b)=0$$ Admitting $a_1>a_2>a_3>\cdots>a_n>1$, the solution will be such that $$\frac{\log \left(\frac{b}{n}\right)}{\log (a_1)}<x<\frac{\log \left(\frac{b}{n}\right)}{\log (a_n)}$$

If you are lazy and do not want to perform these preliminary calculations, develop $g(x)$ as a Taylor series at $x=0$ and use as estimate $$x_0=\frac{n \log \left(\frac{b}{n}\right)}{\log \left(\prod _{i=1}^n a_i\right)}$$

1

If $b>1$ then $b^x\to\infty$ as $x\to\infty$ and $b\to 0$ as $x\to-\infty$.

If $b>1$ then $b^x\to\infty$ as $x\to-\infty$ and $b\to\infty$ as $x\to-\infty$.

Either way, $b^x$ runs through all of the interval $(0,\infty)$.

Similarly for $c^x$.

If $b>1$ and $c>1$ then $b^x+c^x\to\infty$ as $x\to\infty$ and $b^x+c^x\to0$ as $x\to-\infty$.

If $b<1$ and $c<1$ then $b^x+c^x\to\infty$ as $x\to-\infty$ and $b^x+c^x\to0$ as $x\to\infty$.

Either way $b^x+c^x$ runs through the whole of $(0,\infty)$, and by the intermediate value theorem, a solution exists if $a>0$.

In those cases, you can tell whether $x$ is too big or too small, and after narrowing it down a bit, use Newton's method.

If $b>0$ and $c<0$ or vice-versa, then it's more complicated: there is a positive number that is an absolute minimum and a solution exists if, but only if, $a\ge\text{the minumum}$.

The minimum occurs at a value of $x$ for which $\dfrac d{dx}(b^x+c^x)=0$, so $$ b^x\log_e b + c^x \log_e c =0. $$ $$ \left( \frac b c \right)^x = \frac{-\log_e c}{\log_e b} = -\log_b c. $$ $$ x = \log_{b/c} (-\log_b c) = \log_{c/b}(-\log_c b). \tag 1 $$ (Notice that if either $b<1<c$ or $c<1<b$ then $\log_b c<0$ so $-\log_b c>0$ and we can take its logarithm.) The phrase "$x=$" in $(1)$ does not mean that that is a solution. Rather it mean if you plug that value of $x$ into $b^x+c^x$ you get the smallest value of $a$ for which a solution exists.