Bump function

From HandWiki
Revision as of 18:00, 6 February 2024 by WikiG (talk | contribs) (change)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Short description: Smooth and compactly supported function
The graph of the bump function [math]\displaystyle{ (x, y) \in \Reals^2 \mapsto \Psi(r), }[/math] where [math]\displaystyle{ r = \left(x^2 + y^2\right)^{1/2} }[/math] and [math]\displaystyle{ \Psi(r) = e^{-1/(1 - r^2)} \cdot \mathbf{1}_{\{|r|\lt 1\}}. }[/math]

In mathematics, a bump function (also called a test function) is a function [math]\displaystyle{ f : \Reals^n \to \Reals }[/math] on a Euclidean space [math]\displaystyle{ \Reals^n }[/math] which is both smooth (in the sense of having continuous derivatives of all orders) and compactly supported. The set of all bump functions with domain [math]\displaystyle{ \Reals^n }[/math] forms a vector space, denoted [math]\displaystyle{ \mathrm{C}^\infty_0(\Reals^n) }[/math] or [math]\displaystyle{ \mathrm{C}^\infty_\mathrm{c}(\Reals^n). }[/math] The dual space of this space endowed with a suitable topology is the space of distributions.

Examples

The 1d bump function [math]\displaystyle{ \Psi(x). }[/math]

The function [math]\displaystyle{ \Psi : \Reals \to \Reals }[/math] given by [math]\displaystyle{ \Psi(x) = \begin{cases} \exp\left( -\frac{1}{1 - x^2}\right), & x \in (-1,1) \\ 0, & \text{otherwise} \end{cases} = \exp\left( -\frac{1}{1 - \min(1, x^2)} \right) }[/math] is an example of a bump function in one dimension. It is clear from the construction that this function has compact support, since a function of the real line has compact support if and only if it has bounded closed support. The proof of smoothness follows along the same lines as for the related function discussed in the Non-analytic smooth function article. This function can be interpreted as the Gaussian function [math]\displaystyle{ \exp\left(-y^2\right) }[/math] scaled to fit into the unit disc: the substitution [math]\displaystyle{ y^2 = {1} / {\left(1 - x^2\right)} }[/math] corresponds to sending [math]\displaystyle{ x = \pm 1 }[/math] to [math]\displaystyle{ y = \infty. }[/math]

A simple example of a (square) bump function in [math]\displaystyle{ n }[/math] variables is obtained by taking the product of [math]\displaystyle{ n }[/math] copies of the above bump function in one variable, so [math]\displaystyle{ \Phi(x_1, x_2, \dots, x_n) = \Psi(x_1) \Psi(x_2) \cdots \Psi(x_n). }[/math]

Smooth transition functions

The non-analytic smooth function f(x) considered in the article.

Consider the function

[math]\displaystyle{ f(x)=\begin{cases}e^{-\frac{1}{x}}&\text{if }x\gt 0,\\ 0&\text{if }x\le0,\end{cases} }[/math]

defined for every real number x.


The smooth transition g from 0 to 1 defined here.

The function

[math]\displaystyle{ g(x)=\frac{f(x)}{f(x)+f(1-x)},\qquad x\in\mathbb{R}, }[/math]

has a strictly positive denominator everywhere on the real line, hence g is also smooth. Furthermore, g(x) = 0 for x ≤ 0 and g(x) = 1 for x ≥ 1, hence it provides a smooth transition from the level 0 to the level 1 in the unit interval [0, 1]. To have the smooth transition in the real interval [a, b] with a < b, consider the function

[math]\displaystyle{ \mathbb{R}\ni x\mapsto g\Bigl(\frac{x-a}{b-a}\Bigr). }[/math]

For real numbers a < b < c < d, the smooth function

[math]\displaystyle{ \mathbb{R}\ni x\mapsto g\Bigl(\frac{x-a}{b-a}\Bigr)\,g\Bigl(\frac{d-x}{d-c}\Bigr) }[/math]

equals 1 on the closed interval [b, c] and vanishes outside the open interval (a, d), hence it can serve as a bump function.

Caution must be taken since, as example, taking [math]\displaystyle{ \{a =-1\} \lt \{b = c =0\} \lt \{d=1\} }[/math], leads to:

[math]\displaystyle{ q(x)=\frac{1}{1+e^{\frac{1-2|x|}{x^2-|x|}}} }[/math]

which is not a infinitely differentiable function (so, is not "smooth"), so the constraints a < b < c < d must be strictly fulfilled.

Some interesting facts about the function:

[math]\displaystyle{ q(x,a)=\frac{1}{1+e^{\frac{a(1-2|x|)}{x^2-|x|}}} }[/math]

