Solving 2^k = n/k for k in Terms of n: Tips and Tricks

  • Thread starter Thread starter flash
  • Start date Start date
  • Tags Tags
    Expression
Click For Summary
The equation 2^k = n/k cannot be solved algebraically for k in terms of n, and typically requires numerical approximation unless n has specific properties. The discussion highlights that the equation can be transformed into k * 2^k = n, leading to the expression k * e^(k ln(2)) = n. By substituting y = k ln(2), the equation becomes y * e^y = n ln(2), which can be solved using the Lambert W function. This results in the solution k = W(n ln(2))/ln(2). The Lambert W function provides a way to express k in terms of n, offering a pathway to approximate solutions.
flash
Messages
66
Reaction score
0
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!
 
Physics news on Phys.org
Hm, there may not be a closed form solution. Does anyone else have better luck?
 
No, you can't solve it algebraically. You can only approximate it numerically, unless n is very special.
 
Last edited:
Thanks, that's what I wanted to know. Cheers
 
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).
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 13 ·
Replies
13
Views
2K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 34 ·
2
Replies
34
Views
6K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
12
Views
4K