# Infinitely differentiable function with compact support on $\mathbb{R}^n$ with given properties

For the following parts: $$f(t)=\begin{cases}e^{-1/t^2}&t\neq0\\0&t=0\end{cases}$$

$$\quad(a)$$ Show that $$f\in C^\infty(\mathbb R)$$; that is, $$f$$ is differentiable to all orders on $$\mathbb R$$.

$$\quad(b)$$ Use $$f$$ to define a function $$g\in C^\infty(\mathbb R)$$ whose support is $$[a,b]$$, where $$a.

$$\quad(c)$$ Show how $$g$$ can be used to define a function $$h\in C^\infty(\mathbb R^n)$$ such that $$h(x)\begin{cases}=1&||x||\leq1\\\in[0,1]&1<||x||\leq2\\=0&2<||x||.\end{cases}$$

The part I am struggling with is part c. I'm struggling to find a function which fits the given criteria for function values while also being infinitely differentiable with compact support. I used the bump function as my answer to part b. Any help would be greatly appreciated.

• I edited the question into the body. Please do this for your future questions. Nov 15 '19 at 21:43

The function $$h$$ in part c is a bump function, so you aren’t intended to use it to do this problem. The directions also say to use $$f$$ to define $$g$$ in part b, so you should probably back up here. If you are like me, you will probably find it very helpful to graph $$f$$.
• Let $$g_1(x) = \frac{f(x-a)}{f(x-a)+f(x-b)}$$ if $$x\in[a,b]$$, and 0 otherwise. Define $$g_2$$ to be a horizontally flipped version of $$g_1$$, with different constants $$c$$ and $$d$$. Stitch those together piecewise to make the function $$g$$ such that $$g\equiv0$$ if $$x\not\in[a,d]$$, $$g\equiv1$$ if $$x\in[b,c]$$ and $$g$$ is smooth everwhere.
• Then just choose constants so $$g$$ is $$h$$.
• By "horizontally flipped" do you mean replacing x with -x in the definition of $g_1$? Nov 16 '19 at 5:37
• Or could I just do $1-g_1$ with different constants? That's seeming to work on desmos, at least on the surface. Nov 16 '19 at 6:03
• $g_2$ will definitely need to have different constants than $g_1$, so you can move them independently of each other. I changed the formula for $g_2$ slightly, so the other constant was on top. Subtracting from 1 simplifies to the same thing, so you're good. Nov 18 '19 at 2:17