Are that [math]\displaystyle{ q\left(x,\frac{\sqrt{3}}{2}\right) }[/math] make smooth transition curves with "almost" constant slope edges (behaves like inclined straight lines on a non-zero measure interval).

A proper example of a Bump function will be:

[math]\displaystyle{ u(x)=\begin{cases}\frac{1}{1+e^{\frac{1-2|x|}{x^2-|x|}}}&\text{if }|x|\lt 1,\\ 0&\text{if }|x|\geq 1,\end{cases} }[/math]

A proper example of a smooth transition function will be:

[math]\displaystyle{ w(x)=\begin{cases}\frac{1}{1+e^{\frac{2x-1}{x^2-x}}}&\text{if }0\lt x\lt 1,\\ 0&\text{if } x\leq 0,\\ 1&\text{if } x\geq 1,\end{cases} }[/math]

where could be noticed that it can be represented also through Hyperbolic functions:

[math]\displaystyle{ \frac{1}{1+e^{\frac{2x-1}{x^2-x}}} = \frac{1}{2}\left( 1-\tanh\left(\frac{2x-1}{2(x^2-x)} \right) \right) }[/math]

Existence of bump functions

An illustration of the sets in the construction.

It is possible to construct bump functions "to specifications". Stated formally, if [math]\displaystyle{ K }[/math] is an arbitrary compact set in [math]\displaystyle{ n }[/math] dimensions and [math]\displaystyle{ U }[/math] is an open set containing [math]\displaystyle{ K, }[/math] there exists a bump function [math]\displaystyle{ \phi }[/math] which is [math]\displaystyle{ 1 }[/math] on [math]\displaystyle{ K }[/math] and [math]\displaystyle{ 0 }[/math] outside of [math]\displaystyle{ U. }[/math] Since [math]\displaystyle{ U }[/math] can be taken to be a very small neighborhood of [math]\displaystyle{ K, }[/math] this amounts to being able to construct a function that is [math]\displaystyle{ 1 }[/math] on [math]\displaystyle{ K }[/math] and falls off rapidly to [math]\displaystyle{ 0 }[/math] outside of [math]\displaystyle{ K, }[/math] while still being smooth.

Bump functions defined in terms of convolution

The construction proceeds as follows. One considers a compact neighborhood [math]\displaystyle{ V }[/math] of [math]\displaystyle{ K }[/math] contained in [math]\displaystyle{ U, }[/math] so [math]\displaystyle{ K \subseteq V^\circ\subseteq V \subseteq U. }[/math] The characteristic function [math]\displaystyle{ \chi_V }[/math] of [math]\displaystyle{ V }[/math] will be equal to [math]\displaystyle{ 1 }[/math] on [math]\displaystyle{ V }[/math] and [math]\displaystyle{ 0 }[/math] outside of [math]\displaystyle{ V, }[/math] so in particular, it will be [math]\displaystyle{ 1 }[/math] on [math]\displaystyle{ K }[/math] and [math]\displaystyle{ 0 }[/math] outside of [math]\displaystyle{ U. }[/math] This function is not smooth however. The key idea is to smooth [math]\displaystyle{ \chi_V }[/math] a bit, by taking the convolution of [math]\displaystyle{ \chi_V }[/math] with a mollifier. The latter is just a bump function with a very small support and whose integral is [math]\displaystyle{ 1. }[/math] Such a mollifier can be obtained, for example, by taking the bump function [math]\displaystyle{ \Phi }[/math] from the previous section and performing appropriate scalings.

Bump functions defined in terms of a function [math]\displaystyle{ c : \Reals \to [0, \infty) }[/math] with support [math]\displaystyle{ (-\infty, 0] }[/math]

An alternative construction that does not involve convolution is now detailed. It begins by constructing a smooth function [math]\displaystyle{ f : \Reals^n \to \Reals }[/math] that is positive on a given open subset [math]\displaystyle{ U \subseteq \Reals^n }[/math] and vanishes off of [math]\displaystyle{ U. }[/math][1] This function's support is equal to the closure [math]\displaystyle{ \overline{U} }[/math] of [math]\displaystyle{ U }[/math] in [math]\displaystyle{ \Reals^n, }[/math] so if [math]\displaystyle{ \overline{U} }[/math] is compact, then [math]\displaystyle{ f }[/math] is a bump function.

