title: Numerical integration with singularities in python (principal value)
body: <p>I'm trying to integrate a function with singularities  using the quad function in <code>scipy.integrate</code> but I'm not getting the desired answer. Here is the code:</p>
  
  <pre><code>from scipy.integrate import quad
  import numpy as np
  def fun(x):
      return 1./(1-x**2)
  quad(fun, -2, 2, points=[-1, 1])
  </code></pre>
  
  <p>This results in IntegrationWarning and return value about <code>0.4</code>.</p>
  
  <p>The poles for the function are [-1,1]. The answer should be of roughly 1.09 (calculated using pen and paper). </p>