Question: How do I perform numerical integration on an array?

I have an arrays of data. One for x values, and one for y values. How can I obtain a numerical integration of y for a range of x values?

I have tried defining a function of X using ArrayInterpolation(x,y,X) and then calling evalf(Int(f,xmin..xmax)) but that gives an error message. (I don't seem to be able to paste into this window) The error message says

"Error, invalid input: evalf expects its 2nd argument, n, to be of type posint, but received numeric."

I thought I was using a form of the equation right from the help system.

I also tried the 2D version of integration, but it returns the difference of my limits times my function name.

I aslo tried AdaptiveQuadrature, but I can't get that to work either.

-Mike McDermott

Newbie Maple user

 

 

Please Wait...