4

Is it possible to find a smooth function $p$ such that

$$p(x)=0 \text{ if } x\le -1$$ $$p(x)=0 \text{ if } x> 0$$ $$0\le p(x) \le 1 \text{ if } -1<x<1$$ $$p(x) = 1 \text{ if } -\frac{1}{2}\le x \le \frac{1}{2}$$ Hint: The following function has continuous derivatives of all orders $$f(x) = 0 \text{ if } x\le 0$$ $$f(x) = e^{-\frac{1}{x^2}} \text{ if } x>0$$

My thought: Considering the left-half of the function $p$, I tried something like $e^{-\frac{1}{\tan^2(x\pi)}}$. The shape looks good but I am not sure about the smoothness at $-1$ and $-\frac{1}{2}$. For $x=-1$, since $\tan$ is infinitely differentiable so we have smoothness there. But for $x=-\frac{1}{2}$, I am not sure about the smoothness after "gluing" with $y=1$.

3x89g2
  • 7,739

1 Answers1

4

You can make a smoothed bump function with $f(x) = 0$ for $|x| \geq 1,$ then for $-1 < x < 1$ take $$ f(x) = e^{\frac{1}{x^2 -1}}. $$ Next we can make a $C^\infty$ mock Heaviside function with $$ h(x) = \int_{- \infty}^x f(t) dt $$ Note that $h$ is constant for $x \leq -1,$ where it is zero, and $x \geq 1,$ where $h$ is a fixed definite integral, call it $H.$

We get a flat-top plateau function with, for some $X > 1,$ $$ F(x) = \frac{1}{H^2} h(x + X) h( -X - x). $$

Will Jagy
  • 146,052