# Proof about dense set and continuous function

1. Feb 6, 2013

### R_beta.v3

1. The problem statement, all variables and given/known data

If f is continuous, and f(x) = 0 for all x in A, where A is a dense set. Then f(x) = 0 for all x.

I am using the following definitions:
A set of real numbers A is dense if every open interval contains a point of A.
And the limit definition for a continuous function.

2. Relevant equations

3. The attempt at a solution

Suppose there is an a such that f(a) > 0, then since f is continuous, there is an δ > 0, such that, for all x,
if |x - a| < δ, then |f(x) - f(a)| < f(a). So f(x) > 0 for all x in (-δ + a, δ + a).
But since (-δ + a, δ + a) is an open interval it contains a point of A call it z, but that is impossible, because then f(z) = 0 (By hypothesis), and f(z) > 0 because f(x) > 0 for all x in (-δ + a, δ + a). Assuming there is an a such that f(a) > 0 leads to a contradiction.

I did basically the same to show that there are no x with f(x) < 0.
Therefore f(x) = 0 for all x.

Am I correct?

Also, hello.

2. Feb 6, 2013

### micromass

Staff Emeritus
That would be correct.

As a matter of correctness though, you should really mention somewhere what the codomain and domain of f are. I assume here that you're working with $f:\mathbb{R}\rightarrow \mathbb{R}$.