Spivak's Calculus Chapter 8 Problem 6(a) : proof without contradiction?

313 Views Asked by At

The problem is as follows:

Let $A$ be a dense set in $\mathbb R$. Prove that if $f$ is continuous and $f(x) = 0$ for all numbers $x \in A$, then $f(x) = 0$ for all $x \in \mathbb R$.


I was wondering if I could possibly do a proof without using contradiction. My proof is below:

Let $x \in \mathbb R$. Because $f$ is continuous, $\forall \epsilon > 0$, there exists $\delta > 0$ such that if $0 < |y-x| < \delta$, then $|f(y) - f(x)| < \epsilon.$ And because $A$ is dense in $\mathbb R$, for appropriate $\delta > 0$ given any $\epsilon$, there exists $y \in A$ such that, $0 < |y-x| < \delta$, so $|f(x)| < \epsilon.$ Hence, because $|f(x)| < \epsilon$ for every $\epsilon > 0$, $f(x) = 0$.

Just curious if this proof works at all, logically. I am aware of how to prove this with contradiction, but really wondering if this proof makes sense. Thank you!

2

There are 2 best solutions below

1
On

Here's a proof without contradiction.

Let $x\in\mathbb{R}-A$. Since $A$ is dense there exists a sequence $ \{x_n\}\subset A$ such that $x_n\to x$. Now, since $ \{x_n\}\subset A$ we have $f(x_n)=0$ for all $n$. Thus, $\lim_{n\to\infty}f(x_n)=0$. But, by continuity, $0=\lim_{n\to\infty}f(x_n)=f(\lim_{n\to\infty}x_n)=f(x)$.

The OP's proof looks good to me and has been phrased a little better by CopyPastelt.

mesel's comment that the $0<|x-y|<\delta $ part of the statement is not necessary I think is incorrect. For example, set $f(x)=0$ for $x\neq 0$ and $f(0)=1$. Clearly, $\lim_{x\to 0}f(x)=0$. Look at the proof of this: let $\epsilon>0$. Take $\delta=\epsilon$. For $0<|x-0|<\delta$ we have $|f(x)-0|=|0-0|<\epsilon$. However, if we allow $x=0$ by using the weaker condition $|x-0|<\delta$ then the statement can be evaluated at $x=0$ giving $|f(0)-0|=|1-0|<\epsilon$, which won't hold for all $\epsilon$.

1
On

The OP's basically correct argument can be 'brushed up a bit'.


Let $x \in \mathbb R$.

Let $\epsilon > 0$ be given. Because $f$ is continuous, there exists $\delta > 0$ such that for every $y \in \Bbb R$,
if $0 < |y-x| < \delta$, then $|f(y) - f(x)| < \epsilon.$

Since $A$ is dense in $\Bbb R$, there exists $y_0 \in A$ satisfying $|y_0-x| < \delta$. If $y_0 = x$ then $f(x) = 0$. Otherwise $0 < |y_0-x| < \delta$ and so $|f(y_0) - f(x)| < \epsilon$ and we conclude that $|f(x)| < \epsilon$.

Since $\epsilon$ is arbitrary, $f(x) = 0$.