Differentiability of monotonic functions If a function is monotonic on set E. Is f differentiable almost everywhere?
I have proved for case E closed bounded or open intervals, hence all open sets. But in general I am not able to figure it out.
And this I know that derivative of f at isolated points is not defined(or is infinity). But there can be atmost countable no. of isolated points. So what we can say about general E whether it contains isolated points or not.
 A: First, you should note that the set of isolated points of $E$ is countable. This is in fact a general property of subsets of $\mathbb{R}$.
Theorem: Let $E$ be a subset of $\mathbb{R}$ and let $F$ be the set of isolated points of $E$. Then $F$ is at most countable.
Proof: Suppose otherwise, that is, that $F$ is uncountable. Then there exists some interval $[k,k+1]$ such that $F\cap[k,k+1]$ is uncountable. For each $x\in F\cap [k,k+1]$, choose a rational number $q_x$, $0<q_x<1$ such that $(x-2q_x,x+2q_x)\cap F=\varnothing$. Since the set $\left\{q_x:x\in F\cap[k,k+1]\right\}$ is countable, then there exists some $q$ such that $X=\left\{x:q_x=q\right\}$ is uncountable, and in particular infinite. The choice of $q_x$ implies that the sets $(x-q_x,x+q_x)$ are all disjoint for $x\in X$, and they are all contained in $[k-1,k+2]$. Therefore, we constructed an infinite family of disjoint intervals of length $2q$, all of which are contained in the bounded interval $[k-1,k+2]$, a contradiction. QED
(Probably, there is a nicer proof of this theorem somewhere in this site.)
Therefore, we should not worry about the isolated points of $E$ when analysing derivatives: the set of isolated points has null measure.
A trick that works here is to extend your function $f$ to an interval containing $E$. We can do this in the following manner:
Let $E\subseteq\mathbb{R}$ and $f:E\to\mathbb{R}$ be monotonic. The function $\hat{f}:(\inf E,\sup E)\to\mathbb{R}$ given by $\hat{f}(x)=\sup_{y\in E,y\leq x}f(y)$ is an extension of $f$ (if $\sup E$ or $\inf E\in E$, define $\hat{f}(\sup E)=f(\sup E)$ or $\hat{f}(\inf E)=f(\inf E)$).
Another extension is given by $\overline{f}(x)=\inf_{y\in E,y\geq x}f(x)$. In fact, you can check that if $g$ is any other extension of $f$ defined on $[\inf E,\sup E]\cap E$, then $\hat{f}(x)\leq g(x)\leq\overline{f}(x)$ for all $x$.
Alternatively, you can prove this with Zorn's Lemma, but the argument is basically the same: Zorn's lemma gives you a maximal extension of $f$ to a monotonic function $\widetilde{f}:F\to \mathbb{R}$ defined on some subset $F\supseteq E$. To show that $F$ is an interval you apply the argument above and extend $\widetilde{f}$ to some interval containing $F$. Maximality implies that $F$ is that interval.
Now, about your question of differentiability of $f$: For almost every point $x$ of $(\inf E,\sup E)$, the function $\hat{f}$ is differentiable at $x$. But we also know that almost every point of $E$ is not isolated. Using these two fact, we conclude that almost every point $x$ of $E\cap(\inf E,\sup E)$ is not an isolated point of $E$, and $\hat{f}$ is differentiable at $x$. You can then check that for such $x$, $f$ is differentiable at $x$, and $f'(x)=\hat{f}'(x)$.
Therefore, $f$ is differentiable at almost every point of $E$.
