Home page for accesible maths 1 Integration

Style control - access keys in brackets

Font (2 3) - + Letter spacing (4 5) - + Word spacing (6 7) - + Line spacing (8 9) - +

1.2 Integration of continuous functions

Before treating continuous functions, let us look at some easier types of functions and the definition of its integral.

Definition 1.2.1 (Indicator function).

Let I be any interval. The indicator function of I is the function

𝟏I:,𝟏I(x)={1:xI0:otherwise.
Example 1.2.2.

Let I=(0,π). Then 𝟏I(x) is 1 if 0<x<π and 0 otherwise. The graph looks as follows:

Consider now e.g. the function sin:, and the product f=𝟏Isin. The graphs can be constructed as follows:

Definition 1.2.3 (Step function).

Consider a compact interval [a,b]. A function f:[a,b] is called a step function if there are numbers n and a=a0<a1<<an-1<an=b and c1,,cn such that

f(x)=i=1nci𝟏[ai-1,ai)(x),x[a,b].
Exercise L.

What is the relationship between step functions and indicator functions?

Example 1.2.4.

Consider a step function defined as follows:

f:[0,10]f(x)=i=1ni𝟏[i-1,i)(x).

Draw its graph.

What is the area under the graph?

Exercise W1.3.

Define an interesting step function, draw its graph and compute the area under the graph.

Definition 1.2.5 (Integral of a step function).

Let [a,b] be a compact interval and f:[a,b] a step function, with notation as in Definition 1.2.3. Then the integral of the step function f is defined as

abf(x)dx:=i=1nci(ai-ai-1).
Remark 1.2.6.

Often we are not too fussy about the boundary or “jump” points. Here we considered right-continuous jumps, but one might equally well consider left continuous jumps, i.e., sums of functions 𝟏(ai-1,ai], or a mix of left and right-continuous ones, e.g.

f(x)=c1𝟏[a0,a1]+c2𝟏(a1,a2)+c3𝟏[a2,a3)+c4𝟏[a3,a4]

will also count as a step function, again with integral

abf(x)dx:=i=14ci(ai-ai-1).

The motivation behind this generalisation is that the area of a rectangle remains the same regardless of whether or not the boundary is included.

Remark 1.2.7.

It is obvious from the definition that, if f,g:[a,b] are two step functions with the same interval subdivision, then f+g is also a step function with the same interval subdivision and

abf(x)dx+abg(x)dx=ab(f(x)+g(x))dx,

but what about mutually different subdivisions for f and g?

Comment: Whenever you read “obvious”, “evident”, “clear” or “straight-forward” in maths, an alarm bell should ring in your mind and you should verify for yourself if and why it is really “obvious”!

Lemma 1.2.8.

Given two step functions f,g:[a,b]R such that

f(x)g(x),x[a,b].

Then

abf(x)dxabg(x)dx.
Proof.

Given a step function f, it can be written as

f(x)=i=1nci𝟏[ai-1,ai)(x),x[a,b].

We can subdivide every interval [ai-1,ai) into several smaller subintervals

[ai-1,ai)=[ai-1,α1)[α1,α2)[αk,ai),

if ai-1<α1<α2<<αk<ai, and

𝟏[ai-1,ai)=𝟏[ai-1,α1)+𝟏[α1,α2)++𝟏[αk,ai)

This way we can find a common subdivision for f and g, so from now on we can simply assume without loss of generality that they are already presented with such a common subdivision, namely

f(x)=i=1nci𝟏[ai-1,ai)(x),g(x)=i=1nci𝟏[ai-1,ai)(x),x[a,b].

Comment: Why can we assume this if initially it was not the case? In maths, we often say “without loss of generality”, abbreviated “w.l.o.g.”, when making such an assumption that need not be fulfiled in the first place but can be achieved by a very simple transformation without losing any essential properties; then often details are not provided by the writer, but you should carefully verify for yourself that the argument really works in all generality.

Since f(x)g(x), for all x[a,b], we see that cici, for all i=1,n. Then

abf(x)dx=i=1nci(ai-ai-1)i=1nci(ai-ai-1)=abg(x)dx.

Key idea of proof.

split the steps in the step function into smaller steps in order to find common subdivion for f and g

We can now return to Remark 1.2.7:

Lemma 1.2.9.

Given two step functions f,g:[a,b]R, we have

abf(x)dx+abg(x)dx=ab(f(x)+g(x))dx.
Proof.

Exercise W1.4. ∎

Lemma 1.2.10.

Given a step function f:[a,b]R and λ>0 such that

0f(x)λ(b-a),x[a,b].

Then

0abf(x)dxλ.
Proof.

Exercise A1.1. ∎

Exercise A1.2.

Consider a set A which need not be an interval.

  • (1)

    What would be the best definition of an indicator function 𝟏A for the set A?

  • (2)

    Provide a non-trivial example of such an A and 𝟏A and draw the corresponding graph.

  • (3)

    How would you define the integral for 𝟏A? Would you like to make special assumptions on A? Which ones and why?

  • (4)

    Use step (3) to compute the integral of your example function 𝟏A in (2), providing all details of your computation.

The integral of a step function is very easy to compute: we just have to add up the the areas of squares of height ci and width (ai-ai-1). In order to define and compute the area under an arbitrary graph, it could therefore be appropriate to approximate a continuous function by step functions and this way approximate the area.

Key idea of construction.

Given a continuous function f:[a,b], we can recursively bisect the interval [a,b] and find upper and lower approximating step functions. The following picture shows how this works:

We notice that, as the number n of bisections increases,

  • the distance between blue (full) and red (dashed) lines decreases,

  • the distance between these lines and the graph of interest decreases,

  • the steps of upper and lower step functions become smaller.

In order to work with this, we should introduce proper notation:

Definition 1.2.11.

Given a continuous function f:[a,b], its upper approximating step function after n bisections is defined as

u(f,[a,b],n,x)=i=12nmaxy[ai-1,ai]f(y)𝟏[ai-1,ai)(x),x[a,b],

where ai=a+i2n(b-a), for i=0,,2n. Its lower approximating step function after n bisections is defined as

(f,[a,b],n,x)=i=12nminy[ai-1,ai]f(y)𝟏[ai-1,ai)(x),x[a,b],

where ai=a+i2n(b-a), for i=0,,2n.

Notice this is well-defined as a continuous function f on a compact interval [ai-1,ai] attains its infimum and supremum, and they coincide with the minimum and maximum, respectively (see MATH113).

Exercise W2.2.

Compute 02sin(x)dx approximately using the integral of upper and lower step functions with up to n=3 bisections. Explain in detail what you are doing and what is happening.

Exercise X.

Do the same for 02x3dx.

We now know the following:

  • the approximating step functions approximate f;

  • the integral of the approximating step functions can be computed;

  • so: use the approximating step functions to approximate and actually define the integral f.

Let us use the following notation:

un(f):= abu(f,[a,b],n,x)dx
n(f):= ab(f,[a,b],n,x)dx,

for every n. These are the integrals of the upper and lower approximating step functions of f.

Theorem 1.2.12 (Integral of a continuous function).

Let [a,b]R be a compact interval and f:[a,b]R a continuous function. Then the sequences (un(f))nN and (n(f))nN converge to the same limit, which we call the integral of the continuous function f:

abf(x)dx:=limnun(f)=limnn(f).
Remark 1.2.13.

Is this well-defined? For continuous step functions we now seem to have two definitions of the integral, so are they compatible? Good point! The only continuous step functions are the constant functions, i.e., there is λ such that f(x)=λ, for all x[a,b]. As a step function, the integral of f is therefore λ(b-a). As a continuous function, we consider the upper and lower approximating step functions: since supy[a,b]f(y)=infy[a,b]f(y)=λ, we find that those approximating step functions coincide with f, so that un(f)=n(f)=λ(b-a), for all n. Therefore, as a continuous function, the integral of f is limnun(f)=λ(b-a), so the two definitions coincide and there is no conflict.

Proof of Theorem 1.2.12.

We split the proof into two main steps. As a first step, we notice from the definition of u(f,[a,b],n,x) that

u(f,[a,b],n+1,x)u(f,[a,b],n,x),x[a,b],n,

because

maxy[a2k,a2k+1]f(y)+maxy[a2k+1,a2k+2]f(y) 2maxy[a2k,a2k+2]f(y).

for all k=1,,2n-1. Then by Lemma 1.2.8 we get un+1(f)un(f), for all n. This means that (un(f))n is a decreasing sequence which is bounded below by 1(f). According to MATH113, (un(f))n must therefore converge to some number u(f).

Analogously one shows that (n(f))n is increasing and bounded above by u1(f), and therefore converges to some number (f). Since, according to Lemma 1.2.8, n(f)un(f), for every n, we have (f)u(f) again according to a theorem from MATH113.

The second step is to show that (f)=u(f), or in other words u(f)-(f)=0. The right way to show this is to go back to the definition of convergence: we have to show that

for every ε>0 there is N such that un(f)-n(f)<ε for all n>N. (*)

Now we know from Corollary 1.1.8 that f is uniformly continuous, so, for every ε>0, there is δ>0 such that

whenever x1,x2[a,b] and |x1-x2|<δ then |f(x1)-f(x2)|<εb-a. (**)

Now choose N such that

b-a2Nδ.

For every n, consider the n-th bisection of [a,b], which consists of 2n intervals of length b-a2n. On each of those intervals I, u(f,[a,b],n,x) is the maximum maxyI¯f(y) if xI, while (f,[a,b],n,x) is the minimum minyI¯f(y), where I¯ denotes the closure of I (adding the boundary points of I if I was not closed). Now if n>N then

b-a2n<b-a2Nδ.

Suppose that x1,x2I¯ are the points where f restricted to I¯ attains its minimum and maximum, respectively. Then

(f,[a,b],n,x)=f(x1),u(f,[a,b],n,x)=f(x2),xI

Since x1,x2I¯, we have |x1-x2|b-a2n<δ and therefore by (**)

u(f,[a,b],n,x)-(f,[a,b],n,x)=f(x2)-f(x1)<εb-a,xI.

The construction does not depend on the choice of I and works the same for each of the 2n intervals arising from bisection, so we get that

u(f,[a,b],n,)-(f,[a,b],n,)

is a step function on [a,b] which is bounded below by 0 and above by εb-a, for all n>N. By Lemma 1.2.10, we have

un(f)-n(f)=ab(u(f,[a,b],n,x)-(f,[a,b],n,))dx<εb-a(b-a)=ε,

for all n>N, which proves (*). ∎

Key idea of proof.

show first that (un(f))n decreases, (n(f))n increases, and then that (un(f)-n(f))n tends to 0; show how to choose N depending on ε

Exercise A2.2.

Write an essay on the construction of the integral of a continuous function. Use your own words, examples and illustrations. Be mathematically correct and precise. 200-300 words, excluding mathematical symbols or pictures.

Definition 1.2.14.

A function f:[a,b] is called piecewise continuous if there are numbers n and ai, with i=0,1,,n, and a=a0<a1<a2<<an=b such that f[ai-1,ai):[ai-1,ai) is continuous, for every i. In this case the integral of the piecewise continuous function f is defined as

abf(x)dx=i=1nai-1aif[ai-1,ai)(x)dx.

Again we do not want to be too precise about the shape of the intervals [ai-1,ai) and allow them to be chosen open, closed, half-open,…, see Remark 1.2.6.

Example 1.2.15.

Consider the function

f:[-2,2]f(x)={x+1:x<0x-1:x0.

We include the upper and lower approximating step functions for each of the two continuous pieces of f, say f1:=f[-2,0) and f2:=f[0,2]. Then

u0(f1)= 2,0(f1)=-2,
u1(f1)= 1,1(f1)=-1,
u2(f1)= 12,2(f1)=-12,
un(f1)= 21-n,n(f1)=-21-n

so

un(f1),n(f1)0,n

proving

-20f1(x)dx=0.

We proceed similarly to find 02f2(x)dx=0, so

-22f(x)dx=-20f1(x)dx+02f2(x)dx=0.