Question: How to integrate a vector

I have some X-Y data, and I would like to calculate a definate integral of the data. In this case x_data and y_data are vectors.

I tried this method.

y:=x->ArrayInterpolation(x_data,y_data,x)

But when I try to calculate an integral like this, I get an error.

int(y, x0..x1)

Error, (in int) operator y cannot be evaluated at one variable.

What is this error trying to tell me? I have tested by function y for values x1 and x2. My data is smooth and includes x1 and x2. I have no reason to believe that the function cannot be evaluated for any value of x. 

Is there another (better) way to do what I want? This is a part of a large worksheet that reads data from an excel file, and I don't know how to reduce the worksheet for only this problem.

Thanks.

Please Wait...