Given:
a = b ln [ max (11, b) ]
If a
is known, how can one compute b
? (Do I need to use an iterative approximation method?)
Given:
a = b ln [ max (11, b) ]
If a
is known, how can one compute b
? (Do I need to use an iterative approximation method?)
Here is a graph of your function, where we have x and y rather than b and a.
Note that there is a "corner" at the point (11, 11 ln(11)). This is because your function can be re-written as:
(I wish I could MathJax here as in some other StackExchange sites!)
Note that the solution to the second version is
b = exp(W(a))
whereW()
is the Lambert W function. Many programming languages have packages that implement the Lambert W function. In Python, for example, the commonscipy
package calls itlambertw()
.So a full solution in Python, after importing the
lambertw
function from the scipy module andexp
andlog
(equivalent to ln) from the math module, isThis is easier than reinventing the wheel. Note that scipy's
lambertw
function uses continued fractions to get an approximate value then uses one or two rounds of the Newton-Raphson method to get a final result. This is faster than using only Newton-Raphson.