Constructing a smooth characteristic function

AxiomOfChoice
Constructing a "smooth" characteristic function

Suppose I'd like to construct a $C^\infty$ generalization of a characteristic function, $f(x): \mathbb R \to \mathbb R$, as follows: I want $f$ to be 1 for, say, $x\in (a,b)$, zero for $x < a-\delta$ and $b > x + \delta$, and I want it to be $C^\infty$ on $\mathbb R$. How do I know I can do this? Namely, how do I define the function on $[a-\delta,a]$ and $[b,b+\delta]$ to make sure this will happen?

This might be easy, but I'm not familiar enough with properties of $C^\infty$ functions to immediately see how to do this.

Last edited:

Citan Uzuki

What you're looking for is called a bump function. The key ingredient in the construction of bump functions is the following function:

$$f(x) = \begin{cases}e^{-1/x} & \text{if } x>0 \\ 0 & \text{if } x \leq 0 \end{cases}$$

It is easy to see that f is infinitely differentiable. Then consider the following functions:

$$g_1(x) = f(x-(a-\delta))f(a-x)$$
$$g_2(x) = f(x-b)f((b+\delta)-x)$$

g_1 is a smooth function which is positive on (a-δ, a) and 0 elsewhere, and g_2 is a smooth function which is positive on (b, b+δ) and 0 elsewhere. Then consider the following functions:

$$h_1(x) = \frac{\int_{a-\delta}^{x} g_1(t)\ dt}{\int_{a-\delta}^{a} g_1(t)\ dt}$$
$$h_2(x) = \frac{\int_{b}^{x} g_2(t)\ dt}{\int_{b}^{b+\delta} g_2(t)\ dt}$$

h_1 and h_2 are smooth functions from R into [0, 1], h_1 is 0 for x<a-δ and 1 for x>a, and h_2 is 0 for x<b and 1 for x>b+δ. Finally, the function h=h_1 - h_2 is the bump function you're looking for.