# Graph of a continuous function $f:[a,b]\to(0,\infty)$ is measurable only if $f$ is differentiable?

I am studying measure theory, and I came across the following problem:

Let $f: [a, b]\to (0, \infty)$ be continuous, and let $G = \{ (x, y): y = f(x)\}.$ Prove that $G$ is measurable only if $f$ is differentiable in $(a, b)$.

-

That claim seems false. In fact, I think it proves itself false, as follows: on the interval $[a,b]$, the function $f:[a,b]\to(0,\infty)$ defined by $f(x)=|x-\frac{a+b}{2}|+1$, which isn't differentiable at $\frac{a+b}{2}$, has a graph of $$G=\{(x,\tfrac{a+b}{2}-x+1)\in\mathbb{R}^2\mid x\in[a,\tfrac{a+b}{2}]\}\cup \{(x,x-\tfrac{a+b}{2}+1)\in\mathbb{R}^2\mid x\in[\tfrac{a+b}{2},b]\}$$ each of which ought to be measurable by the claim, and therefore their union should be too.
This doesn't contradict the statement since your function takes the value 0 at $x=\frac{a+b}{2}$. – nullUser Jun 24 '12 at 3:45
True, but the problem exists just as well for the function $|x-\frac{a+b}{2}|+1$. I'll edit to reflect your point though. – Zev Chonoles Jun 24 '12 at 4:25