TITLE: Is a definite integral just a summation?
QUESTION [17 upvotes]: I am learning about definite integrals and found the formula for finding an average of a function over a given interval:
$$\frac{1}{b-a}  \int_{a}^{b} f\left(x\right) dx$$
If we look at the average function for a set of numbers:
$$\frac{1}{n} \sum_{i=1}^{n} x_i$$
It would seem as if the integral is essentially a summation of all values from $a$ to $b$. Is it correct to think of it this way?

REPLY [4 votes]: In a way, yes. In both cases, what these two notions are expressing is the idea of accumulated change: you can think of it as the end result of a large number of changes to some quantity of interest that have built up over time (or along some dimension, more generally), whether those changes are positive or negative.
In the case of the summation, the changes come in discrete parcels - think about, for example, regular withdrawals or deposits of money into a bank account but of varying amounts. The summation from a starting time to an ending time of interest adds all those parcels together over a given interval of interest and thus gives you the total change, say the total amount by which the money in your account changed over a year's worth of transactions.
In the case of integration, the changes are steady - think a smooth, continuous flow, like filling up a bucket with a stream of water from a hose, while we control the flow rate with the tap. The integral of the flow rate (how far open the tap is, effectively, or proportional thereto) from the starting time to the ending time, equals the total amount of water we have added under that variable change. Of course, in integration we can also have negative changes while a hose can only add water to a bucket.
And moreover, this points the way to how we usually define the integral. If the rate of change - amount of change had over unit of time, e.g. kilograms of water coming out of the hose per minute, for example - at a given time $t$ is $f(t)$, then we can approximate the amount of change, i.e. the number of kilograms delivered, over a suitably-small time interval $\Delta t$ by $f(t)\ \Delta t$. For example, if $f(t)$ at some given point in time is 50 kilograms per minute, and the time step is 0.001 minute, then that means that the small change is 0.05 kilograms of water added. We can add all these small changes up over a protracted interval to estimate the result of the continuously-varying change, e.g. if we add those all up over 10 minutes, with no change, we will get 10,000 time steps times 0.05 kg equals 500 kg of water delivered. Of course, this is just the same as if we multiplied and thus in this case actually exact, but that's only because we did not vary the flow rate, for simplicity. The exact integral when there is a variable rate of change results by taking the limit: the "idealized" value that the result this process approximates ever better - if it does - when we repeat it with $\Delta t$ is taken ever smaller. We thus write
$$\int_{t_a}^{t_b} f(t)\ dt = \lim_{\Delta t \rightarrow 0} \sum_j f(t_j)\ \Delta t$$
where $t_j = t_a + j(\Delta t)$ and j ranges just high enough for the final point to be just below $t_b$. Although, to make the integral a bit more well-behaved for rougher functions than those we would obtain from a faucet, we like to also consider where the time steps are irregular instead of just regular steps of $\Delta t$ and this leads to the textbook definition in terms of the "limit of a partition".