a test function
A test function is the smooth, gentle probe that we use to interrogate a distribution. If a distribution is a measuring instrument we cannot see directly, the test function is the carefully shaped object we push into it to read off a number. To be trustworthy, the probe must be as well-behaved as possible: infinitely smooth, and confined to a bounded region so it never causes trouble far away.
Precisely, a test function is an infinitely differentiable function that vanishes outside some bounded set — it is smooth everywhere and identically zero beyond a finite range. The set of all such functions is often written D, or C-infinity-c (the smooth functions of compact support). These two properties are exactly what make distributions work. Smoothness means you can differentiate the probe as many times as you like, which is how distributions inherit infinitely many derivatives. Compact support means every pairing integral runs over a bounded region, so it always converges, and boundary terms in integration by parts vanish — the trick that defines the distributional derivative. A standard concrete example is the bump that equals exp(-1/(1 - x^2)) for x between -1 and 1 and is zero outside; it is smooth at the endpoints because every derivative of exp(-1/(1 - x^2)) tends to zero there.
Test functions matter because they carry no information of their own — they are merely the clean light we shine on a distribution. The whole strategy of the theory is to move every hard operation (differentiation, Fourier transform, multiplication by a smooth function) off the rough distribution and onto the smooth probe, where it is always legal, and then read the result back.
The classic test function is phi(x) = exp(-1/(1 - x^2)) for -1 < x < 1 and phi(x) = 0 otherwise. It is positive on a bounded interval, perfectly smooth (all derivatives exist and are continuous, even at x = plus or minus 1), and zero everywhere outside — a smooth bump with no rough edges.
Smooth plus compactly supported: the two properties that let every hard operation be shifted onto the probe.
It is not obvious that any nonzero smooth compactly supported function exists at all — a smooth function that turns off can look paradoxical. The bump above settles it, and such bumps can be glued into partitions of unity used throughout the theory.