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 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 obviously 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 following chapter shows that this is true.
In order to write down the definition of a bump function more shortly, we need the following two definitions:
Now we are ready to define a bump function in a brief way:
These two properties make the function really look like a bump, as the following example shows:
The standard mollifier

in dimension

Example 3.4: The standard mollifier
, given by

, where
, is a bump function (see exercise 2).
As for the bump functions, in order to write down the definition of Schwartz functions shortly, we first need two helpful definitions.
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[edit | edit source]
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
:

Therefore the sequence converges with respect to the notion of convergence for Schwartz functions.
The ‘testing’ property of test functions[edit | edit source]
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:


In order 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,
. An analogous reasoning also shows that
. 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.
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.