1

Without worrying about the background, I have a question that asks to solve for n. Pardon my formatting, but it seems understandable this way for the time being until I edit it:

$$4n^2 = 256 \log_2n$$

I'm not looking for the answer (it's 16), but I want to know the process to begin simplifying the right side.

Thank you in advance

marwalix
  • 16,773

2 Answers2

1

One way to solve it :

Since $n$ is an integer, and you have a base-2 $log$, then $n$ can be written as : $$n = 2^{k}$$ with $k > 0$ (at first).

After rearranging the initial expression, you end up with : $$k = 2^{2k-6}$$

Now, you can see that :

$k > 3$ and $k$ is even. So, if you try with $k=4$... $$2^{2*4 -6} = 2^{8-6} = 2^2 = 4 = k$$

And since $n=2^k$, you have $n=2^4= 16$.

Sake
  • 308
  • Thank you, I see how this works. But I think the key is "so, if you try with..." - that's how I got 16 in the first place. Is there an algebraic way of simplifying this equation instead of guess and check? – user246854 Jun 09 '15 at 07:28
  • @user246854 In general, there is no simple way of solving the equation. Equations of this type often do not have integer solutions. The method described is not really that bad, since you need to solve the equation $k=2^{2k-6}$, and you know that sooner or later, $2^{2k-6}$ will grow faster than $k$, so you only have a finite number of values to check. – 5xum Jun 09 '15 at 07:46
  • Yes. Besides using the Lambert W function (used by g.kow in his answer), there is no simple way in general. – Sake Jun 09 '15 at 08:42
1

\begin{align} 4n^2 &= 256 \log_2n \end{align}

This kind of equations can be solved in terms of the Lambert W function, which provides a solution to equation of the form $x\exp(x)=y$ as $x=\operatorname{W}(y)$, hence we need to rearrange the terms in original equation in order to group terms $x$ and $\exp(x)$ together:

\begin{align} n^2 &= 64 \frac{\ln(n)}{\ln(2)} \\ \ln(n) n^{-2} &= \frac{\ln(2)}{64}\\ -2\ln(n) n^{-2} &= -\frac{\ln(2)}{32}\\ \ln(n^{-2}) n^{-2} &= -\frac{\ln(2)}{32}\\ \ln(n^{-2}) \exp(\ln(n^{-2})) &= -\frac{\ln(2)}{32}\\ \ln(n^{-2}) &= \operatorname{W}\left(-\frac{\ln(2)}{32}\right) \\ n^{-2} &= \exp\left(\operatorname{W}\left(-\frac{\ln(2)}{32}\right)\right) \\ n &=\exp\left(-\frac{1}{2}\operatorname{W}\left(-\frac{\ln(2)}{32}\right)\right) \\ \end{align}

Since $-\mathrm{e}^{-1}<-\frac{\ln(2)}{32}<0$, there are two real solutions, corresponding to the two real branches of the Lambert W function, $\operatorname{W}_0$ and $\operatorname{W}_{-1}$: \begin{align} n &=\exp\left(-\frac{1}{2}\operatorname{W}_{0}\left(-\frac{\ln(2)}{32}\right)\right) \approx 1.01113448176 \quad (1)\\ n &=\exp\left(-\frac{1}{2}\operatorname{W}_{-1}\left(-\frac{\ln(2)}{32}\right)\right) =16 \quad (2). \end{align}

In case if the solution has to be an integer, (1) has to be ignored. But the second solution is exact and integer, since

\begin{align} \operatorname{W}_{-1}\left(-\frac{\ln(2)}{32}\right) &= \operatorname{W}_{-1}\left(-\frac{1}{128}\ln(16)\right) \\ &= \operatorname{W}_{-1}\left( -2\ln(16)\exp(-2\ln(16)) \right) =-2\ln(16). \end{align}

g.kov
  • 13,581