title: In python, how to solve logarithm equation (x*logx)
body: <p>I'm trying to make a code for solving below logarithm equation in python.</p>
  
  <p><strong>x*log_2(x) + (1-x)*log_2(1-x) + U = 0</strong></p>
  
  <p>log_2 is Base-2 logarithm function and U is a constant number (i.e., 0.9)</p>
  
  <p>and solution 'x' will be between 0~1</p>
  
  <p>I had made a code like below.</p>
  
  <pre><code>import math
  from sympy import Symbol, solve, Eq, log
  
  x = Symbol('x')        
  equation = x*log(x)/log(2)+(1-x)*log(1-x)/log(2) + 0.9
  solve(equation,x)
  </code></pre>
  
  <p>But,because of error for 
  <strong>NotImplementedError: multiple generators [x, log(1 - x), log(x)]</strong> , I can't solve that equation.</p>
  
  <p>Also, I had tried to use scipy.optimize like below code</p>
  
  <pre><code>import scipy.optimize
  import math
  from sympy import Symbol, solve, Eq
  
  x = Symbol('x')     
  scipy.optimize.fsolve(x*math.log2(x)+(1-x)*math.log2(1-x) + 0.9,0.5)# 0.5 is guess value
  
  </code></pre>
  
  <p>But, this code also makes a error for <strong>TypeError: can't convert expression to float</strong></p>
  
  <p>How can I solve or approximate that equation in python??
  Please Help. Thank you.</p>