Logarithm problem that I'm stuck on

AI Thread Summary
The logarithm problem ln(x) = 5 - x requires solving for x, which leads to the equation x e^x = e^5. An analytical solution is not possible, necessitating a numerical approach, such as the iterative method x_{n+1} = 5 - ln(x_n), starting with x_0 = 5. The formal solution involves the Lambert W function, where x can be expressed as x = W(e^5). Iterative methods can converge to the solution within a few steps, demonstrating the utility of numerical techniques in solving transcendental equations. The Lambert W function serves as a crucial tool in finding the solution to this logarithmic equation.
Rectifier
Gold Member
Messages
313
Reaction score
4
The problem statement
ln(x) = 5 -x
Solve for x.

The attempt at a solution
ln x = 5 - x \\ e^{ln x} = e^{5 - x} \\ e^{ln x} = \frac{e^5}{e^x} \\ x e^x = e^5
Here is the place where I get stuck.
 
Physics news on Phys.org
There is no analytical solution. You have to solve it numerically, e.g. ##x_{n+1}=5-\ln(x_n)## starting with ##x_0=5##.
 
In addition to what DrDu said already, the formal solution to the problem is given in terms of the Lambert W function. As indicated in the previous post, you will have to find the solutions to this numerically.
 
##5 = x + ln(x)##

Consider:
##y = 5##
and
##y = x + ln(x)##

Take an educated guess at a solution.

##y_n = x_n + ln(x_n)##
_
Consider the slope of the tangent line to this function at ##x_n##.

The slope of the tangent line of this function at ##x_n## is approximately equal to the slope of the secant line of this function between ##x_n## and ##x_{n+1}##.

Let ##y_{n+1} = 5##.

Find your new ## x_{n+1}##.

Repeat iteratively.

Within 3 iterations (by hand), I converged on the solution.
 
The "Lambert W function" that Orodruin referred to is defined as the inverse function to f(x)= xe^x. So, immediately, x= W(e^5).
 
I tried to combine those 2 formulas but it didn't work. I tried using another case where there are 2 red balls and 2 blue balls only so when combining the formula I got ##\frac{(4-1)!}{2!2!}=\frac{3}{2}## which does not make sense. Is there any formula to calculate cyclic permutation of identical objects or I have to do it by listing all the possibilities? Thanks
Since ##px^9+q## is the factor, then ##x^9=\frac{-q}{p}## will be one of the roots. Let ##f(x)=27x^{18}+bx^9+70##, then: $$27\left(\frac{-q}{p}\right)^2+b\left(\frac{-q}{p}\right)+70=0$$ $$b=27 \frac{q}{p}+70 \frac{p}{q}$$ $$b=\frac{27q^2+70p^2}{pq}$$ From this expression, it looks like there is no greatest value of ##b## because increasing the value of ##p## and ##q## will also increase the value of ##b##. How to find the greatest value of ##b##? Thanks

Similar threads

Back
Top