Start with any smooth function [math]\displaystyle{ c : \Reals \to \Reals }[/math] that vanishes on the negative reals and is positive on the positive reals (that is, [math]\displaystyle{ c = 0 }[/math] on [math]\displaystyle{ (-\infty, 0) }[/math] and [math]\displaystyle{ c \gt 0 }[/math] on [math]\displaystyle{ (0, \infty), }[/math] where continuity from the left necessitates [math]\displaystyle{ c(0) = 0 }[/math]); an example of such a function is [math]\displaystyle{ c(x) := e^{-1/x} }[/math] for [math]\displaystyle{ x \gt 0 }[/math] and [math]\displaystyle{ c(x) := 0 }[/math] otherwise.[1] Fix an open subset [math]\displaystyle{ U }[/math] of [math]\displaystyle{ \Reals^n }[/math] and denote the usual Euclidean norm by [math]\displaystyle{ \|\cdot\| }[/math] (so [math]\displaystyle{ \Reals^n }[/math] is endowed with the usual Euclidean metric). The following construction defines a smooth function [math]\displaystyle{ f : \Reals^n \to \Reals }[/math] that is positive on [math]\displaystyle{ U }[/math] and vanishes outside of [math]\displaystyle{ U. }[/math][1] So in particular, if [math]\displaystyle{ U }[/math] is relatively compact then this function [math]\displaystyle{ f }[/math] will be a bump function.

