Is a definite integral just a summation? 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?
 A: Yes, and no.  In so much as the definite integral is a "sum" it is a limit of a Riemann sum as the "mesh" goes to zero.  The "mesh" is the largest part of a partition. That is, your domain is broken up into parts over which you take the average value of your function, and multiply by the width of that part.
It's typically helpful to think about definite integrals as sums over "infinitesimal" displacements, but strictly speaking, that is incorrect.  
A: 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".
A: It's certainly helpful to think of integrals this way, though not strictly correct. An integral takes all the little slivers of area beneath a curve and sums them up into a bigger area - though there's, of course, a lot of technicality needed to think about it this way. 

There is an idea being obscured by your idea of an integral as a sum, however. In truth, a sum is a kind of integral and not vice versa - this is somewhat counterintuitive given that sums are much more familiar objects than integrals, but there's an elegant theory known as Lebesgue integration which basically makes the integral a tool which eats two pieces of information:


*

*We start with some indexing set and some way to "weigh" pieces of that set.

*We have some function on that set.
Then, the Lebesgue integral spits out the weighted "sum" of that function.
An integral in the most common sense arises when you say, "I have a function on the real numbers, and I want an interval to have weight equal to its length." A finite sum arises when you say "I have a function taking values $x_1,\ldots,x_n$ on the index set $\{1,\ldots,n\}$. Each index gets weight $1$" - and, of course, you can change those weights to get a weighted sum or you can extend the indexing set to every natural number to get an infinite sum. But, the basic thing to note is that there's a more general idea of integral that places summation as part of the theory of integration.
