Define a bump function to be a smooth (infinitely differentiable / $C^\infty$) function from $\mathbb R$ to $\mathbb R$ with finite support. Preferably, support on some interval $(l, r)$. The only example of a bump function I know is this:
$$ f(x) \equiv \begin{cases} \exp(-1/(1 - x^2)) & x \in (-1, 1) \\ 0 & \text{otherwise} \end{cases} $$
However, I feel that there must be a simpler way to do this. Here are two ideas:
A. Smoothing out a continuous function
- Take a continuous function to smooth out, such as $f(x) = max(0, 1 - |x|)$ (desmos):
- "smooth it out" by some procedure, which takes this continuous function and makes it smooth.
B. Damping the Gaussian
- Start with the gaussian, which is smooth but has infinite support.
- Do something to "kill" the value of the gaussian outside of a finite region, say $(-10,10)$ in a smooth way.
Questions
- Can A and B be made to work?
- If not, is there some proof that it's impossible to construct bump functions using the above ideas?