A smart meter samples your home's power draw and adds up power times time for every interval. That sum of thin rectangles is a Riemann sum, and as the intervals shrink it becomes the definite integral: the kilowatt-hours on your bill.