# Equation rearrangement to solve for varialbe

1. May 24, 2013

### Bgayn

T= ln x/k divided by (x-k)

I need to rearrange this equation to solve for x.

This is not a homework assignment. This equation is for a kinetics study I am conducting.

The equation is given in a publication, however I wish to modify it.

As the variable is in both the numerator and demoninator I am unsure of how to solve this.

any suggestions?

2. May 24, 2013

### HallsofIvy

Staff Emeritus
So you have $T= \frac{ln(x/k)}{x- k}$?

Multiply on both sides by x- k to get $T(x- k)= ln(x/k)$. Then get rid of the logarithm by taking the exponential of both sides: $e^{Tx- Tk}= e^{-Tk}e^{Tx}= x/k$, $ke^{-Tk}= xe^{-Tx}$.
Multiply both side by -T to get $-Tke^{-Tk}= -Txe^{-Tx}$.

That's as far as you can go with standard "algebraic" steps. To solve for x, first let y= -Tx so the equation becomes $ye^y= -Tke^{-Tk}$ and now you can use "Lambert's W function" which is defined as "the inverse function to $f(x)= xe^x$". That is, if $xe^x= a$, then x= W(a).

Applying that to both sides of $ye^y= -Te^{-Tk}$ gives $y= -Tx= W(-Te^{-Tk})$ and so the solution to the original equation is $x= -W(-Te^{-Tk})/T$.

3. Jun 5, 2013

### Bgayn

Hello HallsofIvy, I have been meaning to get back to about your reponse.

Thank you for the explanation.

However I am unfamiliar with the Lambert w function. Can you provide an explanation of (-W) in the solution.

4. Jun 6, 2013

### JJacquelin

Hello Bgayn !

The Lambert W function (Table 4c, page 35, in the paper referenced below) was introduced in order to answer to a difficult question : What is the inverse function of x = W exp(W) ? This is a question similar to “What is the inverses functions of x=sin(w) or x=cos(w), …” ? The difficulty was overcome by the introduction of the functions w=arcsin(x), or w=arccos(x), …
The Lambert W function cannot be expressed with a finite number of elementary fuctions, but with infinite series.
Similary, the sin function cannot be expressed with a finite number of elementary fuctions, but with infinite series, before the function arcsin was defined and became usual.
This seems surprizing to one who is not aware of the use of special functions, especialy as closed forms of infinite series.
From "Safari in the Contry of Special Functions", p.24 and p.35 :
http://www.scribd.com/JJacquelin/documents

5. Jun 6, 2013

### Bgayn

W function question

Thank you for the note. So, in the equation stated is -W a constant that I plug into the equation?
I have values for T and k from our data, however how do I use -W to solve for X?

6. Jun 6, 2013

### JJacquelin

W is not a constant. It is a function namely the Lambert W function.
As any function, you can use this function if you know it and if you have a software in which this function is implemented. Probably, both answer are not. So you can't use this function.
Without it, the only way to solve the equation is to use a numerical method in order to compute the roots
of the equation.