Is f Continuous on ℝ if Continuous on a Dense Subset?

mrchris
Messages
31
Reaction score
0

Homework Statement


T or F, If f:ℝ→ℝ is continuous on a dense set of points in ℝ, then f is continuous on ℝ.


Homework Equations


definition of continuity using sequences, maybe?


The Attempt at a Solution


false. Take f(x)= {1 if x\in Q(rational numbers) and 0 if x\in (ℝ-Q)(irrational numbers)}. Then take some point x0\inℝ. there exists a sequence {xn}of numbers in Q that converge to x0. then take the limit as n→∞ of f({xn}) which equals 1. Since this limit equals f(x0), f(x) is continuous for all x\inQ. however, we know that due to the density of rationals and irrationals, there also exists a sequence {in} of numbers in (ℝ-Q) that also converges to x0. If we then take the limit as n→∞ of f({in}), we see it equals 0. since this does not equal 1, f(x) is not continuous on ℝ
 
Physics news on Phys.org
You have shown that your function (the Dirichlet function) is NOT continuous on the set of all real numbers. What about on the rational numbers?
 
I thought from the question that all I had to do was show that the function is continuous on a set of dense points (Q) but not continuous for all ℝ. did I somehow not do that? I'm not trying to be a smart-a but I am new to proofs like this.
 
Try working with 1/(x-a) , for some choice of a.
 
i'm still not sure what I haven't done correctly. I'm not doubting you guys, but I thought that I had shown that even though f(x) is continuous on the rationals, a dense set of points in R, f(x) is not continuous for all R. Can someone please explain what is wrong with my answer instead of suggesting new answers?
 
Sorry. Yes, your OP is on the right track. You have a continuous function on Q, but not so
on R, it is a valid counterexample.
 
Bacle2 said:
Sorry. Yes, your OP is on the right track. You have a continuous function on Q, but not so
on R, it is a valid counterexample.

Except that it's not. The Dirichlet function is discontinuous everywhere. You show that f|_{\mathbb{Q}} is continuous on \mathbb{Q} and that f is discontinuous on \mathbb{R} \setminus \mathbb{Q} (and as I said, it is actually discontinuous everywhere). This does not mean that f is continuous on \mathbb{Q} and discontinuous on \mathbb{R} \setminus \mathbb{Q} as I have already noted.
 
jgens said:
Except that it's not. The Dirichlet function is discontinuous everywhere. You show that f|_{\mathbb{Q}} is continuous on \mathbb{Q} and that f is discontinuous on \mathbb{R} \setminus \mathbb{Q} (and as I said, it is actually discontinuous everywhere). This does not mean that f is continuous on \mathbb{Q} and discontinuous on \mathbb{R} \setminus \mathbb{Q} as I have already noted.

I interpreted the OP to refer to the restriction of the function to Q; the restriction of the characteristic function to Q is the constant function 1, which is continuous.

There may be a technical issue of defining the function on Q as a stand-alone space, so that f==1 is continuous, or in defining it in Q as a subspace of R, in which case it is not.
 
Bacle2 said:
I interpreted the OP to refer to the restriction of the function to Q; the restriction of the characteristic function to Q is the constant function 1, which is continuous.

And I noted in my last post that he does in fact show f|_{\mathbb{Q}} is continuous. But the problem almost surely wants him to find a function f such that f is continuous on a dense subset of \mathbb{R} but discontinuous somewhere on \mathbb{R}. That is different that showing that f|_{\mathbb{Q}} is continuous on a dense subset of \mathbb{R} but that f is discontinuous on \mathbb{R}. So the OP most certainly does not have a valid solution.
 
  • #10
Well, if the OP wanted the case you described, he is not done. Only he knows what he wants.

At any rate , a way of approaching the issue is: like the OP said, continuity implies sequential continuity, so that we want (xn→x)→(f(xn)→f(x)).
Does continuity on a dense subset allow to conclude this will happen ? (hint: do continuous functions always take Cauchy sequences to Cauchy sequences?)
 
  • #11
so could you possibly give me a suggestion to point me in the right direction?
 
  • #12
Sure; if you can have a function f send Cauchy sequences to Cauchy sequences, (using the fact that ℝ is complete) , then the Cauchy sequence xn, with xn→x
will be sent to the Cauchy sequence f(xn) , which will then converge to f(x), giving you continuity.

Problem is that continuity of f alone is not strong-enough to guarantee this preservation of Cauchy sequences. An example is that of f(x)= 1/(x-a) , for certain choices of a. This f is continuous on Q (given the right choice of a) , but Cauchy sequences near 'a' will not map to Cauchy sequences.

