# Approximating the lateral derivatives

Let $$f : [0,2] \to \mathbb{R}$$ be a continuous function with continuous derivatives of all orders in every point except at $$t = 1,$$ where the lateral derivatives exist. We know that one can approximate $$f$$ by a smooth function $$g$$. My question is, on a small neighborhood $$[-\epsilon+1,1+\epsilon]$$, can we ensure that the lateral derivatives of $$g$$ and $$f$$ are close?

It seems rather delicate to me since for instance, take $$f(x) = x, ~\forall x\in [0,1]$$ and $$f(x) = 1$$ for $$x \in [1,2].$$ Then the right derivative of $$f$$ at $$1$$ is $$1$$ and the left derivative at $$1$$ is $$0$$. But once $$g$$ is smooth its lateral derivatives must coincide, so one can not guarantee proximity of the derivatives. So, what is the best we can do in terms of ensuring that the derivative of $$g$$ to be not large? Can we bound the derivative of $$g$$ at $$1$$ in terms of some the lateral derivatives of $$f$$?

The point of my question is that I want to approximate a function just like as that I stated by a smooth function, but it would be very helpful to have a well control on the derivatives of $$g$$ near $$1$$.