If [math]\displaystyle{ U = \Reals^n }[/math] then let [math]\displaystyle{ f = 1 }[/math] while if [math]\displaystyle{ U = \varnothing }[/math] then let [math]\displaystyle{ f = 0 }[/math]; so assume [math]\displaystyle{ U }[/math] is neither of these. Let [math]\displaystyle{ \left(U_k\right)_{k=1}^\infty }[/math] be an open cover of [math]\displaystyle{ U }[/math] by open balls where the open ball [math]\displaystyle{ U_k }[/math] has radius [math]\displaystyle{ r_k \gt 0 }[/math] and center [math]\displaystyle{ a_k \in U. }[/math] Then the map [math]\displaystyle{ f_k : \Reals^n \to \Reals }[/math] defined by [math]\displaystyle{ f_k(x) = c\left(r_k^2 - \left\|x - a_k\right\|^2\right) }[/math] is a smooth function that is positive on [math]\displaystyle{ U_k }[/math] and vanishes off of [math]\displaystyle{ U_k. }[/math][1] For every [math]\displaystyle{ k \in \mathbb{N}, }[/math] let [math]\displaystyle{ M_k = \sup \left\{\left|\frac{\partial^p f_k}{\partial^{p_1} x_1 \cdots \partial^{p_n} x_n}(x)\right| ~:~ x \in \Reals^n \text{ and } p_1, \ldots, p_n \in \Z \text{ satisfy } 0 \leq p_i \leq k \text{ and } p = \sum_i p_i\right\}, }[/math] where this supremum is not equal to [math]\displaystyle{ +\infty }[/math] (so [math]\displaystyle{ M_k }[/math] is a non-negative real number) because [math]\displaystyle{ \left(\Reals^n \setminus U_k\right) \cup \overline{U_k} = \Reals^n, }[/math] the partial derivatives all vanish (equal [math]\displaystyle{ 0 }[/math]) at any [math]\displaystyle{ x }[/math] outside of [math]\displaystyle{ U_k, }[/math] while on the compact set [math]\displaystyle{ \overline{U_k}, }[/math] the values of each of the (finitely many) partial derivatives are (uniformly) bounded above by some non-negative real number.[note 1] The series [math]\displaystyle{ f ~:=~ \sum_{k=1}^{\infty} \frac{f_k}{2^k M_k} }[/math] converges uniformly on [math]\displaystyle{ \Reals^n }[/math] to a smooth function [math]\displaystyle{ f : \Reals^n \to \Reals }[/math] that is positive on [math]\displaystyle{ U }[/math] and vanishes off of [math]\displaystyle{ U. }[/math][1] Moreover, for any non-negative integers [math]\displaystyle{ p_1, \ldots, p_n \in \Z, }[/math][1] [math]\displaystyle{ \frac{\partial^{p_1+\cdots+p_n}}{\partial^{p_1} x_1 \cdots \partial^{p_n} x_n} f ~=~ \sum_{k=1}^{\infty} \frac{1}{2^k M_k} \frac{\partial^{p_1+\cdots+p_n} f_k}{\partial^{p_1} x_1 \cdots \partial^{p_n} x_n} }[/math] where this series also converges uniformly on [math]\displaystyle{ \Reals^n }[/math] (because whenever [math]\displaystyle{ k \geq p_1 + \cdots + p_n }[/math] then the [math]\displaystyle{ k }[/math]th term's absolute value is [math]\displaystyle{ \leq \tfrac{M_k}{2^k M_k} = \tfrac{1}{2^k} }[/math]). This completes the construction.

As a corollary, given two disjoint closed subsets [math]\displaystyle{ A, B }[/math] of [math]\displaystyle{ \Reals^n, }[/math] the above construction guarantees the existence of smooth non-negative functions [math]\displaystyle{ f_A, f_B : \Reals^n \to [0, \infty) }[/math] such that for any [math]\displaystyle{ x \in \Reals^n, }[/math] [math]\displaystyle{ f_A(x) = 0 }[/math] if and only if [math]\displaystyle{ x \in A, }[/math] and similarly, [math]\displaystyle{ f_B(x) = 0 }[/math] if and only if [math]\displaystyle{ x \in B, }[/math] then the function [math]\displaystyle{ h ~:=~ \frac{f_A}{f_A + f_B} : \Reals^n \to [0, 1] }[/math] is smooth and for any [math]\displaystyle{ x \in \Reals^n, }[/math] [math]\displaystyle{ h(x) = 0 }[/math] if and only if [math]\displaystyle{ x \in A, }[/math] [math]\displaystyle{ h(x) = 1 }[/math] if and only if [math]\displaystyle{ x \in B, }[/math] and [math]\displaystyle{ 0 \lt h(x) \lt 1 }[/math] if and only if [math]\displaystyle{ x \not\in A \cup B. }[/math][1] In particular, [math]\displaystyle{ h(x) \neq 0 }[/math] if and only if [math]\displaystyle{ x \in \Reals^n \smallsetminus A, }[/math] so if in addition [math]\displaystyle{ U := \Reals^n \smallsetminus A }[/math] is relatively compact in [math]\displaystyle{ \Reals^n }[/math] (where [math]\displaystyle{ A \cap B = \varnothing }[/math] implies [math]\displaystyle{ B \subseteq U }[/math]) then [math]\displaystyle{ h }[/math] will be a smooth bump function with support in [math]\displaystyle{ \overline{U}. }[/math]

Properties and uses

While bump functions are smooth, the identity theorem prohibits their being analytic unless they vanish identically. Bump functions are often used as mollifiers, as smooth cutoff functions, and to form smooth partitions of unity. They are the most common class of test functions used in analysis. The space of bump functions is closed under many operations. For instance, the sum, product, or convolution of two bump functions is again a bump function, and any differential operator with smooth coefficients, when applied to a bump function, will produce another bump function.

If the boundaries of the Bump function domain is [math]\displaystyle{ \partial x, }[/math] to fulfill the requirement of "smoothness", it has to preserve the continuity of all its derivatives, which leads to the following requirement at the boundaries of its domain: [math]\displaystyle{ \lim_{x \to \partial x^\pm} \frac{d^n}{dx^n} f(x) = 0,\,\text { for all } n \geq 0, \,n \in \Z }[/math]

The Fourier transform of a bump function is a (real) analytic function, and it can be extended to the whole complex plane: hence it cannot be compactly supported unless it is zero, since the only entire analytic bump function is the zero function (see Paley–Wiener theorem and Liouville's theorem). Because the bump function is infinitely differentiable, its Fourier transform must decay faster than any finite power of [math]\displaystyle{ 1/k }[/math] for a large angular frequency [math]\displaystyle{ |k|. }[/math][2] The Fourier transform of the particular bump function [math]\displaystyle{ \Psi(x) = e^{-1/(1-x^2)} \mathbf{1}_{\{|x|\lt 1\}} }[/math] from above can be analyzed by a saddle-point method, and decays asymptotically as [math]\displaystyle{ |k|^{-3/4} e^{-\sqrt{|k|}} }[/math] for large [math]\displaystyle{ |k|. }[/math][3]

See also

Citations

  1. The partial derivatives [math]\displaystyle{ \frac{\partial^p f_k}{\partial^{p_1} x_1 \cdots \partial^{p_n} x_n} : \Reals^n \to \Reals }[/math] are continuous functions so the image of the compact subset [math]\displaystyle{ \overline{U_k} }[/math] is a compact subset of [math]\displaystyle{ \Reals. }[/math] The supremum is over all non-negative integers [math]\displaystyle{ 0 \leq p = p_1 + \cdots + p_n \leq k }[/math] where because [math]\displaystyle{ k }[/math] and [math]\displaystyle{ n }[/math] are fixed, this supremum is taken over only finitely many partial derivatives, which is why [math]\displaystyle{ M_k \lt \infty. }[/math]
  1. 1.0 1.1 1.2 1.3 1.4 1.5 1.6 Nestruev 2020, pp. 13-16.
  2. K. O. Mead and L. M. Delves, "On the convergence rate of generalized Fourier expansions," IMA J. Appl. Math., vol. 12, pp. 247–259 (1973) doi:10.1093/imamat/12.3.247.
  3. Steven G. Johnson, Saddle-point integration of C "bump" functions, arXiv:1508.04376 (2015).

References