title: Python: Integration of Interpolation
body: <p>I've got some question I cant solve:</p>
  
  <pre><code>#! /usr/bin/env python
  import numpy as np
  from scipy.interpolate import UnivariateSpline
  from scipy.integrate import quad
  import pylab as pl
  
  x = ([0,10,20,30,40,50,60,70,...,4550,4560])
  y = ([0,0,0,0,0,0,0,3,2,3,2,1,2,1,2,...,8,6,5,7,11,6,7,10,6,5,8,13,6,8,8,3])
  s = UnivariateSpline(x, y, k=5, s=5)
  xs = np.linspace(0, 4560, 4560)
  ys = s(xs)
  </code></pre>
  
  <p>This is my code for making some Interpolation over some data.
  In addition, I plotted this function.</p>
  
  <p>But now I want to integrate it (from zero to infinity).</p>
  
  <p>I tried</p>
  
  <pre><code>results = integrate.quad(ys, 0, 99999)
  </code></pre>
  
  <p>but it didnt work.</p>
  
  <p>Can you give me some hints (or solutions) please? thanks</p>