# Continuity proved by differentiation

1. Apr 22, 2010

### losin

f: (0,+inf)->R and

f(x) is

0 if x is irrational

1/n if x is rational (n is positive integer)

For each rational and irrational, i want to show continuity/discontinuity of f

Intuitively, i think at each rational f is discontinuous, and at each irrational f is continuous,

but i cannot figure out how should i apply differentiability to this problem...

2. Apr 22, 2010

### ice109

you haven't defined n?

3. Apr 22, 2010

### HallsofIvy

Staff Emeritus
I strongly suspect that this is supposed to be one of the "Dirichlet" examples:

f(x)= 0 if x is irrational, f(x)= 1/n, if x is rational where n is the denominator of x expressed as a fraction in lowest terms. It can be shown that $lim_{x\to a} f(x)= 0$ for all x so, yes, it is continuous for all irrationals. It is not defined at x= 0 but if you define f(0)= 0, it is continuous at x= 0 and discontinuous for all other rationals.

There is no way to "apply differentiability" to this problem, the function is not differentiable.

4. Apr 22, 2010

### losin

for f(x)=1/n when x is rational, n is random

so differentiability is not applicable?

since differentiability implies continuity, i tried to use that method..

5. Apr 22, 2010

### sutupidmath

A function can fail to be differentiable but be continuous. On this note, there are functions that are continuous everywhere but differentiable nowhere. So showing that a function is not differentiable, doesn't tell you anything about continuity. It works the other way around. That is, since if a function f is differentiable then it is continuous, it means that if it is not continuous then it is not differentiable.

...and what do you mean 'n' is random? random what?

6. Apr 22, 2010

### losin

n is a random positive integer.

and how should i show discontinuity when x is rational?

when i prove 'f is continuous when x is irrational', does it follows that

'for rationals, f is not continuous'...?