Examples of smooth functions 1

646 Views Asked by At

I am trying to understand smooth functions. My question is what is an example of a smooth function $f\colon\mathbb{R}\to\mathbb{R}$ such that $f(x)=0$ for all $x\leqslant-1$ and $x\geqslant1$, but $f(0)=1$?

And similarly, what about an example of a smooth function $f\colon\mathbb{R}\to\mathbb{R}$ where $f'(x)=-1$ for all $x\leqslant-1$ and $f'(x)=1$ for all $x\geqslant1$?

2

There are 2 best solutions below

0
On

You just have to look for a function $$f(x)=0$$ on the interval $$(-\infty ,-1]\cup [1,\infty) $$ and extend it with continuity on $$(-1,1)$$ by imposing $$f(-1)=f(1)=0$$,$$f(0)=1$$ and $$f'(-1)=f'(1)=0$$.

Since $$f(x)=0$$ is continuous in $(-\infty ,-1]\cup [1,\infty) $ and also is its derivative, you just have to ensure to pick a function accordingly to the conditions above that is continuous on $$(-1,1)$$ with continuous derivative.

Similarly for second request you just have to find the proper function to extend with continuity your function in the interval $$(-1,1)$$

0
On

The best examples comes from the study of mollifiers. Mollifiers are used to find smooth approximations to well known cut off functions such as $sgn(x)$, and the heaviside function.

A standard example is $\varphi(x) = e^{-1/(1-|x|)}$. This will fit the bill for your first question as long as you normalise it by multiplying by $e$.

enter image description here