Function with certain value/derivative at 0 and bounded support. Hello fellow math people,
I would like to construct a function with the following properties:


*

*$ f \in C^{\infty}(\mathbb{R}^d)$ 

*$f(0) = 1$ and $ \partial_{e_i} f(0)=1$ for one $i =1,...,d$.

*$\sup(f) \subset B_r(0)$ with $ 0 < r \leq 1$ where the ball is looked at with respect to the Euclidean norm.
I think one can construct this using splines for example, but I do not really know how to start, could anyone show me how to do this? An example for $i=1, r=1$ would suffice as well.
Thank you in advance!
 A: First note that if we have a function $f$ with this properties in $1$ dimension, we can take $g(x_1,\dots,x_d)=f(x_1)\dots f(x_d)$ to solve the problem in arbitrary dimensions (you have to choose the support of $f$ small enough so that $(\operatorname{supp}f)^d\subset B_r(0)$).
In $1$ dimension, let's start with any non-trivial $\phi\in C_c^\infty(\mathbb{R})$. Since $\phi\neq 0$, there is $x_0\in\mathbb{R}$ such that $\phi(x_0)\neq 0$, $\phi'(x_0)= 0$. Replacing $\phi$ by $\alpha \phi(\beta(\,\cdot-\gamma))$ with suitable $\alpha,\beta,\gamma$, we may assume that $x_0=0$, $\phi(x_0)=1$ and $\operatorname{supp}\phi\subset (-r,r)$. Then $f(x)=(1+x)\phi(x)$ has all the desired properties.
A: Thanks for your answer, lets see if everything works out:
So if I take $\phi(x) = e^{\frac{1}{r^2}}e^{-\frac{1}{r^2-x^2}}$ on $(-r,r)$ and $0$ elsewhere we have $\phi(0)=1$, $\phi^{\prime}(0)=0$ and $supp(\phi) \subset B_{r}(0)$.
Thus $f(x)=(1+x)\phi(x)$ would have the above properties for d=1. 
Now if we take $r_d$ such that $\sqrt{d} r < r_d$ then the function $g(x_1,...,x_d) = f(x_1)...f(x_d)$ admits $supp(g) \subset B_{r_d}(0)$ since $(supp(f))^d \subset B_{r_d}(0)$ and has all the wanted properties for arbitrary $d$.
Is that correct?
