# Homework Help: Solve expression for k

1. Oct 10, 2008

### flash

I would like to solve $$2^k = \frac{n}{k}$$ for k in terms of n, but can't seem to do it. Any help greatly appreciated!

2. Oct 10, 2008

### Defennder

Hm, there may not be a closed form solution. Does anyone else have better luck?

3. Oct 11, 2008

### Dick

No, you can't solve it algebraically. You can only approximate it numerically, unless n is very special.

Last edited: Oct 11, 2008
4. Oct 11, 2008

### flash

Thanks, thats what I wanted to know. Cheers

5. Oct 12, 2008

### HallsofIvy

That depends upon what you mean by "closed form" or "algebraic" solution.

This is obviously equivalent to k2k= n and, since 2k= ekln(2), k ek ln(2)= n. Multiplying on both sides by ln 2, (k ln(2)) ek ln(2)= n ln(2). If we let y= k ln(2), that equation is yey= n ln(2).

That equation is directly solvable by the Lambert W function (which is simply defined as the inverse function to f(x)= xex): k ln(2)= y= W(n ln(2)) so
k= W(n ln(2))/ln(2).