Sign in

Libre University uses your GitHub account. Signing in is only needed to sit a final test, so the score is kept on your profile.

The integral

The area under a curve was one of the two problems that opened this course, and it has been left alone since, because defining it honestly requires the limit and the definition matters more than the answer.

The temptation is to say that the area is obviously there and calculus merely computes it. That will not do. Elementary geometry defines area for polygons and for a few special curved regions, and says nothing about the region under an arbitrary curve. What follows defines it, in a way that turns out to apply to far more than areas.

Rectangles, systematically

Take a function f on an interval [a,b], and assume for the moment that it is positive. Cut the interval into n pieces of equal width Δx=(b-a)/n, with division points x0=a, x1, up to xn=b. On each piece erect a rectangle whose height is the value of f at some chosen point of that piece. The total area of the rectangles is

Sn=k=1nf(xk*)Δx

where xk* is the chosen point in the k-th piece. A sum of this shape is a Riemann sum, after Bernhard Riemann, who gave the definition its modern form in his habilitation thesis of 1854.

Three choices of sample point are standard. Taking the right end of each piece gives the right sum, the left end gives the left sum, and the midpoint gives the midpoint sum, which is usually much more accurate. For a function that only rises, the left sum is an underestimate and the right sum an overestimate, which brackets the answer, and that bracketing is what made the numerical experiments of the first lesson convincing.

The definition to aim at is that the area is the common value all these sums approach as n grows, regardless of which sample points are used. That is a strong requirement, and part of the work below is checking that it is ever satisfied.

Computing one by hand

Take f(x)=x2 on [0,1], the case estimated numerically in the first lesson, and do it exactly.

With n strips the width is 1/n and the right-hand sample points are xk=k/n, so

Sn=k=1n(kn)21n=1n3k=1nk2

The sum of the first n squares has the closed form n(n+1)(2n+1)/6, proved by induction in the previous course. Substituting,

Sn=n(n+1)(2n+1)6n3=13(1+1n)(1+12n)

after dividing out the powers of n. Now the limit is easy: both brackets tend to 1, so Sn1/3.

The formula also reproduces the numerical estimates exactly. At n=10 it gives 0.385, at n=100 it gives 0.33835, and at n=1000 it gives 0.3338335, all matching the direct sums computed earlier. The convergence is slow, roughly one extra correct digit per tenfold increase in n, which is characteristic of a method whose error falls like 1/n.

Example. Compute 01x3dx from the definition, using k=1nk3=[n(n+1)/2]2.

The right sum is (1/n4)k3=n2(n+1)2/(4n4)=14(1+1/n)2. As n grows this tends to 1/4. At n=4 the formula gives 14(1.25)2=0.390625, which matches the direct sum 1256(1+8+27+64), and at n=100 it gives 0.255025, closing on 0.25 from above.

Now you. Compute 02xdx from the definition, using k=1nk=n(n+1)/2.

Answer

The width is 2/n and the sample points are 2k/n, so the sum is (4/n2)k=4n(n+1)/(2n2)=2(1+1/n), which tends to 2. The region is a triangle of base 2 and height 2, whose area is 2, so the machinery agrees with geometry on a case where geometry has an answer.

The definition, and which functions have one

The definite integral of f from a to b is written

abf(x)dx

and is defined to be the limit of the Riemann sums as the width of the widest strip tends to zero, provided that limit exists and is the same for every choice of sample points. When it does, f is integrable on [a,b].

Every part of the notation records a part of the construction. The sign is an elongated S for "sum", introduced by Leibniz in 1675. The f(x) is the height of a rectangle and the dx is its width, so the product under the sign is the area of one infinitely thin strip, and the sign totals them. The a and b record the range. The variable is a placeholder with no meaning outside the integral, so abf(x)dx and abf(t)dt are the same number.

The existence question is settled by two theorems worth knowing without their proofs. First, every continuous function on a closed bounded interval is integrable. Second, a bounded function with only finitely many discontinuities is integrable too, so a step function is fine. Since almost everything met in practice satisfies one of these, integrability is normally not something to worry about.

