Motivation
Before we dive deeply into the chapter, let's first motivate the notion of a test function. Let's consider two functions which are piecewise constant on the intervals
and zero elsewhere; like, for example, these two:
Let's call the left function
, and the right function
.
Of course, we can easily see that the two functions are different; they differ on the interval
; however, let's pretend that we are blind and our only way of finding out something about either function is by evaluating the integrals
and 
for functions
in a given set of functions
.
We proceed with choosing
sufficiently clever such that five evaluations of both integrals suffice to show that
. To do so, we first introduce the characteristic function. Let
be any set. The characteristic function of
is defined as

With this definition, we choose the set of functions
as

It is easy to see (see exercise 1), that for
, the expression

equals the value of
on the interval
, and the same is true for
. But as both functions are uniquely determined by their values on the intervals
(since they are zero everywhere else), we can implement the following equality test:

This needs five evaluations of each integral, as
.
Since we used the functions in
to test
and
, we call them test functions. What we ask ourselves now is if this notion generalises from functions like
and
, which are piecewise constant on certain intervals and zero everywhere else, to continuous functions. The remainder of this chapter demonstrates that this is true, using a set of test functions known as "bump functions" or a more general class of functions known as "Schwartz functions."
Bump functions
To write the definition of a bump function concisely, we first define the "support" of a function and what it means for a function to be "smooth".
Definition 3.2:
Let
. We define the support of
as

Now we are ready to define a bump function briefly:
These two properties make the function look like a bump, as the following example shows:
Example 3.4: The standard mollifier
is a bump function (see exercise 2) defined for each
by

where
.
Schwartz functions
Next, we introduce Schwartz functions, which generalize bump functions.
As with bump functions, we first introduce two definitions that help to write down the definition of Schwartz functions.
Now we are ready to define a Schwartz function.
Definition 3.7:
We call
a Schwartz function iff the following two conditions are satisfied:


By
we mean the function
.
Example 3.8:
The function

is a Schwartz function.
Theorem 3.9:
Every bump function is also a Schwartz function.
This means, for example, that the standard mollifier is a Schwartz function.
Proof:
Let
be a bump function. Then, by definition of a bump function,
. By the definition of bump functions, we choose
such that

, as in
, a set is compact iff it is closed & bounded. Further, for
arbitrary,

Convergence of bump and Schwartz functions
Now we define what convergence of a sequence of bump (Schwartz) functions to a bump (Schwartz) function means.
Definition 3.11:
We say that the sequence of Schwartz functions
converges to
iff the following condition is satisfied:

Theorem 3.12:
Let
be an arbitrary sequence of bump functions. If
with respect to the notion of convergence for bump functions, then also
with respect to the notion of convergence for Schwartz functions.
Proof:
Let
be open, and let
be a sequence in
such that
with respect to the notion of convergence of
. Let thus
be the compact set in which all the
are contained. From this also follows that
, since otherwise
, where
is any nonzero value
takes outside
; this would contradict
with respect to our notion of convergence.
In
, ‘compact’ is equivalent to ‘bounded and closed’. Therefore,
for an
. Therefore, we have for all multiindices
:

Then, since
in
,

Therefore the sequence converges with respect to the notion of convergence for Schwartz functions.
The ‘testing’ property of test functions
In this section, we want to show that we can test equality of continuous functions
by evaluating the integrals
and 
for all
(thus, evaluating the integrals for all
will also suffice as
due to theorem 3.9).
But before we are able to show that, we need a modified mollifier, where the modification is dependent of a parameter, and two lemmas about that modified mollifier.
Definition 3.13:
For
, we define
.
Lemma 3.14:
Let
. Then
.
Proof:
From the definition of
follows
.
Further, for

Therefore, and since

we have:


To prove the next lemma, we need the following theorem from integration theory:
Theorem 3.15: (Multi-dimensional integration by substitution)
If
are open, and
is a diffeomorphism, then

We will omit the proof, as understanding it is not very important for understanding this wikibook.
Lemma 3.16:
Let
. Then
.
Proof:


Now we are ready to prove the ‘testing’ property of test functions:
Theorem 3.17:
Let
be continuous. If
,
then
.
Proof:
Let
be arbitrary, and let
. Since
is continuous, there exists a
such that

Then we have

Therefore,
as
. An analogous reasoning also shows that
as
. But due to the assumption, we have

As limits in the reals are unique, it follows that
, and since
was arbitrary, we obtain
.
Remark 3.18:
Let
be continuous. If
,
then
.
Proof:
This follows from all bump functions being Schwartz functions, which is why the requirements for theorem 3.17 are met.
Exercises
Let
and
be constant on the interval
. Show that

- Prove that the standard mollifier as defined in example 3.4 is a bump function by proceeding as follows:
Prove that the function

is contained in
.
Prove that the function

is contained in
.
- Conclude that
.
- Prove that
is compact by calculating
explicitly.
- Let
be open, let
and let
. Prove that if
, then
and
.
- Let
be open, let
be bump functions and let
. Prove that
.
- Let
be Schwartz functions functions and let
. Prove that
is a Schwartz function.
- Let
, let
be a polynomial, and let
in the sense of Schwartz functions. Prove that
in the sense of Schwartz functions.