# Real analysis: show that a continuous function is defined for irrationals

1. Nov 23, 2011

### nps12345

Let f be a continuous function defined on (a, b). Supposed f(x)=0 for all rational numbers x in (a, b). Prove that f(x)=0 on (a, b).

i dont even know where to start...any tips just to point me in the right direction?

2. Nov 23, 2011

### gb7nash

There's a couple of ways you can approach this problem. Did you try proof by contradiction?

Let f be a continuous function defined on (a, b). Assume f(x)=0 for all rational numbers x in (a, b) and assume that f(x)≠0 on (a, b), so...

3. Nov 23, 2011

### micromass

You'll need two things for this problem:

1) If f is continuous and if $x_n\rightarrow x$, then $f(x_n)\rightarrow f(x)$.

2) For every real number x there exists a sequence of rational numbers that converges to x. This is saying that $\mathbb{Q}$ is dense in $\mathbb{R}$

Try to do something with these things...