Infinitly differentiable hölder continuous function

I want to find an example of an infinitly differentiable hölder continuous function with parameter $\alpha=1$, i.e. $f\in C^{0,1}$ for $f:A\to B\subset \mathbb{R}$, where $A$ is closed set in $\mathbb{R}^n$. For simplicity let $A=[a,b]^n$. Now if $n=1$, I would take the simple polynomial $f(x)=x$, which is infinetly differentiable and, since it is lipschitz, it is hölder continuous with parameter $\alpha =1$. My problem is that the functions range should be a subset of $\mathbb{R}$. So I do not see how to generalize this in higher dimension. For example the norm function, would be Lipschitz and it also has the right range, but is however not infinitely differentiable.

hulik

-
You want an infinitely differentiable function with range R on a compact set? Well, it would be continuous, and continuous functions on compact sets have bounded range. –  nayrb Oct 11 '12 at 13:39
@nayrb Sorry for the confusion! It does not have to be whole $\mathbb{R}$. But the evaluation of the function should be a real number. –  user20869 Oct 11 '12 at 13:44
Will you be satisfied with a constant function $f:R^n \rightarrow R$ as an infinitely differentiable lipschitz function? –  nayrb Oct 11 '12 at 13:53
@nayrb Actually I would like to have a more interesting example :) –  user20869 Oct 11 '12 at 13:59

Take $f$ a smooth bounded function with bounded derivative, and take $g(x):=f(\lVert x\rVert^2)$, where $\lVert \cdot\rVert$ is the Euclidian norm. Then $$|g(x)-g(y)|=\left|\int_0^1\partial_t g(tx+(1-t)y)dt\right|=\left|\sum_{j=1}^n2(x_i-y_i)f'(\lVert tx+(1-t)y\rVert^2)dt\right|\leq 2n\lVert x-y\rVert \sup_{v\in\Bbb R^n}|f'(v)|.$$ Example: $f(t)=e^{-t^2}$.