There is any function of class $C^{\infty}$ with the following property:

$f:\mathbb{R}\to \mathbb{R}$ $$f(x)=0\ \ \ \ \ \text{iff} \ \ \ \ \ \ 0\leq x\leq 1?$$

I am wondering because of the smoothness there is any, or maybe, not a very complicated function of this type?


marked as duplicate by grand_chat, metamorphy, mrtaurho, José Carlos Santos calculus Jun 27 at 23:11

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • $\begingroup$ Hint: can you find a function $f:(0,+\infty)\to \mathbb{R}$ such that $f$ and all of its derivatives tend to $0$ as $x\to 0^+$? $\endgroup$ – Lorenzo Quarisa Jun 27 at 19:19
  • 1
    $\begingroup$ For $x>1$ set $f(x) = e^{-\frac{1}{x-1}}$ and for $x<0$ set $f(x) = e^{\frac{1}{x}}$. $\endgroup$ – Jakobian Jun 27 at 19:28
  • 1
    $\begingroup$ Try something like the function presented in math.stackexchange.com/questions/240026/… $\endgroup$ – Cleto Pereira Jun 27 at 19:38
  • $\begingroup$ @CletoPereira nice find. My example is one of those 'flat functions'. $\endgroup$ – Jakobian Jun 27 at 19:52