think it would help if you posted what f(x) is ... ?
I'm so sorry. I didn't even realize that I left that part out. (It's been a long week)
f(x) is defined on the interval [0,1] to be 0 if x xis irrational and to be 1/n if x is rational and if x can be written fully reduced as x =m/n
suppose ε > 0 is given. we need to find some δ > 0 so that |x-c| < δ means |f(x)| < ε.
well pick a natural number n such that 1/n < ε. then there are only finitely many points (all of them rational) in the interval [0,1] with f(x) ≥ 1/n (let's call them x_{1},...,x_{k}).
let δ = min(|x_{1} - c|, |x_{2} - c|,...,|x_{k} - c|). does that work?
(for example, if ε = 0.4, we could use n = 3. the only points for which f(x) ≥ 1/3 are {0,1/3,1/2,2/3,1}, pick the one that c is closest to (for example if c = √2 - 1, we would pick δ = 4/3 - √2, since 1/3 is the closest point)).