Hi, Thank you for viewing the question.
I have tried to do a comparison between Integral and trapz for a simple function of x.^2. with upper and lower limits as 9 and 0 its a simple sanity check I am trying to do
Intergal value for this function is 243.
To check trapz accuracy I ended up giving x and y values taken from the above function, like x = [0:1:9] and y = [0,1,4,9,16,25,36,49,64,81] and trapz is showing a value of 244.50.
May I know why there is such a difference and what other functions are available for me to get the integral of the above discrete data correct.