solving exponential equation $e^{x/n}=x$

110 Views Asked by At

How can I solve this equation $e^{x/n}=x$ for $x$? I have no idea how to solve it.

I really appreciate any help!

2

There are 2 best solutions below

2
On BEST ANSWER

You need to use the Lambert W Function. Read this Wikipedia article, then read my solution: $$e^{x/n}=x$$ $$1=xe^{-x/n}$$ $$-\frac{1}{n}=-\frac{xe^{-x/n}}{n}$$ $$W\bigg(-\frac{1}{n}\bigg)=-\frac{x}{n}$$ $$x=-nW\bigg(-\frac{1}{n}\bigg)$$

0
On

Are you willing to settle for approximations? If so, then we could implement simple fixed-point iteration methods.


$$x_{k+1}=\exp(x_k/n)$$

where $x_0=1$. This will converge to the smallest solution to your equation as $k\to\infty$.


$$x_{k+1}=n\ln(x_k)$$

where $x_0=1$. This will converge to the largest solution to your equation as $k\to\infty$.


A fairly simple brute force approach, though the convergence is fairly slow. Faster approximations may be made using approaches found in the Wikipedia linked by Nilknarf's answer.