# Solve equation with variable in the fraction of a logarithm

I really had a hard morning thinking about how to solve an equation for a variable while the variable we want to solve for is in the fraction of a natural algorithm.

I have this particular equation: $$v = u \cdot \ln\left( \frac{1}{1-\frac{x \cdot g \cdot t}{u}} \right) - g \cdot t$$ I'd like to solve this equation for $t$, is there any way I can do so?

WolframAlpha doesn't seem to like $\ln()$ with a fraction in it.

solve v=u*ln(1/(1-((xgt)/u))-gt for t


The code I tried.

• I don't think there's a solution, if at all, expressable by elementary functions. – DonAntonio Mar 20 '16 at 12:03
• The equation you gave to WolphramAlpha has 4 left parentheses and only 3 right ones. Also, you should put dots in $xgt$ or else Walpha thinks this $xgt$ is a unique variable. With these corrections, Walpha gives an answer. – Bernard Masse Mar 20 '16 at 12:26
• You forgot the multiplication symbols in the WolframAlpha code. If you include them, it works. – Björn Friedrich Mar 20 '16 at 13:16

$v=u\ln(\frac{1}{1-\frac{xgt}{u}})-gt$

$v=u(\ln(u)-\ln(u-gt))-gt$

$\frac{u\ln(u)-v}{u}=\ln(u-xgt)+\frac{g}{u}t$

$\frac{u\ln(u)-v}{u}=\ln(u(1-\frac{g}{u}xt)+\frac{g}{u}t$

$\frac{u\ln(u)-v}{u}-\ln(u)=\ln(1-\frac{g}{u}xt)+\frac{g}{u}t$

$a=xt\frac{g}{u}$

$\frac{u\ln(u)-v}{u}-\ln(u)=\ln(1-a)+\frac{a}{x}t$

$x(\frac{u\ln(u)-v}{u}-\ln(u))=x\ln(1-a)+a$

$k=x(\frac{u\ln(u)-v}{u}-\ln(u))$

$k=x\ln(1-a)+a$

$e^k=(1-a)^x e^a$

$a=xW(-\frac{(e^{k-1})^{\frac{1}{x}}}{x})+1$

where $W(x)$ is the Lambert W-Function.

Now, merely make the substitution $a=xt\frac{g}{u}$ and solve for $t$. Yes this appears to be messy. By the way, with some effort I doubt we really needed WolframAlpha if we made clever use of the properties of the W-function (you can read all about it on the Wikipedia page.)

EDIT (let's finish what we started):

$xt\frac{g}{u}=xW(-\frac{(e^{k-1})^{\frac{1}{x}}}{x})+1$

$t=\frac{u}{g}W(-\frac{(e^{k-1})^{\frac{1}{x}}}{x})+\frac{u}{gx}$

Oh woe, we are not done yet. Remember?

$k=x(\frac{u\ln(u)-v}{u}-\ln(u))$

So now, it follows that:

$t=\frac{u}{g}W(-\frac{(e^{x(\frac{u\ln(u)-v}{u}-\ln(u))-1})^{\frac{1}{x}}}{x})+\frac{u}{gx}$

One final note: in order to make all of this mathematics valid, you must impose suitable conditions on the variables. A proper mathematical analysis of the problem would note that $\ln(-c)$ is not defined, so we must limit the variables thusly. Furthermore the W-function is multivalued, so we must make further restrictions in that department to ensure that no issues are encountered there.

All things considered, although the last expression is as "correct" as you can get, you need to be careful about the initial assumptions of the variables prior to doing all of this.

EDIT 2 "Cleaning Up" For every great party there's a great mess. Let's clean up the last expression

$t=\frac{u}{g}W(-\frac{(e^{x(\frac{u\ln(u)-v}{u}-\ln(u))-1})^{\frac{1}{x}}}{x})+\frac{u}{gx}$

$t=\frac{u}{g} W(-\frac{1}{x \exp(\frac{v}{u}+\frac{1}{x})})+\frac{u}{gx}$

Where as always $\mathbb \exp(m)=e^m$.

I sincerely hope that helps.