1
$\begingroup$

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

  • 0
    @Aryabhatta: if I have further issues regarding what counts as duplicate, I'll be sure to post on meta...I'll delete my comments here shortly.2011-06-06

2 Answers 2

3

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).

  • 0
    Thanks Shai. Appreciate your help.2011-06-07
2

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))$.