Is $δ=δ(x)$ a continuous function If a real function $f:ℝ→ℝ$ is twice differentiable at a point $x$, then the first derivative must be continuous at $x$, and assuming $f′(x)>0$, then there exist $δ>0$ such that $f′(y)>0 $ for all $y∈(x−δ,x+δ)$, then on this interval $f$ must be increasing. Repeating this process for all $x$, we conclude that $δ$ is a function of $x$
Assuming that this function is analytic (the stronger form). I am asking if $δ=δ(x)$ is a continuous function in $x$.
If no, then what are the conditions on the function $f$ such that the above property holds true.
 A: $\delta(x)$ (defined as the maximum of appropriate $\delta$'s) is even 1-Lip (for any $f$). Indeed, if $|x-y|=a$, then $\delta(y)\geqslant \delta(x)-a$, since $(y-c,y+c)\subset (x-\delta(x),x+\delta(x))$ for $c=\max(\delta(x)-a,0)$. Analogously $\delta(x)\geqslant \delta(y)-a$ and therefore $|\delta(x)-\delta(y)|\leqslant a$. 
A: Smoothness of $f$ is a distraction here. Let us assume that $f$ is continuously differentiable (and we only need this because we want to talk about $f'$, not for any good reason), so that $f'$ exists and is continuous. Then $B : =\{x \mid f'(x) \leq 0\}$ is a closed set, and the largest valid choice for $\delta(x)$ is just $d(x,B)$.
For any set $A$, the function $x \mapsto d(x,A)$ is a $1$-Lipschitz function, by the triangle inequality for metrics. So, essentially, we already get that $\delta$ can be chosen as nice as possible if we only require enough about $f$ to make $\delta$ well-definable.
Just for completeness, if we don't require $\delta(x)$ to be the maximal feasible value, we could make $\delta$ as nasty as we want, e.g. by moving to $\bar\delta$ where $\bar\delta(x) = \delta(x)$ if $x \in Z$ and $\bar\delta(x) = \frac{1}{2}\delta(x)$ if $x \notin Z$ for some horrible $Z$.
