Firstly it works like if we give x and y data, it interpolates linearly(default) or it uses cubic spline. So then by giving lower limit and upper limit it integrates over the limits and gives the data. This is how it works kk