In mathematics, an integral is the continuous analog of a sum, which is used to calculate areas, volumes, and their generalizations.