A question on continuous function

consider the function on [0,1] f(x)=1/q if x=p/q, p&q are non zero & p,q are positive integers,
p/q is in simplest form.
= 0 if x=0 or irrational

need to show the set of discontinuities of f(x) is the set of all non zero rationals in [0,1]

Last edited by a moderator:

Quick sketch:
Show that for each real number a, limit of d as x goes to a is 0. You can do that by showing that rationals with bounded numerator are nowhere dense. From this everything you need to prove follows trivially.
Good luck!

Thanks for the help..but I'm still not very clear with your answer. I was thinkng of doing this by using sequential continuity..like takng a random seq. <an> of non zero rationals converging to a non zero rational x. And then claiming <f(an)> not converging to f(x)..so dont know whether this approach is correct..

Last edited by a moderator:
Yes, it's correct. By taking any convergent sequence, we can show that limit of a function is zero at every point. It can be done from Cauchy definition of limit as well. Given a real number x, and arbitrary $$\epsilon$$, we show that in some neighbour of x rationals have denominators (I've made a mistake in previous post) large enough for function to have values less than $$\epsilon$$. Your approach (sequences) is essentially the same.

can anybody pls help me in solving d following question:

consider d function on [0,1] f(x)=1/q if x=p/q, p&q are non zero & p,q are +ve integers,
p/q is in simplest form.
= 0 if x=0 or irrational

need to show the set of discontinuities of f(x) is the set of all non zero rationals in [0,1]

This is not a particularly difficult question, but it most certainly sounds like a question from a class -- either homework or a test question.

So please explain the origin of the question and why providing you with an approach or an answer is consistent within the ethics of the course -- is not cheating.

When I took such classes, obtaining outside help on a question like this would have clearly been considered cheating.

Last edited:
this is neithr a homework nor a test question...m doing my msc. now...its a question of riemann integral dat i studied in b.sc...was going thru my notes...v actually need 2 show dis function is riemann integrable bt v cannot use d result"a bdd. functn for which d set of discontnuities has finfitely many limit points is riemann integrable." as dis isnt d case here..my prof. told me d set of continuities of dis fiunction bt i jst wantd 2 verify myself...was getng lil confused...so askd 4 help...jst 2 add 2 my knowledge...dats it..n nt 2 get gud marks or appreciation frm d prof....m nt into all dese thngs...

this is neithr a homework nor a test question...m doing my msc. now...its a question of riemann integral dat i studied in b.sc...was going thru my notes...v actually need 2 show dis function is riemann integrable bt v cannot use d result"a bdd. functn for which d set of discontnuities has finfitely many limit points is riemann integrable." as dis isnt d case here..my prof. told me d set of continuities of dis fiunction bt i jst wantd 2 verify myself...was getng lil confused...so askd 4 help...jst 2 add 2 my knowledge...dats it..n nt 2 get gud marks or appreciation frm d prof....m nt into all dese thngs...

It is Riemann integrable because the set of discontinuities has Lebesgue measure 0.

thnx..bt i knew dis function is rieman integrble...was stuck up sumwhere else...

Yes, it's correct. By taking any convergent sequence, we can show that limit of a function is zero at every point. It can be done from Cauchy definition of limit as well. Given a real number x, and arbitrary $$\epsilon$$, we show that in some neighbour of x rationals have denominators (I've made a mistake in previous post) large enough for function to have values less than $$\epsilon$$. Your approach (sequences) is essentially the same.

thank you for the help..i have got it..