Area under a curve and dividing regions