# How to cook up test functions?

Let $\Omega\subset \mathbb{R}$ be open. A test function is a $C^\infty$ function with compact support. This is a rather strong restriction, for instance, no analytic function is a test function. But $\exp(-1/x^2)\exp(-1/(x-1)^2)$ is a test function.

In general I found it difficult to construct test functions with certain properties, but this seems important in proving theorems in distribution theory. Thus I wonder whether there are good ways to cook up certain test functions.

For instance, can we have a test function that pass through finite many fixed points? Can we find a test function whose derivatives have specified values at certain points? (for instance, can we construct a test function whose first $N$ derivatives vanish but the $N+1$ derivative is large?) Given a bad function, can we smooth it to be a test function (like smooth away the sharp angles of the tent function)?

The above are some of the properties I have encountered but I am also interested in other properties. So any suggestion is helpful.

Thanks!

-
it is not difficult to construct a $C^\infty$ function $\phi$ such that (say) $\phi(x)=1$ for $|x|\leq n$ and $\phi(x)=0$ for $|x|\geq n+\epsilon$. So just take say a polynomial $f$ satisfying your conditions and multiply it by $\phi$. Smoothing can be done by convolution with a test function with a small support. –  user8268 Sep 27 '12 at 8:29

For instance, can we have a test function that pass through finite many fixed points? Can we find a test function whose derivatives have specified values at certain points? (for instance, can we construct a test function whose first N derivatives vanish but the N+1 derivative is large?)

Yes, first apply Whitney extension then smoothly cut-off. For actual constructions and such, much of the work can be traced back to Charlie Fefferman; see this article for some references.

Given a bad function, can we smooth it to be a test function (like smooth away the sharp angles of the tent function)?

Yes, convolve it against the Gaussian (or any integrable smooth function) and then smoothly cutoff (multiply against a test function).

-
It seems convolving is a good way to smooth functions, but I am not sure whether this process destroy too much information of the original function. So what kind of information is preserved through this process? –  Hui Yu Sep 27 '12 at 12:09
It depends on what you convolve against! But convolution is multiplication on the Fourier side, so you can easily preserve any information that can be encoded with bounded frequencies, for example. –  Willie Wong Sep 27 '12 at 15:19
Sorry but let me make it clear. I guess you mean the information is preserved in the sense it can be decoded again from the convoluted function. But I am wondering what properties are shared by the $f$ and $f*\phi$. Also by smoothing the tent function I hope to get a function that is pretty much like the tent function but with the corners smoothed into 'round' corners so that it is a test function. Is that possible? Thanks! –  Hui Yu Sep 27 '12 at 16:00
Like I said: any property that can be "computed" from knowing a bounded frequency portion of the function $f$ can be made to be shared (by choosing an appropriate mollifier) by $f$ and $f*\phi$. For the tent function, just convolve with a even (spherically symmetric) bump function of support width $\epsilon$. This will preserve linearity away from the corners and the resulting function would look very much like a tent function. –  Willie Wong Oct 1 '12 at 12:01

The definition of your test functions implies that they are a proper subset of the schwartz functions. These functions has some nice properties such as the fourier transformation being a linear automorphism.

-