# Is right differentiable function almost everywhere continuous?

Is right differentiable function almost everywhere continuous? If not, is it measurable?

-
For clarity, could you define "right differentiable" and "almost everywhere continuous"? –  Potato Dec 27 '11 at 20:13
I think I retagged it properly. Measure theory was added –  user21436 Dec 27 '11 at 20:13
function f(x) is defined on [a,b). It is right differentiable which means for any x in [a,b), lim y->x (f(y)-f(x))/(y-x) exists. –  Tim Dec 27 '11 at 20:21
And almost everywhere continuous means the discontinuous points of f(x) constitute a measure-zero set. –  Tim Dec 27 '11 at 20:22

To see this, let $$\operatorname{osc}(x)=\limsup_{y_1,y_2\to x}|f(y_1)-f(y_2)|$$ be the oscillation of $f$ at $x$; clearly $f$ is continuous at $x$ iff $\operatorname{osc}(x)=0$. For $n\in\mathbb{N}$ let $D_n=\{x\in\mathbb{R}:\operatorname{osc}(x)>2^{-n}\}$, and let $D=\bigcup_{n\in\mathbb{N}}D_n$; $D$ is the set of points of discontinuity of $f$, so to show that $D$ is countable, it suffices to show that each $D_n$ is countable.
Fix $n\in\mathbb{N}$. For each $x\in\mathbb{R}$, $f$ is right-continuous at $x$, so there is an $\epsilon_x>0$ such that $|f(y)-f(x)|<2^{-n-1}$ whenever $y\in(x,x+\epsilon_x)$. But then $$|f(y_1)-f(y_2)|<2\cdot 2^{-n-1}=2^{-n}$$ whenever $y_1,y_2\in(x,x+\epsilon_x)$, so $(x,x+\epsilon_x)\cap D_n=\varnothing$.
Now let $x_1,x_2\in D_n$ with $x_1<x_2$; $(x_1,x_1+\epsilon_{x_1})\cap D_n=\varnothing$, so $x_2\ge x_1+\epsilon_{x_1}$, and hence $(x_1,x_1+\epsilon_{x_1})\cap (x_2,x_2+\epsilon_{x_2})=\varnothing$. In other words, the intervals $(x,x+\epsilon_x)$ with $x\in D_n$ are pairwise disjoint, so of course there can be only countably many of them, and $D_n$ is indeed countable.