# $f| _{dense\;set}=0$ and continuous on lines $\implies f \equiv 0$ [closed]

Denoting $I=[0,1]$, let $f:I^2 \to \mathbb{R}$, such that $f=0$ on a dense set $A \subseteq I^2$, i.e. $cl(A)=I^2$.

Assume also that $f$ is continuous on horizontal and vertical lines, i.e. $\forall x_0,y_0 \in I: f(x,y_0) \in C(I),f(x_0,y) \in C(I)$.

Prove that $f$ is identically $0$.

## closed as off-topic by user26857, jameselmore, 3SAT, Kamil Jarosz, SchrodingersCatJan 18 '16 at 14:56

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – user26857, jameselmore, 3SAT, Kamil Jarosz, SchrodingersCat
If this question can be reworded to fit the rules in the help center, please edit the question.

• 2 upvotes without showing any work? This site is awfully generous today. – Alec Teal Aug 16 '15 at 11:55
• @AlecTeal I think this is a very difficult and interesting problem, so I’m actually wondering why there are only two upvotes. Indeed, three out of the four answers below have been deleted because they were based on an oversimplifying interpretation of the problem, and even the fourth answer by Nicolas has been edited abundantly and needed to make an extra assumption! – triple_sec Aug 16 '15 at 22:57
• Where did you get this question from ? Did you make it up or did you find it in a textbook ? – Sergio Aug 17 '15 at 17:20
• Please answer my question, if it comes from a textbook maybe there are hints there, if you made it up then it is useful to know that maybe a counterexample exists. – Sergio Aug 18 '15 at 18:37
• No counterexample should exist, yet the source of this question provides no hints. – Emolga Aug 18 '15 at 18:39

Drawing a picture next to this proof makes it much more clear (as with many proofs...)

Choose any $(a,b)\in [0,1]^{2}$ and $\varepsilon>0$.

By density of $\{f=0\}$ there is $(x_{1},y_{1})\in (a-\varepsilon,a+\varepsilon)\times(b-\varepsilon,b+\varepsilon)$ such that $f(x_{1},y_{1})=0$. By continuity on vertical lines there is $\delta_{1}$ such that $f(x_{1},y)<1/2$ for $|y-y_{1}|<\delta_{1}$, and we can take $\delta_{1}$ such that $\delta_{1}<1/2$ and $[y_{1}-\delta_{1},y_{1}+\delta_{1}]\subset (b-\varepsilon,b+\varepsilon)$.

Now repeat the construction recursively for each $n$ to find $(x_{n+1},y_{n+1})$ and $\delta_{n+1}$ such that

• $(x_{n+1},y_{n+1}) \in (a-\delta_{n},a+\delta_{n})\times(y_{n}-\delta_{n},y_{n}+\delta_{n})$
• $\delta_{n+1}<1/2^{n+1}$
• $[y_{n+1}-\delta_{n+1},y_{n+1}+\delta_{n+1}]\subset (y_{n}-\delta_{n},y_{n}+\delta_{n})$
• $f(x_{n+1},y)<1/2^{n+1}$ for $|y-y_{n+1}|<\delta_{n+1}$

The constructed sequences have the following properties:

• $\delta_{n}\rightarrow 0$
• $x_{n}\rightarrow a$ (because $\delta_{n}\rightarrow 0$)
• $y_{n}$ has a limit $\bar{y}\in [a-\varepsilon,a+\varepsilon]$, which is the unique element of $\bigcap_{n} [y_{n}-\delta_{n},y_{n}+\delta_{n}]$.
• $f(x_{n},\bar{y})\leqslant 1/2^{n}$ so that $f(a,\bar{y})=0$ by continuity on horizontal lines.

We have shown that for all $\varepsilon > 0$, there is $\bar{y}$ such that $f(a,\bar{y})=0$ and $|\bar{y}-b|<\varepsilon$. By continuity on vertical lines $f(a,b)=0$. Since $a,b$ were arbitrary, $f=0$.

• Wow! Finally, a complete answer! Brilliant! +1 – triple_sec Aug 21 '15 at 0:53
• That's beautiful :) By the way, $\bar{y}\in [b-\varepsilon,b+\varepsilon]$. (edit<6 characters) – Emolga Aug 22 '15 at 23:32

NOTIFICATION : this answer is valid for an uniform continuity on the lines, i.e. the below $\delta_x,\delta_y$ are independant of the choice of the horizontal/vertical line.

Let $(x,y)\in I^2\setminus A$ and $\varepsilon>0$. By hypothesis, there exist $\delta_x,\delta_y>0$ such that $$|x-x_0|<\delta_x\Longrightarrow|f(x,y)-f(x_0,y)|<\varepsilon/2\quad\quad\forall y\in I$$ and $$|y-y_0|<\delta_y\Longrightarrow|f(x_0,y)-f(x_0,y_0)|<\varepsilon/2\quad\quad\forall x_0\in I.$$ Now, as $A$ is a dense set, we can find $(x_0,y_0)\in A$ such that $$|x-x_0|<\delta_x,\quad |y-y_0|<\delta_y.$$ Then we have $$|f(x,y)|=|f(x,y)-\underbrace{f(x_0,y_0)}_{=0}|\leq|f(x,y)-f(x_0,y)|+|f(x_0,y)-f(x_0,y_0)|<\varepsilon$$

As $\varepsilon$ was arbitrary, we've shown that $f(x,y)=0$. As $(x,y)\in I^2\setminus A$ was arbitrary, we've shwon that $f$ is identically zero on $I^2\setminus A$.

• This proof needs a little improvement. Note that the choice of the $\delta$ that satisfies $|y - y_0| < \frac{\delta}{2} \rightarrow |f(x_0, y) - f(x_0, y_0)| < \frac{\epsilon}{2}$ in general depends on your choice of $x_0$. – Dominik Aug 16 '15 at 9:09
• It is worth pointing out this fact ; however, I think what I've written is fine : I did not precised for what choice of $\delta(\varepsilon)=\delta(\varepsilon,y,x_0)$ we have the inequalities with $\varepsilon/2$. We know that we can find such $\delta$ due to the hypothesis of continuity on $f$ on the lines. Now, to write it more in details, what you've said is a good point to consider. – Nicolas Aug 16 '15 at 9:26
• @Nicolas I'm afraid this construction gives rise to circularity: the choice of $(x_0,y_0)$ depends on $\delta$, and the choice of $\delta$ depends on $(x_0,y_0)$. – triple_sec Aug 16 '15 at 10:26
• The uniform continuity assumption you added after this discussion actually makes $f$ continuous... – Sergio Aug 17 '15 at 15:24
• Indeed, and what you wrote in your answer is more or less a proof of that well known result :) But the original question is only interesting for functions that aren't continous... – Sergio Aug 17 '15 at 17:33