5

I've ended up with an equation of the form $a^x / x = b$ and I'm trying to solve for $x$ but I can't isolate it. I always end up with one of the $x$'s as the exponent of $e$ or in a log function.

jtht
  • 217

2 Answers2

4

Unfortunately the equation cannot be solved analytically, as it becomes

$x\log a - \log x = \log b$

You need to use numerical methods.

For example you could try the Newton Raphson method, where the objective is to find roots of the equation $f(x)=0$ by using the following iteration, where $f'(x)$ is the derivative of the function with respect to $x$.

$\large x_n=x_{n-1}-\frac{f(x_{n-1})}{f'(x_{n-1})}$

So you start with an initial estimate $x_0$, to obtain

$\large x_1=x_{0}-\frac{f(x_{0})}{f'(x_{0})}$

and continue for more iterations until your result does not change very much.

If you express your equation as

$f(x)=x\log a - \log x - \log b$

The derivative is given by

$f'(x)= \log a - \frac{1}{x}$

which you can use for implementing the Newton-Raphson method.

Alijah Ahmed
  • 11,609
3

$$a^x=bx\iff1=bxa^{-x}\iff\frac1b=xe^{-x\ln a}\iff-\frac{\ln a}b=(-\ln a)xe^{-x\ln a}\iff$$

$$\iff(-\ln a)x=W\bigg(-\frac{\ln a}b\bigg)\iff x=-\frac{W\bigg(-\dfrac{\ln a}b\bigg)}{\ln a}$$

where W is the Lambert W function.

Lucian
  • 48,334
  • 2
  • 83
  • 154
  • thanks for the help but I think the W function is beyond the scope of tools I'm suppose to use to solve this. – jtht Feb 12 '14 at 21:35