Uniform approximation of increasing function in $C^{\infty}$ I have an increasing continuous function $f:{\mathbb R}\rightarrow {\mathbb R}$ which is not differentiable everywhere, and I would like to approximate it with an infinitely differentiable function $g\in C^{\infty}$. I found this paper:

Uniform approximation of continuous mappings by smooth mappings with no critical points on Hilbert manifolds. Arxiv,

which tells me I can do it uniformly. However, nothing tells me that $g$ is also increasing, and this property is essential in my context. I would appreciate any pointers on the existence of a uniform approximation to $f$ in $C^{\infty}$ which is also increasing.
P.S. My function is basically: $K_1 x I(x<0) + K_2x I(x\geq 0)$, $K_1,K_2>0$.
 A: Let $f$ be your two-piece linear function. Let $\varphi\in C^\infty_0((-\epsilon,\epsilon))$ for some small $\epsilon$, such that 


*

*$\varphi$ is even

*the integral $\int \varphi = 1$

*$x\varphi' \leq 0$ 


Then you can check that the convolution $\varphi*f$ is increasing, smooth, and agrees with $f$ outside $(-2\epsilon,2\epsilon)$. 
Taking appropriately rescaled versions of $\varphi$ you get uniform approximations. 

Sketch of Proof:


*

*Observe that since $\varphi$ is even $\int \varphi(x) x \mathrm{d}x = 0$, this guarantees that if $f$ is linear in $(x-\epsilon,x+\epsilon)$, $\varphi* f(x) = f(x)$ (write $f(y) = (f(y) - f(x)) + f(x)$.)

*Let $g(x) = \varphi*f(x)$, we have $g' = \varphi'*f$. In particular $g'(x) = \int_0^\epsilon \varphi'(y) ( f(x-y) - f(x+y)) \mathrm{d}y$. So using that $x\varphi'(x) \leq 0$ and $f$ is increasing you get that $g'(x) \geq 0$. 

*It is a standard fact that $\varphi*f$ is smooth.

*Let $\varphi_\delta(x) = \frac1\delta \varphi(x / \delta)$. Observe that 
$$ \varphi_\delta* f(x) - f(x) = \int \varphi_\delta(y) (f(x - y) - f(x)) ~\mathrm{d}y $$
and observe that the difference is always zero when $|x| > 2\delta\epsilon$. You have that 
$$ |\varphi_\delta*f(x) - f(x)| \leq \sup_{x,y\in (-2\delta\epsilon,2\delta\epsilon)} |f(x) - f(y)| $$
which can be easily controlled by uniform continuity (of continuous functions on compact sets). 

