-2

Construct an infinitely differentiable function which is identically 0 on the intervals $[0, 1]$, $[4, 5]$, and is identically 1 on the intervals $[2, 3]$ and $[6, 7]$.

James
  • 1

1 Answers1

0

Let $\phi$ be a smooth function with $\phi(x)=0\iff x\le 0$, for example $$ \phi(x)=\begin{cases}0&x\le 0\\e^{-1/x}&x>0\end{cases}$$ Then $f(x)=\phi(x-1)\phi(-x)\phi(x-5)\phi(4-x)$ is zero iff $x\in[0,1]\cup [4,5]$ and $g(x)=\phi(x-3)(\phi(2-x)\phi(x-7)\phi(6-x)$ is zero iff $x\in[2,3]\cup[6,7]$. Both functions are positive otherwise, hence $f(x)+g(x)>0$ for all $x\in\Bbb R$. Hence the convex combination $$ h(x)=\frac{0\cdot g(x)+1\cdot f(x)}{f(x)+g(x)}$$ is smooth and is $=0$ where $f(x)=0$ and is $=1$ where $g(x)=0$.