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](http://projecteuclid.org/euclid.dmj/1091217474). [Arxiv](http://arxiv.org/abs/math/0203237),
> 
> 
> 


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$.



Uniform approximation of increasing function in $C^{\infty}$
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*:


1. 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)$.)
2. 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$.
3. It is a standard fact that $\varphi\*f$ is smooth.
4. 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).


