I've only seen the bump function $e^\frac1{x^2-1}$ so far. Where could I find examples of functions $C^∞$ on $\mathbb{R}$ that are zero everywhere except on $(-1,1)$?

Are there others that do not involve the exponential function? Are there any with a closed form integral? Is there a preferred function?

  • $\begingroup$ This question would be better if it were worded more precisely, for example by including the information in the first sentence of Robert Israel's answer below. $\endgroup$ – Greg Martin Jan 23 '12 at 6:06

Presumably what you want is a function that is $C^\infty$ on $\mathbb R$, nonzero on $(-1,1)$ and zero elsewhere. It's convenient to use something involving the exponential function because it's nonzero everywhere but goes to faster than any polynomial at $-\infty$ and it's easy to differentiate. If you really want to avoid the exponential function, you might try something like $$\frac{1}{I_0(1/(1-x^2))}$$ for $-1 < x < 1$ where $I_0$ is a modified Bessel function of order $0$.

For an example that has a closed-form antiderivative, you might try $$ \frac{\left( {x}^{2}+1 \right)\ {{\rm e}^{{\frac {4x}{{x}^{2}-1}}}}}{\left( \left( {x}^{2}-1 \right) \left( 1+{{\rm e}^{{\frac {4x}{{x}^{ 2}-1}}}} \right)\right)^2} $$

  • $\begingroup$ +1 Nice antiderivative. How did you come up with it? $\endgroup$ – jnm2 Jan 23 '12 at 13:29
  • 2
    $\begingroup$ I worked backwards: start with a nice "ramp" function and take its derivative. $\endgroup$ – Robert Israel Jan 23 '12 at 17:26
  • 2
    $\begingroup$ Funny, I wanted a ramp function so my first idea was to integrate a bump function. Therefore this question. ;-) $\endgroup$ – jnm2 Jan 23 '12 at 22:54
  • $\begingroup$ I am curious to know whether $f(x) = e^{\frac{-1}{(x^2 -1)^2 } $ is still a bump function? It seems to me that it is. $\endgroup$ – user209663 Jun 14 '19 at 15:46

There is even simpler example from this book of Loring Tu.

You simply start with $$f(t)=\left\{\begin{array}{lr} 0&t\leqslant 0\\ e^{-1/t}&t>0 \end{array}\right..$$ Then you define $$g(t)=\frac{f(t)}{f(t)+f(1-t)}$$ and shift it to the right by creating $$h(t)=g(t-1).$$ To make it symmetric you put $$k(t)=h(t^2)$$ and finally to make it look like bump function you put $$\rho(t)=1-k(t).$$ It will look like this

$\hspace{4,5cm}$ enter image description here

As you can tell from the picture, Loring Tu covered more general case (he even generalised this construction to smooth manifolds of arbitrary dimension).

For more details and picutres go to Tus book.

BONUS I created plots of functions $f,g,h,k,\rho$ in this geogebra sheet. Enjoy.


All of these involve breaking up the domain by inequalities and, whether visible or not, involve something no simpler that the exponential function. The original one-sided version is $$ f(x) = e^{-1/x} \; \mbox{for} \; x > 0 $$ but $$ f(x) = 0 \; \mbox{for} \; x \leq 0. $$

You can get a bump from this by multiplication with $$ g(x) = f( 1 + x) \cdot f(1 - x) $$

You get a smoothed step function from $$ h(x) = \int_{- \infty}^x \; g(t) dt $$

You get a plateau bump function, constant in the middle, from $$ p(x) = h(x + A) \cdot h(A -x) $$ for some $A > 1.$

We can prove some properties of this sort of thing. It has no removable singularity at the points where it is not real analytic, at best it has an essential singularity or possibly is not even defined in any neighborhood of the point in $\mathbb C.$

  • $\begingroup$ Can we construct $\rho$ such that up to its $p$th derivatives, where $p\in\mathbb{N},$ are controlled by prescribed constants? $\endgroup$ – Idonknow Dec 28 '17 at 16:04

Here's how you can generate as many different kinds of bump functions as you want, for whatever definition of "kind" you may have:

  1. Start with any function $f(x)$ that grows faster than all polynomials, i.e. $\forall N, \ \lim_{x\to\infty}\frac{x^N}{f(x)}=0$. Example: $e^x$.
  2. Then consider the function $g(x)=\frac1{f(1/x)}$. This is a function that is flatter than all polynomials near zero, i.e. $\forall N,\ \lim_{x\to0}\frac{g(x)}{x^N}=0$. This is a a smooth non-analytic function. For our example, we get $e^{-1/x}$.
  3. Consider the function $h(x)=g(1+x)g(1-x)$. This, after zeroing out stuff outside the interval $(-1,1)$, is a bump function. For our example, $e^{2/(x^2-1)}$.
  4. Scale and transform to your liking.

Just do this with different "kinds" of growth functions $f$, and you'll get different "kinds" of bump functions $h$. So here are some functions I could generate with this method -- try to guess which functions they're from:

$$\begin{array}{l} h(x) = {e^{2/({x^2} - 1)}} \\ h(x) = (1 + x)^{1/(1 + x)}(1 - x)^{1/(1 - x)} \\ h(x) = \frac1{\frac1{1 + x}!\frac1{1-x}!} \\ h(x)=e^{-[\ln^2(1+x)+\ln^2(1-x)]} \end{array}$$

And the more rapidly your $f(x)$ grows, the nicer your bump function $h(x)$ looks.

Here's a Desmos applet to try this with different functions $f$: desmos.com/calculator/ccf2goi9bj.

If you're interested in smooth non-analytic functions, have a look at my post What's with e^(-1/x)? On smooth non-analytic functions: part I.


Seems to me that if you take the second derivative of a bump function you get another bump function, which should be not so hard to show. In fact all even derivatives are bump functions. Then you linearly transform them (shift in the x or y axis and/or rescale the axes) to fit your criteria.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.