integral calculation between 2 points on x-axis