title: Python integrate with infinite
body: <p>Sometimes, I get wrong solution when I integrate with infinite boundaries in Python. Here is a simple example to illustrate my confusion:</p>
  
  <pre><code>from scipy import *
  import numpy as np
  from scipy.integrate import quad
  
  def integrand1(x):
      output = exp(-(x-1.0)**2.0)
      return output
  
  def integrand2(x):
      output = exp(-(x-100.0)**2.0)
      return output
  
  solution1 = quad(integrand1,-np.inf,np.inf)
  print solution1
  
  solution1 = quad(integrand2,-np.inf,np.inf)
  print solution2
  </code></pre>
  
  <p>while the output is:</p>
  
  <pre><code>(1.7724538509055159, 3.668332157626072e-11)
  (0.0, 0.0)
  </code></pre>
  
  <p>I don't understand why the second integral is wrong while the first one avoid to be wrong. It will be great to tell me some tricks to handle infinite in Python. </p>