Compute the area under a curve. Given data for x and y, computes the area under curve y.