n*2^n = 2^53

HOw to solve for n??

thank you

Printable View

- February 18th 2007, 11:17 AMtea217n*2^n = 2^53 HOw to solve?
n*2^n = 2^53

HOw to solve for n??

thank you - February 18th 2007, 12:15 PMCaptainBlack
Formula iteration will solve this with a bit of cunning:

Rewrite the equation as:

n=ln[(2^55)/n]/log(2)

Then iterate:

n(r+1)=ln[(2^55)/n(r)]/log(2)

where n(r) is the r-th iterate.

Then with n(0)=1, we get:

n(1)=53,

n(2)=47.2721,

n(3)=47.4371,

n(4)=47.4321

n(5)=47.4322

n(6)=47.4322

With n=47.4322 the two sides of the original equation agree to 5 significant digits.

RonL - February 18th 2007, 01:10 PMCaptainBlack
This can also be solved with the LamberW function.

If A=w*e^w, then W=LambertW(A).

Your equation may be written:

n* e^(ln(2) n)=2^53,

or:

[ln(2)*n] e^[ln(2)*n]=ln(2)*2^53,

so:

ln(2)*n=LambertW(ln(2)*2^53),

or:

n=LambertW(ln(2)*2^53)/ln(2).

Now LambertW(ln(2)*2^53)~=32.8775, so n=32.8775/ln(2) ~=47.4322.

RonL - February 18th 2007, 10:11 PMtea217
- February 19th 2007, 02:53 AMchogo
that lambert w function is incredible

- February 19th 2007, 03:16 AMCaptainBlack
Typo, default base for log is e, so when I forget to type ln and type log

I usually mean log base e.

We have:

n 2^n = 2^53

which we may rewrite as:

n e^(n ln(2))=2^53

so:

e^(n ln(2))=(2^53)/n

Now taking logs (ln's) gives:

n ln(2)= ln((2^53)/n)

n= ln((2^53)/n)/ln(2)

The equation is reorganised in this manner so that formula iteration

will converge (with the obvious rearrangement iteration diverges)

RonL