title: error with python sympy computing integral for cosine function
body: <p>So I was trying an example directly from the sympy documentation and I am getting a strange error. I am using python 3.2 with sympy 0.7.3. I have been working in the ipython notebook, though I don't think that should make a difference. The error is that whenever I create a "x" symbol and try to integrate the math.cos(x), I get an error saying "can't convert expression to float."</p>
  
  <p>Here is a code example. This is taken from the <a href="http://docs.sympy.org/dev/modules/integrals/integrals.html" rel="nofollow">sympy documentation</a>. </p>
  
  <pre><code>import sympy
  import math
  x = sympy.Symbol('x')
  sympy.integrate(x**2 * math.exp(x) * math.cos(x), x)
  </code></pre>
  
  <p>The error message that results is:</p>
  
  <pre><code>---------------------------------------------------------------------------
  TypeError                                 Traceback (most recent call last)
  &lt;ipython-input-123-84e55454fb60&gt; in &lt;module&gt;()
  ----&gt; 1 sympy.integrate(x**2 * math.exp(x) * math.cos(x), x)
  
  /usr/local/lib/python3.2/dist-packages/sympy/core/expr.py in __float__(self)
  242         if result.is_number and result.as_real_imag()[1]:
  243             raise TypeError("can't convert complex to float")
  --&gt; 244         raise TypeError("can't convert expression to float")
  245 
  246     def __complex__(self):
  
  TypeError: can't convert expression to float
  </code></pre>
  
  <p>Any suggestions would be appreciated. </p>