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.
