6
$\begingroup$

I have this equation $n = 2^{\frac{n^2}{16}}$

I need to find n.

I tried using the Lambert W function, but I don't know how to get one side into the form $W(xe^x)=x$ without having an $n$ on the other side.

I have done:

$n = e^{\frac{n^2ln2}{16}}$

$1 = \frac{1}{n}e^{\frac{n^2ln2}{16}}$

I'm stuck because I am multiplying $\frac{1}{n}$ by $\frac{n^3}{16}ln2$ but that leaves n on the other side.

$\endgroup$
5
  • 2
    $\begingroup$ Any reason to avoid numerical methods? $\endgroup$
    – lulu
    Commented Sep 28, 2022 at 23:00
  • $\begingroup$ Hi, thanks for answering. But I cannot see how wolfram got to that answer. $\endgroup$
    – Ben Alan
    Commented Sep 28, 2022 at 23:06
  • 1
    $\begingroup$ Presumably by using Newton's method, or the like. Easy enough to bound the possible real answers, after which any numerical method you favor should go through. $\endgroup$
    – lulu
    Commented Sep 28, 2022 at 23:07
  • $\begingroup$ Thanks! I'd appreciate it if you could make an answer showing how newton's method works for this problem. If not, thanks for steering me in the right direction! $\endgroup$
    – Ben Alan
    Commented Sep 28, 2022 at 23:19
  • $\begingroup$ Just try it, it goes very quickly. Guessing $10$ gives you one root in about six steps. Guessing $0$ gives you the other even more quickly. $\endgroup$
    – lulu
    Commented Sep 28, 2022 at 23:21

4 Answers 4

3
$\begingroup$

$$n=2^{n^2/16}$$ $$n^2=2^{n^2/8}=e^{n^2(\ln2)/8}$$ $$-\frac{\ln2}8n^2e^{-n^2(\ln2)/8}=-\frac{\ln2}8$$ Now we can apply Lambert W: $$-\frac{\ln2}8n^2=W\left(-\frac{\ln2}8\right)$$ $$n=\sqrt{\frac{W(-(\ln2)/8)}{-(\ln2)/8}}$$ The argument to $W$ falls in the range where both real branches $W_0$ and $W_{-1}$ have real output, so we get two solutions $n=1.0488074\dots$ and $n=6.5999439\dots$

$\endgroup$
2
  • $\begingroup$ Thanks! I'm curious about step three. Is n/e^x == ne^-x? $\endgroup$
    – Ben Alan
    Commented Sep 29, 2022 at 16:46
  • $\begingroup$ @BenAlan Exactly. Moving $e^x$ to the other side negates the exponent. $\endgroup$ Commented Sep 29, 2022 at 16:49
2
$\begingroup$

It is interesting to notice that $f(x)=2^{\frac{x^2}{16}}$ is contraction map for $x$ in the interval $[-4.6,4.6]$ and a solution for the fixed point $x=f(x)$ can be found by the sequence $x_{i+1}=f(x_i)$, $i=0,1,2,...$, starting at any $x_0\in [-4.6,4.6]$. This sequence will converge to one of the solutions ($x\approx 1.048807$).

$\endgroup$
2
  • $\begingroup$ Alan wants a solution with Lambert W function. But, I love the fixed point theorem too. All bad things in life happen because of that theorem. E.g. Nash. $\endgroup$
    – Bob Dobbs
    Commented Sep 29, 2022 at 10:22
  • $\begingroup$ @Bob Dobbs, Sure :). I love the fixed point theorem too. I could not resist to post a note on that just to show an alternative solution route for the question. $\endgroup$
    – bluemaster
    Commented Sep 29, 2022 at 10:57
1
$\begingroup$

$n = 2^{(\frac {n}{4})^2}$

We need to get the right hand side into the form ${f(n)}e^{f(n)} = c$
Then $f(n) = W(c)$
$1 = n^{-1}e^{(\frac {n}{4})^2\ln 2}$
$1^{-1} = ne^{-(\frac {n}{4})^2\ln 2}$
$\frac 14 = \frac {n}{4}e^{-(\frac {n}{4})^2\ln 2}$
$\frac 1{16} = (\frac {n}{4})^2e^{-2(\frac {n}{4})^2\ln 2}$
$\frac {\ln 2}{8} = (2(\frac {n}{4})^2\ln 2)e^{-2(\frac {n}{4})^2\ln 2}$
$-\frac {\ln 2}{8} = (-2(\frac {n}{4})^2\ln 2)e^{-2(\frac {n}{4})^2\ln 2}$
Now we have the right-hand side in the correct form.

$-2(\frac {n}{4})^2\ln 2 = W(-\frac {\ln 2}{8})$

And unwind to find $n$

$\endgroup$
0
$\begingroup$

In the definition of Lambert W function, put $x=\ln(u^{-1})$ then we have the property: $$W(-\frac{\ln u}{u})=-\ln u$$.

If $n=2^{\frac{n^2}{16}}$ then $\ln n=\frac{n^2\ln 2}{16}$. Multiplying by 2 we have $\ln (n^2)=\frac{n^2\ln 2}{8}$ and $$-\frac{\ln (n^2)}{n^2}=-\frac{\ln 2}{8}.$$

Now, taking $W$ of both sides and using the property above we get $-\ln(n^2)=W(-\frac{\ln 2}{8})$. Hence, $$n=\sqrt{\exp(-W(-\frac{\ln 2}{8}))}.$$ Since, $W(-\frac{\ln 2}{8})$ has two negative real roots, (Use the calculator here, with $x\approx -0.08664339756999$: https://www.had2know.org/academics/lambert-w-function-calculator.html), we have two solutiıns for Alan's equation.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .