A $C^{\infty}$ function $f(x)$ on the interval $[a, b]$ satisfies the following 3 properties:
1) $f(x) = 1$ for $a \leq x \leq b$
2) $f(x) = 0$ for $x < \alpha$ and $x > \beta$ where $\alpha < a$ and $\beta > b$
3) $f'(x) \neq 0$ on the intervals $(\alpha, a)$ and $(b, \beta)$
I have to construct a diffeomorphism $g: [a, b] \to [c, d]$ which satisfies $g'(a) = g'(b) = 1$ and $g(a) = c, g(b) = d$.
One $f(x)$ I think that works is $$f(x) = \left\{ \begin{array}{lr} 1 & : x \geq 1 \\ e^{-\frac{1}{(\frac{x}{1 - x})^2}} & : 0 < x < 1\\ 0 & : x \leq 0 \end{array} \right. $$
I can't figure out an analytic way to find such a function, and guessing-and-checking hasdn't been fruitful for me so far.



I'm not giving an exact closed formula, but the idea to get one. The problem is to find a diffeo $g$ among the intervals $[a,b]$ and $[c,d]$ with prescribes derivatives at the extremes, in this case $g'(a)=g'(b)=1$. So it's better to look at the graphs. The picture I include summarizes the situation.
A remark in any case. This is very common in differential topology, and really useful in higher dimensions and arbitrary manifolds. However to produce diffeos among intervals with prescribed derivatives at the extremes there is a very explicit method using splines. However the problem asked explicitely for the bump functions smooting technique!