Smooth function that interpolates between constant functions

140 Views Asked by At

How can we construct a function that smoothly interpolates between constant $1$ and constant $0$? That is, find $h(x)$ smooth such that $h(x) = 1$ if $x < 1$ and $h(x) = 0$ if $x>2$. I know that we should use the function $\exp(-\frac{1}{x^2})$ but don't know exactly how.

1

There are 1 best solutions below

3
On

Let $f$ be the function define by $f(x) = 0$ if $x \leqslant 0$ and $f(x) = \exp(-1/x^2)$ if $x >0$. Show that $f$ is smooth.

Then, consider $g(x) = f(a+x)\times f(b-x)$ for suitable values of $a$ an $b$ : this function is smooth and null outside $[a,b]$.

Finally, consider $h(x) = 1/C\times\int_{-\infty}^x g(t) \mathrm{d}t$ for a suitable value of constant $C$. Show that it is an answer to your problem.