That it is not automatic can be shown with one example. Let f(x) be 1 at every rational number and 0 at every irrational, a function due to Dirichlet in 1829. Every strip, however thin, contains both kinds of number, so by choosing rational sample points every Riemann sum is b-a, and by choosing irrational ones every sum is 0. The sums do not converge to a common value, and this function has no Riemann integral at all. It is the standard demonstration that "area under the graph" is not a meaningful phrase for every function, which is exactly why the definition is stated in terms of sums rather than assumed from a picture.

Signed area

Nothing in the definition requires f to be positive. Where f is negative the rectangle heights are negative, and the sum counts that region as negative area. So the integral measures signed area: regions above the axis count positively and regions below count negatively.

This is a feature rather than a defect, because it is what the applications need. If v(t) is a velocity that changes sign, then vdt is the displacement, not the distance travelled, and the cancellation is correct: a body that goes out and comes back has zero displacement. To get the distance you integrate |v| instead, which is a different and usually harder problem.

The cleanest illustration is 02πsinxdx=0. The first half-wave is above the axis and the second below, and they are congruent, so the signed total vanishes while the total area enclosed is 4.

Properties that follow from the definition

Every rule below comes from the corresponding property of sums, since a limit of sums inherits whatever the sums have.

Integration is linear: (f+g)=f+g and cf=cf, because each Riemann sum splits that way. Integrals add over adjacent intervals, acf=abf+bcf, since cutting the interval at b and summing the pieces separately gives the same total. Reversing the limits reverses the sign, baf=-abf, which is a convention chosen precisely so that the additivity rule holds for any three points regardless of their order. And aaf=0, since the strips have zero width.

Comparison also survives: if fg throughout the interval then abfabg, and in particular if mfM then

m(b-a)abf(x)dxM(b-a)

which is often the fastest way to bound an integral you cannot compute.

Example. Given 03f=8 and 01f=3, find 13f and 30f.

Additivity gives 01f+13f=03f, so 13f=8-3=5. Reversing the limits changes the sign, so 30f=-8.

Now you. Given 14f=10 and 14g=-2, find 14(3f-2g).

Answer

Linearity gives 3×10-2×(-2)=30+4=34.

The average value of a function

The bounds above have a consequence that the next lesson needs. Divide the inequality by b-a: the quantity

1b-aabf(x)dx

lies between the smallest and largest values of f on the interval. If f is continuous, the Intermediate Value Theorem says f attains every value in between, so there is a point c in [a,b] with

f(c)=1b-aabf(x)dx

This is the Mean Value Theorem for integrals, and the quantity on the right is the average value of f over the interval. It generalises the ordinary average: adding n sample values and dividing by n is exactly a Riemann sum divided by the interval length, and letting n grow gives the integral form. Geometrically, the rectangle of height f(c) over the interval has the same area as the region under the curve.

Example. Estimate 121xdx with a midpoint sum using four strips, and compare it with the true value.

The strips have width 0.25 and midpoints 1.125, 1.375, 1.625 and 1.875. The corresponding heights are 0.888889, 0.727273, 0.615385 and 0.533333, summing to 2.764880, so the estimate is 0.25×2.764880=0.691220. The true value is ln2=0.693147, so four midpoint rectangles are already accurate to three decimal places, far better than the right sums used earlier. The average value of 1/x on this interval is therefore about 0.693, which is the height of the equivalent rectangle.

Now you. Estimate the same integral with a midpoint sum using two strips.

Answer

The midpoints are 1.25 and 1.75, with heights 0.8 and 0.571429. The estimate is 0.5×1.371429=0.685714, low by about 1.1 per cent. Halving the number of strips roughly quadrupled the error, which is the behaviour of the midpoint rule.

The cost of the definition

The definition works, and it is unusable as a method. Getting 01x2 required a closed form for the sum of squares, and 01x3 required the sum of cubes. For 01x4 there is a formula too, and it is worse. For 0πsinxdx the Riemann sum needs a closed form for a sum of sines in arithmetic progression, which exists but is an exercise in its own right. For a function assembled from several others, nothing helps at all.

So the area problem is now properly defined and no easier to compute than it was for Archimedes. What changes everything is a connection that has been visible since the first lesson without being proved: that accumulating a rate recovers the quantity, so the area under a velocity curve is a displacement. If the integral of f can be found by asking which function has f as its derivative, then every rule in the differentiation lessons becomes an integration rule read backwards, and the sums never have to be done.

That is the Fundamental Theorem of Calculus, and it is next.