The integral is actually much older than the derivative. The ideas of the integral were known to Archimedes thousands of years ago. He used these ideas to find various areas. The basic idea of the integral was presented earlier in defining the natural log function in which an area was found by approximating with small rectangles and then completeness was used. Recall the following definition.
Definition 6.1.1 One of the equivalent definitions of completeness of ℝ is that if S is any nonempty subset of ℝ which is bounded above, then there exists a least upper bound for S and if S is bounded below, then there exists a greatest lower bound for S. The least upper bound of S is denoted as sup
The words mean exactly what they say. sup
A consequence of this axiom is the nested interval lemma, Lemma 3.3.1.
Lemma 6.1.2 Let I_{k} =

Then there exists a point, c ∈ ℝ which is an element of every I_{k}. If

then there is exactly one point in all of these intervals.
This implied Theorem 3.5.2 which is stated here for convenience as a corollary. It says that closed intervals are sequentially compact.
The next corollary is the extreme value theorem. It is implied by Theorem 4.3.3 and listed here for convenience.

and there exists x_{m} ∈

A Cauchy sequence is one which bunches up. The precise definition follows.
Definition 6.1.5 Let

Proof: The Cauchy sequence is contained in some closed interval

Indeed, if m ≥ N, then n_{m} ≥ N because
If lim_{n→∞}x_{n} = x then for all n large enough,

showing that the sequence is a Cauchy sequence since ε > 0 is arbitrary. ■
Actually, the convergence of every Cauchy sequence is equivalent to completeness and so it gives another way of defining completeness in contexts where no order is available. Recall completeness means that every nonempty set bounded above (below) has a least upper bound (greatest lower bound). This standard definition depends on an order.
The Riemann integral pertains to bounded functions which are defined on a bounded interval. Before the time of Riemann, there were inferior notions of integration. However, a little after 1900, a much better integral was discovered.
Let

Such partitions are denoted by P or Q.
Definition 6.1.7 A function f :

Letting P denote a partition,

A Riemann sum for a bounded f corresponding to a partition P =

where y_{i} ∈
For example, suppose f is a function with positive values. The above Riemann sum involves adding areas of rectangles. Here is a picture:
The area under the curve is close to the sum of the areas of these rectangles and one would imagine that this would become an increasingly good approximation if you included more and narrower rectangles. However, we really have no idea what the “area under a curve” is until we give it a definition in terms of things we do understand, namely rectangles. This was the way it was done in the presentation of the natural logarithm. The area was that number which lies between all the lower and upper rectangular approximations to the graph of y = 1∕x. Here it is being done a little differently.
Definition 6.1.8 A bounded function defined on an interval

This is written as

and when this number exists, it is denoted by

One of the big theorems is on the existence of the integral whenever f is a continuous function. This is where Theorem 4.7.2 is needed. I am stating the conclusion of this theorem as the following lemma which is implied because closed intervals are sequentially compact.
With this preparation, here is the major result on the existence of the integral of a continuous function.
Theorem 6.1.10 Let f :

δ_{m} is defined to be such that if
Proof: Consider a partition P given by a = x_{0} < x_{1} <

Denote this one by Q. Then if you have a Riemann sum,

You could write this sum in the following form.

In fact, you could continue adding in points and doing the same trick and thereby write the original sum in terms of any partition containing P. If R is a partition containing P and if δ_{m} corresponds to ε = 1∕m in the above Lemma 6.1.9 with

Now if

Now let

Then S_{n} ⊇ S_{n+1} for all n thanks to the fact that the δ_{n} are decreasing. Let

These are nested intervals contained in

and so there is only one such I. Hence for any ε > 0 given, there exists δ > 0 such that if

We say that a bounded function f defined on an interval
Not all bounded functions are Riemann integrable. For example, let x ∈
 (6.1) 
This has no Riemann integral because you can pick a sequence of partitions P_{n}, such that
If you can partition the interval
Definition 6.1.11 A bounded function f :
Proof: Let P_{i} be a partition for

Let M_{f} be an upper bound for

Now for x_{j} ∈
Note that what has actually been shown is that if a bounded function f satisfies f = g_{i} on
The integral is linear meaning that if f,g are Riemann integrable on
 (6.3) 
This is true in general but I will only give the proof in case the functions f,g are piecewise continuous since this is essentially the only case of interest. It turns out that the more general version, while interesting, does not go nearly far enough. One really should do all of it in terms of the Lebesgue integral or the generalized Riemann integral. This is also the reason many other things are stated for piecewise continuous functions. It is obvious that the sum or linear combination of such functions is still piecewise continuous which obviates the necessity of showing that such combinations are Riemann integrable.
Proof: Let P be a partition with

Then
