# A more intuitive way of constructing bump functions

This is a short note on creating bump functions, test functions which are $1$ on the desired domain, etc. I will be working in one dimension. However, all these results can be generalized to higher dimensions by using polar coordinates.

As we know, the function $f(x)= e^{-\frac{1}{x}}$ for $x\geq 0$ and $0$ for $x\leq 0$ is a smooth function. Hence, it is an ideal candidate for constructing smooth, compactly supported functions. If we wanted to construct a smooth function that was supported on $[a,b]$, then $f(x-a)f(-x-b)$ is one such function.

However, the main difficulty is in constructing a bump function of the desired shape. How do we construct a bump function that is $\equiv 1$ on $[c,d]\subset [a,b]$? The idea that I had, which is different from the literature that I’ve consulted (including Lee’s “Smooth Manifolds”), is that we could consider the integrals of functions.

Consider $\int_0^{\infty} f(x-a)f(-x-c)-f(x-d)f(-x-b) dx$.

Basically, it we are integrating a function that is positive on $[a,c]$, and then adding that to the integral of the negative of the same function, but now supported on $[d,b]$.

This function will be constant on $[c,d]$, and then decrease to $0$ on $[d,b]$. On re-scaling (multiplying by a constant), we can obtain a bump function on $[a,b]$ that is $1$ on $[c,d]$.