# Solving equations with log

Is there any easy way (no numerical methods, just a straightforward way to do it by hand) to solve an equation like:

$$\begin{equation}\frac{-34450}{x} - 2.01\ln(x) + 33.74 = 0\end{equation}$$

It is a step in a bigger problem that I'm trying to solve and the solution that was given to me just says "just solve the equation" as if that step was naturally trivial, but I can't see it.

• I suspect the (not-so-nice) Lambert W will be used. Dec 28, 2022 at 21:01
• Wolfram Alpha does solve it that way at least .. we didn't even learn that Lambert W thing in my studies so it just looks like they used wolfram (or smth similar) themselves to write the solution and didn't care about making sense for us. Dec 28, 2022 at 21:07
• Don't be so dismissive. It is possible that A) you may have copied the initial problem wrong, B) you maybe had a mistake in intermediate calculations, or C) the intent was to use numerical methods. Not all equations can be solved by nice high-school methods. Dec 28, 2022 at 21:08
• I'm pretty sure it's none of that (the given solution leads to that exact equation with no possible tricks, and they give the same answer Wolfram give me to the equation, also numerical methods isn't a thing in that course). Sorry if I sounded rude though. Dec 28, 2022 at 21:14

A completely nice and analytical solution to this equation doesn't exist, the best attempt uses the Lambert W function, which is the inverse of $$xe^x$$ so $$W(xe^x)=x$$ Before applying this we need to move some things around: substitute $$x=e^u$$ and obtain$$-34450e^{-u}-2.01u+33.74=0$$ Let's call the constants a,b,c all positive real values and substituting $$y=c-bu$$ gives $$-ae^{\frac{y-c}{b}}+y=0$$ rearanging gives $$-\frac{a}{b}e^{-\frac{c}{b}}=-\frac{y}{b}e^{-\frac{y}{b}}$$ and after applying Lambert W we get $$y=-bW(-\frac{a}{b}e^{-\frac{c}{b}})$$ and resubstituting $$x=\exp(\frac{c}{b}+W(-\frac{a}{b}e^{-\frac{c}{b}}))$$

Without any special function

Working with whole numbers, you look for the zero of function $$f(x)=-\frac{3445000}{x}-201 \log (x)+3374$$ which,if $$x>1$$, is smaller than $$g(x)=-\frac{3445000}{x}+3374$$ So, we have a lower bound $$x_0=\frac{1722500}{1687}=1021.04\cdots$$ Now, use the tangent at this point (this is Newton method) that is to say, write $$x_{n+1}=x_n-\frac{f(x_n)}{f'(x_n)}$$ to successively obtain $$\left( \begin{array}{cc} n & x_n \\ 0 & 1021.04 \\ 1 & 1469.18 \\ 2 & 1768.40 \\ 3 & 1846.47 \\ 4 & 1850.30 \\ \end{array} \right)$$

• $log(x)$ can be both positive and negative. perhaps you meant $x>1$ Dec 29, 2022 at 8:10
• @whoisit. Thanks for pointing ! Dec 29, 2022 at 8:11

This may not be the answer you are seeking, but if you are seeking an approximate answer, a heuristic approach si the iterative one.

$$-\frac{a}{x} - b \ln(x) + c = 0$$

which can be written as $$x = f(x)$$ where

$$f(x) = \frac{a}{c- b \ln(x)}$$

One begins by setting the logarithm to unity,

$$x_0 = \frac{a}{c - b}$$

and then iterates $$x_{n+1} = f (x_{n})$$ a few times. If the value is converging it approaches the correct one.

Of course this is far from an exact solution but it doesn't need a calculator.