# Solution of equations involving logarithm and simple equation

I have two equations as below:

m = c - n
m = log(n) + 1


What approach should I take to solve this.

I am sorry, I forgot to mention the variables here.

'c' is a constant whose value is known. The equation is to be solved for 'm' and 'n'.

P.S. This is not a homework

-
possible duplicate of Inverse of $y=xe^x$. Put $\log n = t$. We get $t + 1 = c - e^t$. Now put $t+1 -c = -x$. We get $-x = e^{-x+c-1}$ i.e $xe^{x} = -e^{c-1}$. – Aryabhata Jun 6 '11 at 22:29
I think this question is different enough from the linked question. I've flagged "exact duplicate" questions incredibly more similar to each other this post and your linked post, that didn't get closed. However, that's not to say that the linked post contains some information to may assist in solving this problem. – amWhy Jun 6 '11 at 22:33
@SidCool: could you edit your question to indicate what it is you are to solve for? n? both n and c? – amWhy Jun 6 '11 at 22:37
– Aryabhata Jun 6 '11 at 22:40

Since $c-n = \log(n)+1$, $c-1 = n+\log(n)$, and in turn $e^{c-1}= n e^n$. Thus $n={\rm W}(e^{c-1})$ where W is Lambert W function.

EDIT: Adding details in response to the OP's request.

Put $x=e^{c-1} (> 0)$. Then, there exists a unique (real) number $n=n(x)$ such that $x=ne^n$. For example, if $c=2$, so that $x=e$, then $n=1$ (since $e=1e^1$). As another example, if $c=3$, so that $x=e^2$, then $n \approx 1.5571455989976$; indeed, letting $\hat n=1.5571455989976$, $\hat n e^{\hat n}$ is very close to $e^2$. The unique solution $n=n(x)$ of the equation $x=ne^n$ ($x > 0$) is given by (defined) $n={\rm W}(x)$, where ${\rm W}$ is the Lambert W function (thus, for example, ${\rm W}(e)=1$ and ${\rm W}(e^2) \approx 1.5571455989976$). While the function W is rather complicated, it can be evaluated immediately using WolframAlpha. So, given the constant $c$, just ask WolframAlpha to compute ${\rm W}(e^{c-1})(=n)$ (note that the function W is implemented as ProductLog).

-
I am sorry but I am no mathematician, can you give me some explanation on this? – Sid Jun 7 '11 at 0:04
@SidCool: Yes, I'll add some details later on. – Shai Covo Jun 7 '11 at 0:19
details added... – Shai Covo Jun 7 '11 at 1:41
Thanks Shai. Appreciate your help. – Sid Jun 7 '11 at 20:58

Eliminating $m$, you have $c - n = \log(n) + 1$. Unfortunately, there is no "elementary" expression for a solution of this equation. You need to use the Lambert W function: $n = \hbox{LambertW}(exp(c-1))$.

-