# A function discontinuous only on Q

1. Nov 24, 2007

Let $$f(x)=\sum_{n=1}^{\infty}\frac{(nx)}{n^2}$$, where (x) denotes the fractional part of x. $$|\frac{(nx)}{n^2}| \leq \frac{1}{n^2}$$, so $$\sum \frac{(nx)}{n^2}$$ converges uniformly to f on all of R. (x) is discontinuous precisely at the integers, so $$s_k(x) = (x) + \frac{(2x)}{2^2} + ... + \frac{(kx)}{k^2}$$ is discontinuous precisely when $$x = \frac{p}{m}$$, where m = 1,...,k, and p is any integer. It follows that if $$x_0$$ is irrational, then $$\lim_{x \rightarrow x_0}s_n(x) = s_n(x_0)$$ for all n. So by theorem 7_11 in Rudin, $$\lim_{x \rightarrow x_0}f(x) = \lim_{n \rightarrow \infty}s_n(x_0) = f(x_0)$$, which shows f is continuous at every irrational point.

Another thing to add is that it is clear f(x+1) = f(x) for all x. It is also clear by uniform convergence that f is Riemann integrable on any bounded interval, since each s_n is as such. That's pretty much most of Problem 10 in Chapter 7, but not all.

Is the limit function discontinuous on Q (the rationals)? Or equivalently, by the f(x+1)=f(x) property, is f discontinuous at all the rationals in [0,1]? I don't see off hand the direct reason WHY the limit function is discontinuous, despite the fact that every rational number q is a discontinuity point of s_n, for all n >= some N. (In particular, the problem asks to show the discontinuous points are a countable dense subset, which would be implied if that subset is Q...) I.e., just because g_n(x) = 1/n, x rational, g(x) = 0, x irrational, is discontinuous everywhere, doesn't imply it's uniform limit function g(x)=0 is discontinuous anywhere.

Last edited: Nov 24, 2007
2. Nov 24, 2007

The Solution

It's not hard to see that f(x) is not continuous at 0. For instance, f(0) = 0. And if 0 < e < 1/2, then f(-e) > 1/2.

Now suppose a rational number p/q is given, where p and q have no common factors, and we wish to show f is not continuous at p/q. By absolute convergence, we can write $$f(x) = f_1(x) + f_2(x) = \sum_{n \neq kq}^{\infty}\frac{(nx)}{n^2} + \sum_{k = 1}^{\infty}\frac{(qkx)}{q^2 k^2}$$. By the argument given above for continuity at irrational numbers, we have $$f_1$$ is continuous at p/q (note that the fact that p and q have no common factors is required for $$f_1$$ to be continuous there). But $$f_2(p/q) = 0$$, and for 0 < e < 1/2, we have $$f_2(p/q - e/q) \geq \frac{(p-e)}{q^2} = \frac{1-e}{q^2} > \frac{1}{2q^2}$$. Since q is fixed, it follows that $$f_2$$ is discontinuous at p/q from the left. Hence $$f = f_1 + f_2$$ is discontinuous at p/q from the left.

Last edited: Nov 25, 2007
3. Nov 25, 2007

### Galileo

How can f not be discontinuous everywhere if it's discontinuous on a dense subset?

Suppose the set A of points where f is discontinuous is dense in R.
Then for each a in A there exists an $\epsilon>0$, such that for all $\delta>0$ there's an x such that $0<|x-a|<\delta$ and $|f(x)-f(a)|\geq \epsilon$.

So take any point b in R and suppose f is continuous in b. Then there exists for any $\epsilon>0$ a $\delta>0$ such that $|x-b|<\delta \Rightarrow |f(x)-f(b)|<\epsilon$.
But $(b-\delta,b+\delta)$ contains a point a in A no matter how small delta, so there's an interval centered on a which is contained in $(b-\delta,b+\delta)$ and contains a point x such that $|f(x)-f(a)|\geq \epsilon$.

I don't imagine Rudin is wrong. I just want to know the error in my reasoning.

EDIT: Ok. Found the error. Ofcourse |f(x)-f(a)| is too big, but |f(x)-f(b)| shouldn't be.

Last edited: Nov 25, 2007
4. Nov 25, 2007

### HallsofIvy

The function f(x)= 0 if x is irrational, f(x)= 1/n if x is rational, x= m/n reduced to lowest terms. It's easy to show that that $\lim_{x\rightarrow a} f(x)= 0$ for any a and so is continous at every irrational number, discontinuous at every rational number (and, of course, the rationals are dense in the reals).

5. Nov 26, 2007

### SiddharthM

can you explain this more thoroughly?

this is the first non-trivial problem from chapter 7.

6. Nov 26, 2007

If 0 < e < 1/2, then (-e) = 1 - e > 1 - 1/2 = 1/2, then
$$f(-e)=\sum_{n=1}^{\infty}\frac{(n\cdot -e)}{n^2} = (-e) + ... \geq (-e) > 1/2$$.

But $$f(0)=\sum_{n=1}^{\infty}\frac{(n \cdot 0)}{n^2} = 0$$,
so |f(-e)-f(0)| = |f(-e)| >= 1/2. -1/2 < -e < 0 was arbitrary, hence f is discontinuous from the left.

7. Nov 26, 2007

Just wanted to add.. Another example to keep in mind is $$f(x) = exp(\frac{-1}{x^2})$$, x irrational, $$f(x) = 0$$, x rational. This function is discontinuous everywhere except 0. It's infinitely differentiable at 0.