# Continuous function?

1. Oct 12, 2011

### jacksonjs20

let g:R->R be a real function defined by rule
g(x) = x^2 if x\in\mathbb{Q} and
g(x) = 0 if x\notin\mathbb{Q}

is g continuous (*on R)?

*thanks for pointing out mistake above.

Last edited: Oct 13, 2011
2. Oct 13, 2011

### mathwonk

where?

3. Oct 13, 2011

### Deveno

how?

oh wait, we're not just asking random questions here?

@jacksonjs20: if you're asking if g is continuous on all of R, the answer is no.

there might be one place where g is continuous....what do you think? can you prove it?

4. Oct 13, 2011

### jacksonjs20

I have come to the conclusion that g must be differentiable at x=0, and thus continuous, since the limit of the difference quotient from above and below exist and are equal.

Is this correct?

If so what is the most efficient method of proving that it is not differentiable at any other points in R?

By showing f is not continuous on R\{0}?

Last edited: Oct 13, 2011
5. Oct 13, 2011

### disregardthat

Let q_n be a sequence of rational numbers converging to a irrational number, e.g. sqrt(2).

What is lim f(q_n), and what is f(lim q_n)?

6. Oct 13, 2011

### Citan Uzuki

If a function f is continuous at a point $x_0$, then for every sequence of points $\{ x_n \}_{n=1}^{\infty}$ such that $x_n \rightarrow x_0$, we have $f(x_n) \rightarrow f(x_0)$. So try approaching each point along a sequence of rational numbers, and then along a sequence of irrational numbers.

7. Oct 13, 2011

### Deveno

suppose a is not 0. then a^2 is not 0.

let ε > 0.

let δ = min{1,ε/(2|a|+1)}.

for all rational x with |x-a| < δ

|x^2 - a^2| = |x+a||x-a| ≤ (|x|+|a|)|x-a|

≤ (2|a|+1)|x-a| < (2|a|+1)(ε/(2|a|+1)) = ε

so the limit, if it exists, must be a^2.

but for all irrational x with |x-a| < δ,

f(x) = 0, so the limit, if it exists, must be 0.

the limit cannot be both, so it does not exist, so f(x) is not continuous at a ≠ 0.