Prove that if $f,g$ are continuous functions on the interval $[a,b]$ and $f=g$ a.e. on $[a,b]$ then $f=g$ on $[a,b]$.

Suppose $h$ is a real valued continuous function on $A\subseteq\mathbb{R}$ and there exists $x_0\in A$ such that $h(x_0)>0$. Then there exists $\epsilon_0>0$ such that for each $x\in(x_0-\epsilon_0,x_0+\epsilon_o),$ $h(x)>0$.

The following is my proof:

Suppose NOT. Then for each $n\in\mathbb{N}$, there exists $x_n\in(x_0-1/n,x_0+1/n)$ such that $h(x_n)\leq0$. Now the sequence $(x_n)$ converges to $x_0$. Therefore by continuity of $h$, $(h(x_n))$ converges to $h(x_0)$. But $h(x_n)\leq0$ for each $n\in\mathbb{N}$, whence $\lim_{n\to\infty}h(x_n)=h(x_0)\leq0$. So we have a contradiction. Hence the result.

Could someone please tell me if the above proof is alright?

Now I want to prove that if $f,g$ are continuous functions on the interval $[a,b]$ and $f=g$ a.e. on $[a,b]$ then $f=g$ on $[a,b]$.

The sketch of my proof is as follows. Let $h=f-g$. Then $h$ is continuous and zero a.e. on $[a,b]$. We want to prove that $h$ is zero on $[a,b]$. If there is some $x_0\in[a,b]$ for which $h(x_0)\neq0$ then we can, by using the above result, find an interval in which $h$ is non zero which implies that $h\neq0$ on a subset of $[a,b]$ with positive measure. This contradicts the fact that $h$ is zero a.e. on $[a,b]$.

Is the above idea alright?

The question asks in addition if the result will hold for a general measurable set $E$. I think the answer is yes along the lines of the above proof. But I'm not sure if I'm correct. Am I correct?

Thank you.

• Your first two proofs look fine. For the second question, consider $E=[0,1]\cup \{2\}.$ – zhw. May 25 '17 at 15:50
• Got it! $h|_{[0,1]}=0$ and $h(2)=1$ is a continuous function on $E$ with $h=0$ a.e. on $E$ but not zero on $E$. – Janitha357 May 25 '17 at 16:08

Suppose $h=|f-g|$ which must be continuous too. Let, $h(x_0)>0$ at $x_0\in [a,b]$.
Given $h$ is zero a.e, for any interval $(x_0-\epsilon, x_0+\epsilon)$, there must exist at least another point in the interval where $h(x)=0$.
Therefore, $h(x_0)-h(x)\geq1$ for all $|x-x_0|<\delta$, which contradicts continuity.