Suppose I am given two smooth functions $f$ and $g$ on the real line and real numbers $a<b$ such that $f(a)<g(b)$ and $f'(a),g'(b)\ge0$
I want to get a smooth $H:\mathbb R\rightarrow\mathbb R$ such that
- $H\equiv f$ on $(-\infty,a]$
- $H\equiv g$ on $[b,\infty)$
- $H'>0$ on $(a,b)$
This is how I went about it:
Set $$H=f(1-h)+gh$$where $h:\mathbb R\rightarrow\mathbb R$ is smooth such that $h\equiv0$ on $(-\infty,a]$ and $h\equiv1$ on $[b,\infty)$
Here $h$ in turn is found using the function $F(x)=j(x-a)j(b-x)$ where $j$ is the well-known function:$$j(x)=\begin{cases}e^{-\frac1{x^2}}&x>0\\0&x\le0\end{cases}$$
Notice that $F$ vanishes outside $[a,b]$. We use $F$ in the following way to construct $h$ $$h(x)=\frac{\int_{-\infty}^xF(x)}{\int_{-\infty}^\infty F(x)}$$
So one checks that $H$ satisfies the requirements of the first paragraph except for (3).
My question is how to tweak $H$ so that (3) too is satisfied?
In fact proof of mere existence of such $H$ that (1),(2) and (3) are satisfied, holds good for me. Is there a theorem I can employ?