title: Numeric integral of sin(x)/x
body: <p>I want to calcultate the definite integral with quadratures of sin(x)/x in python using scipy. With n = 256. It doesnt seem to work well:</p>
  
  <pre><code> from scipy import integrate
  
   exact = integrate.quad(lambda x : (np.sin(x))/x, 0, 2*np.pi)[0]
   print("Exact value of integral:", exact)
  
   # Approx of sin(x)/x by Trapezoidal rule
   x = np.linspace(0, 2*np.pi, 257)
   f = lambda x : (np.sin(x))/x
   approximation = np.trapz(f(x), x)
   print ("Estimated value of trapezoidal O(h^2):", round(approximation, 5), 
     '+', round((2/256)**2, 5))
   print ("real error:", exact - approximation)
  
   # Approx of sin(x)/x by Simpsons 1/3 rule
   approximation = integrate.simps(f(x), x)
   print("Estimated value of simpsons O(h^4):", round(approximation, 9), 
     '+', round((2/256)**4, 9))
   print ("real error:", exact - approximation)
  
   plt.figure()
   plt.plot(x, f(x))
   plt.show()
  </code></pre>
  
  <p>The exact integral is calculated well, but I get an error with quadratures... What is wrong?</p>
  
  <pre><code>Exact value of integral: 1.4181515761326284
  Estimated value of trapezoidal O(h^2): nan + 6e-05
  real error: nan
  Estimated value of simpsons O(h^4): nan + 4e-09
  real error: nan
  </code></pre>
  
  <p>Thanks in advance!</p>