Does that help?
 
  • #13
maybe i am thinking too simply here, but how about something like f(x)= 1/(x-\sqrt{2}). this function would be continuous on Q, but discontinuous at x=\sqrt{2}, therefore discontinuous on (ℝ-Q)?
 
  • #14
No, perfect, that is what I was implying. Note that by adding a few of these, you can have discontinuities where you choose.
Now, a followup you may want to consider: what added condition on f would guarantee that Cauchy seqs. are sent to Cauchy seqs.? If you prefer, I'll just tell you and you can prove it works.
 
  • #15
that would be great i am cramming for a big test tomorrow morning
 
  • #16
O.K: Uniform continuity does preserve Cauchy seqs. Good luck on the test.
 
  • #17
thanks for the help, this thread cleared that up nicely i think
 
  • #18
Good to hear that; no problem.
 
  • #19
I don't think this thread has really gotten anywhere near the crucial example. There's a pretty well known function that is continuous for all irrational points in R and discontinous for all rational points.
 
  • #20
Maybe not the crucial example, but I think the key issue --preservation of Cauchy sequences-- has been brought up, together with the result that uniformly-continuous functions preserve Cauchy seqs.

I guess you're referring to f(x)=1/q for x=p/q, and f(x)=0 otherwise.
 
  • #21
Bacle2 said:
Maybe not the crucial example, but I think the key issue --preservation of Cauchy sequences-- has been brought up, together with the result that uniformly-continuous functions preserve Cauchy seqs.

I guess you're referring to f(x)=1/q for x=p/q, and f(x)=0 otherwise.

You bet I am. I'm not sure what this has to do with uniformly continuous functions. They won't give you a counterexample.
 
  • #22
Dick said:
You bet I am. I'm not sure what this has to do with uniformly continuous functions. They won't give you a counterexample.

f(x)=1/(x-√2) is continuous , but not uniformly continuous, and cannot be extended continuously. Any uniformly-continuous function can be extended, by declaring the value at f(x) to be the limit of f(xn) , as xn→ x ( to generalize, we need the function to be defined in a complete metric space). By sequential continuity, if f is continuous at x, then it is also sequentially-continuous; if f takes Cauchy sequences to Cauchy sequences, then {f(xn)} will be Cauchy and convergent; if f does not preserve Cauchy, then {f(xn} will not be Cauchy for some {xn}, and will therefore not converge.
 
  • #23
Bacle2 said:
f(x)=1/(x-√2) is continuous , but not uniformly continuous, and cannot be extended continuously. Any uniformly-continuous function can be extended, by declaring the value at f(x) to be the limit of f(xn) , as xn→ x ( to generalize, we need the function to be defined in a complete metric space). By sequential continuity, if f is continuous at x, then it is also sequentially-continuous; if f takes Cauchy sequences to Cauchy sequences, then {f(xn)} will be Cauchy and convergent; if f does not preserve Cauchy, then {f(xn} will not be Cauchy for some {xn}, and will therefore not converge.

Sorry, I'm not really seeing what this has to do with showing you can have a discontinuous function that is continuous on a dense set of R. Am I missing something?
 
  • #24
Yes, you're right; the OP is a little ambiguous, since you can choose to define f in anyway you want outside of the dense subset. The question ultimately became--as I saw it--one of extending a continuous function from a dense subset into the superset; in that case, it is U.Continuity that guarantees that it is possible to do the extension.
 
  • #25
Ok, so you are working on a totally different problem. Showing you can extend a function continuous on a dense subset to one continuous the whole set? I don't think the OP was all that ambiguous. The OP was asking "If f:ℝ→ℝ is continuous on a dense set of points in ℝ, then f is continuous on ℝ." That means ALL extensions have to be continuous. Not just the continuous one.
 
  • #26
You're right, but if f is only defined on a dense subset, we can define the function to have any value outside of the dense subset. Don't we have just one possible continuous extension? We may be using extension differently.
 
  • #27
Bacle2 said:
You're right, but if f is only defined on a dense subset, we can define the function to have any value outside of the dense subset. Don't we have just one possible continuous extension? We may be using extension differently.

Bacle2, you are confusing two things. There is one possible continuous extension. You don't want that one. You want a counterexample. You CAN'T define the function to be anything you want outside of the dense set. The definition has to be consistent with being continuous on the dense set. The Dirichlet extension is discontinuous everywhere. Thomae's function (or popcorn function) is an extension that is still continuous on the dense set R/Q. And sure it's not unique. It's just one of the simplest.
 
Last edited:
Back
Top