Ma · Mathematics

How to Solve $8n^2=64n\log_2(n)$

Published By the 9to5Science editorial team

At a glance

  1. 1. Check the domain

    Because the logarithm requires n to be positive, restrict attention to n greater than zero.

  2. 2. Simplify the equation

    Divide both sides by 8n to get n equals 8 times log base 2 of n.

  3. 3. Find the number of roots

    Compare the two sides using a function; its single minimum is below zero, so there are two positive real roots.

  4. 4. Approximate the roots

    Use a numerical method to obtain roots near 1.1000 and 43.5593.

The logarithm is defined only when n>0n>0, so n=0n=0 is not a possible solution. For positive nn, divide the equation by 8n8n and solve the simpler equation that remains. It does not have a simple integer solution, but it has two positive real solutions that can be found numerically.

Reduce the equation

Start with

8n2=64nlog⁡2(n).8n^2=64n\log_2(n).

Since n>0n>0, division by 8n8n is valid:

n=8log⁡2(n).n=8\log_2(n).

This is a transcendental equation: the variable appears both outside and inside a logarithm. In general, you cannot solve it using only the usual algebraic operations and logarithm rules. First determine how many solutions exist, then approximate them.

Show that there are two positive solutions

Define a function whose zeros are the solutions:

f(n)=n−8log⁡2(n),n>0.f(n)=n-8\log_2(n),\qquad n>0.

The equation is equivalent to f(n)=0f(n)=0. Using log⁡2(n)=ln⁡(n)/ln⁡(2)\log_2(n)=\ln(n)/\ln(2), differentiate:

f′(n)=1−8nln⁡(2).f'(n)=1-\frac{8}{n\ln(2)}.

The derivative is zero at

n=8ln⁡(2)≈11.542.n=\frac{8}{\ln(2)}\approx 11.542.

For smaller positive nn, f′(n)<0f'(n)<0; for larger nn, f′(n)>0f'(n)>0. Thus ff decreases to one minimum and then increases. Also, f(n)f(n) tends to positive infinity as nn approaches zero from above, and it tends to positive infinity as nn grows without bound. The minimum is negative, so the graph crosses zero twice.

For example, f(1)=1>0f(1)=1>0, while f(2)=2−8=−6<0f(2)=2-8=-6<0. This confirms a crossing on the left side of the minimum. On the right, f(43.5)<0f(43.5)<0 and f(43.6)>0f(43.6)>0, confirming another crossing. Because there is only one minimum, these are the only two roots.

Approximate the solutions

A calculator or numerical solver can find roots of f(n)=0f(n)=0. Newton’s method is one option. Starting with an estimate nkn_k, update it using

nk+1=nk−nk−8log⁡2(nk)1−8/(nkln⁡(2)).n_{k+1}=n_k-\frac{n_k-8\log_2(n_k)}{1-8/(n_k\ln(2))}.

Use an initial estimate near 1.11.1 for the smaller root and one near 43.543.5 for the larger root. The results are

n≈1.099997orn≈43.5592604.n\approx 1.099997\quad\text{or}\quad n\approx 43.5592604.

Rounded to four decimal places, the solutions are 1.10001.1000 and 43.559343.5593. Substituting either value into n=8log⁡2(n)n=8\log_2(n) gives equality up to rounding error. The two solutions are easy to miss if you only test values near one of the roots.

Exact form using the Lambert W function

There is an exact expression using the Lambert W function, defined by W(x)eW(x)=xW(x)e^{W(x)}=x. Rewrite the equation as

ln⁡(n)=ln⁡(2)8n.\ln(n)=\frac{\ln(2)}{8}n.

Rearranging gives −(ln⁡(2)/8)n-(\ln(2)/8)n multiplied by its exponential equal to −ln⁡(2)/8-\ln(2)/8. Therefore,

n=−8ln⁡(2)Wk ⁣(−ln⁡(2)8).n=-\frac{8}{\ln(2)}W_k\!\left(-\frac{\ln(2)}{8}\right).

The argument lies between −1/e-1/e and 00, where the Lambert W function has two real branches. The branch k=0k=0 gives the smaller root, and k=−1k=-1 gives the larger one. This notation is useful for an exact formula, but numerical approximations are usually more practical in an algebra or precalculus setting.

Common mistakes

  • Keeping n=0n=0 as a candidate: The original logarithm log⁡2(n)\log_2(n) is undefined at zero.
  • Dividing by nn without checking the domain: Here division by nn is safe only because the logarithm already requires n>0n>0.
  • Assuming there is only one answer: The function decreases and then increases, producing two positive roots.
  • Treating a numerical approximation as an exact value: Values such as 1.11.1 and 43.559343.5593 are rounded; they are not exact roots.
  • Assuming an integer is required: Over the positive reals there are two solutions. If the problem requires integer nn, neither root is an integer, so there are no integer solutions.

References

  1. NIST Digital Library of Mathematical Functions, §4.13: Lambert W-Function

Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.