Spivak Thomae's Function proof explanation

In summary, @mathwonk has shown that the limit of f(x) as x tends to a(it is between 0 and 1) is 0. He has also shown that there is a ¿(delta) for which 0<|x-a|<¿.
  • #1
Alpharup
225
17
I am using Spivak calculus. Now Iam in the chapter limits. In pages 97-98, he has given the example of Thomaes function. What he intends to do is prove that the limit exists.
He goes on to define the thomae's function as
f(x)=1/q, if x is rational in interval 0<x<1
here x is of the form p/q where p and q are integers and q>0
f(x)=0, if x is irrational
He proves that the limit of f(x) as x tends to a(it is between 0 and 1) is 0
a can be either rational or irrational
He starts the argument like this. He assumes a natural number n so large such that (1/n)<=€, ie..(1/n) is lesser than or equal to epsilon.
Since, L =0 ( The assertion he gives on value of this limit),
he writes that |f(x)-L| or |f(x)-0|<€,
He says that the numbers x which don't satisfy this inequality are...
1/2,
2/3
1/4,
3/4,
1/5,..
and he also includes
1/n...(n-1)/n..
My doubt is how?
Why don't these numbers satisy/ why is it false?
For example, consider x=1/n
so, f(x)=1/n
|1/n|<€. Is it not true? Isn't the inequality true?
Wont it lead to contradiction?

Where have I gone wrong?
 
Last edited:
Physics news on Phys.org
  • #2
you have a misprint in your question. rather f(x) = 1/q, if x = p/q is in lowest terms. then the point is that no matter what a is, at all nearby irrationals f has value zero, and also at all sufficiently nearby rationals different from a, f has value 1/n for arbitrarily large n. hence in both cases the value of f(x) is as small as you like for x near a but x≠a.

i.e. given e>0, there are only a finite number of points x where f(x) > e. so just get x closer to a than any of these points, and then you will have |f(x) - 0| < e. and this is usually called dirichlet's function i thought. ok now i see a web reference calling it also thomae, and also little riemann. never heard of that beofre.
 
Last edited:
  • Like
Likes Alpharup
  • #3
mathwonk said:
you have a misprint in your question. rather f(x) = 1/q, if x = p/q is in lowest termsm
yes got it corrected
 
  • #4
mathwonk said:
. then the point is that no matter what a is, at all nearby irrationals f has value zero, and also at all sufficiently nearby rationals different from a, f has value 1/n for arbitrarily small n. hence in both cases the value of f is as small as you like near
oh, do you mean to say that n can be 2,3,4,5...ie...(smaller ones) rather than say n=1,000,000( very large)?
 
  • #5
Alpharup said:
oh, do you mean to say that n can be 2,3,4,5...ie...(smaller ones) rather than say n=1,000,000( very large)?
I think the "arbitrarily small n" is a typo. What @mathwonk meant is that at all sufficiently nearby rationals different from a, f has value 1/n with arbitrarily small 1/n (or arbitrarily large n, if you prefer).
 
  • Like
Likes Alpharup
  • #6
thanks! fixed.
 
  • #7
mathwonk said:
you have a misprint in your question. rather f(x) = 1/q, if x = p/q is in lowest terms. then the point is that no matter what a is, at all nearby irrationals f has value zero, and also at all sufficiently nearby rationals different from a, f has value 1/n for arbitrarily large n. hence in both cases the value of f(x) is as small as you like for x near a but x≠a.

i.e. given e>0, there are only a finite number of points x where f(x) > e. so just get x closer to a than any of these points, and then you will have |f(x) - 0| < e. and this is usually called dirichlet's function i thought. ok now i see a web reference calling it also thomae, and also little riemann. never heard of that beofre.
now i get it...n is so large...a rational number nearest to 'a' maybe some d/n...here d<n...d is also an integer.
the value of f at d/n is 1/n( by definition)
The points other than than rational numbers are irrational.
We have proved that |f(x)-0|<€ for irrational ponts...Now our concern is delta argument on these irrational points. We have to prove that there is a ¿(delta) for which 0<|x-a|<¿...
To prove that, we have to invoke a rational number p/q closest to a...
2 cases...
1...a is irrational, |(p/q)-a| =¿(let us assume).
in between a and p/q, there are only irrational numbers. If there were rational numbers, then p/q is not the closest rational( a contradiction)
2. If a is rational, let the closest rational be p/q...let us assume |(p/q)-a |=¿ ..there are only irrationals between (p/q) and a( otherwise a contradiction).
For any number x not equal to either a or p/q, and inbetween them,
can be written as 0<|x-a|<¿.
x is defintely irrational.
For irrationals, ¿ > 0 can be found
Thus, limit exists.
Is this right?
 
  • #8
Alpharup said:
now i get it...n is so large...a rational number nearest to 'a' maybe some d/n...here d<n...d is also an integer.
the value of f at d/n is 1/n( by definition)
The points other than than rational numbers are irrational.
We have proved that |f(x)-0|<€ for irrational ponts...Now our concern is delta argument on these irrational points. We have to prove that there is a ¿(delta) for which 0<|x-a|<¿...
To prove that, we have to invoke a rational number p/q closest to a...
2 cases...
1...a is irrational, |(p/q)-a| =¿(let us assume).
in between a and p/q, there are only irrational numbers. If there were rational numbers, then p/q is not the closest rational( a contradiction)
2. If a is rational, let the closest rational be p/q...let us assume |(p/q)-a |=¿ ..there are only irrationals between (p/q) and a( otherwise a contradiction).
For any number x not equal to either a or p/q, and inbetween them,
can be written as 0<|x-a|<¿.
x is defintely irrational.
For irrationals, ¿ > 0 can be found
Thus, limit exists.
Is this right?
No. There is no such thing as a closest rational to an irrational number. Also, each non-empty interval in ##\mathbb R## contains infinitely many rational numbers and infinitely many irrational numbers

You have to prove that given an ##\epsilon>0##, there exists a ##\delta>0## such that when ##0<|x-a|<\delta##, ##|f(x)|<\epsilon##.
Now take ##n \in \mathbb N, \ n>=1/\epsilon##. Only the rational numbers ##y## with a denominator (meant is the lowest possible positive denominator) smaller than or equal to ##n## can have ##f(y)>=\epsilon##. But there are only finitely many such rational numbers.
So now take ##\delta>0## smaller than the shortest distance between ##a## and one of those rational numbers ##y## with ##f(y)>=\epsilon##. This insures that any rational number ##x## satisfying ##0<|x-a|<\delta## will be equal to some p/q, with q>n (where again q is the lowest possible positive denominator).

Finally, with this choice of ##\delta##:
If ##0<|x-a|<\delta##, we then have ##|f(x)|<\epsilon##:
for irrational ##x, \ f(x)=0<\epsilon##,
and for rational ##x=p/q,\ f(x)=1/q<\epsilon##.
 
Last edited:
  • #9
oh...i get it...the condition f(x)>€ for 1/2,
2/3 ...and 1/n, (n-1)/n
for which |f(x)| is denominator of such numbers. This condition condition |f(x)|> €fails for rational numbers with denominator n+1. Because n is finite, the rational numbers between 0 and 1 is finite. Is this right?
 
  • #10
Alpharup said:
oh...i get it...the condition f(x)>€ for 1/2,
2/3 ...and 1/n, (n-1)/n
for which |f(x)| is denominator of such numbers. This condition condition |f(x)|> €fails for rational numbers with denominator n+1. Because n is finite, the rational numbers between 0 and 1 is finite. Is this right?
No.
There are only finitely many rational numbers with lowest possible positive denominator smaller then n.
 
Last edited:
  • Like
Likes Alpharup
  • #11
what about those greater than n? do they exist?
 
  • #12
Alpharup said:
what about those greater than n? do they exist?
Of course, infinitely many of them, but for these ##f(x)## will be smaller than the chosen ##\epsilon##.
 
  • Like
Likes Alpharup
  • #14
Samy_A said:
Of course, infinitely many of them, but for these ##f(x)## will be smaller than the chosen ##\epsilon##.
Shouldn't the proof involve induction( Just wondering)? Like proving for n+1 though we proved for n?
 
  • #15
Alpharup said:
Shouldn't the proof involve induction( Just wondering)? Like proving for n+1 though we proved for n?
No.
We didn't "prove it for n".

As in a typical ##\epsilon \ \delta## proof, we proved it for every ##\epsilon>0##.
Once we picked one specific ##\epsilon>0##, the ##n## was conveniently chosen so that it satisfies ##n >=1/\epsilon##. Whatever ##\epsilon>0## is, such an ##n \in \mathbb N## always exists.
 
  • Like
Likes Alpharup
  • #16
Samy_A said:
Once we picked one specific ϵ>0\epsilon>0, the nn was conveniently chosen so that it satisfies n>=1/ϵn >=1/\epsilon. Whatever ϵ>0\epsilon>0 is, such an n∈Nn \in \mathbb N always exists.
The axiom of Archimedes (just thought I should mention it, because it is not that trivial).
 
  • Like
Likes Alpharup
  • #17
Now I get it. The condition that n exists whenever €> 0 and n>=(1/£) is always true for whatever value of £ may be. £ can be 0.1 or 0.000001, so accordingly n varies.
 
  • #18
Alpharup said:
Now I get it. The condition that n exists whenever €> 0 and n>=(1/£) is always true for whatever value of £ may be. £ can be 0.1 or 0.000001, so accordingly n varies.
Yes, that's correct. (assuming £=€=ε :) )
 
  • #19
Svein, i t depends on your point of view, doesn't it? I.e. if you take the usual lub-complete ordered field axioms for the reals as your starting point, then the axiom of archimedes is a pretty easy corollary, maybe not entirely trivial, as you say, but if you take as definition of the reals the set of infinite decimals, with the usual equivalence relation, which is the perspective of most calculus books, then archimedes' axiom is quite trivial. come to think of it though, you are right that in the context of spivak's treatment, he starts from the axioms. of course he also proves archimedes' axiom as a theorem. in his appendix however he constructs the reals as decimals. just a remark.
 
  • #20
My take on it is that for every n, you will have n copies of 1/n in [0,1], so that you can always make an interval ##(x- \delta, x+ \delta) ## around your number small-enough to avoid having copies of 1/n inside of the interval for ## n=1,2,...,k ## for fixed k. Think of using ##n!## to construct your interval. i.e., for x=p/q , for fixed value of ##\epsilon ## , you first find (using Archimedean Principle to guarantee this, as pointed out by someone) ##n_0## large -enough so that ## 1/n_0 < \epsilon ## . Then there are only finitely-many numbers ## 1/1,1/2,...,1/(n_0-1) ## ( basically 1/1,1/2,2/2, 1/3,2/3,...are all mapped into 1/1,1/2,1/3 , etc.) , so that you can find an interval around p/q which will exclude all of these values , so that every other value p'/q' that falls inside of your interval will be less than ## f(p/q)=1/q < \epsilon ## .

Take , say ##x= 0.5, \epsilon =0.015 ## , and find ## \delta ## to create an interval ##((1/2) - \delta, (1/2)+ \delta) ## where ## f(x) < \epsilon = 0.015 ## . You first find ##n: 1/n < 0.015 ##. n=70 works. Now you want to find ## \delta ## to construct an interval ##((1/2)-\delta, (1/2)+ \delta) ## so that all values {f(x)} in the interval are less than ##0.015## . Well, there are only finitely-many values {1/n: n < 70 } in the interval, so you can find a way of avoiding them all by making your interval small-enough.
 
Last edited:
  • #21
Why do we specifically take 1/n<=ε and not 1/n <ε? Won't it work the same?
 
  • #22
Alpharup said:
Why do we specifically take 1/n<=ε and not 1/n <ε? Won't it work the same?
Doesn't matter. If you prefer you can work with 1/n<ε in this proof.

Lets take, as an example, the condition for continuity of a ##\mathbb R \to \mathbb R## function ##f## in point ##a##:
##\forall \epsilon>0 \ \exists \delta>0: \forall x: |x-a|<\delta \ \Rightarrow |f(x)-f(a)|<\epsilon##
It's easy to prove that this is equivalent to:
##\forall \epsilon>0 \ \exists \delta>0: \forall x: |x-a|\leq \delta \ \Rightarrow |f(x)-f(a)|\leq \epsilon##.
 
  • #23
Samy_A said:
Doesn't matter. If you prefer you can work with 1/n<ε in this proof.

Lets take, as an example, the condition for continuity of a ##\mathbb R \to \mathbb R## function ##f## in point ##a##:
##\forall \epsilon>0 \ \exists \delta>0: \forall x: |x-a|<\delta \ \Rightarrow |f(x)-f(a)|<\epsilon##
It's easy to prove that this is equivalent to:
##\forall \epsilon>0 \ \exists \delta>0: \forall x: |x-a|\leq \delta \ \Rightarrow |f(x)-f(a)|\leq \epsilon##.
I get it now. Spivak takes this way so that it will be easy to correlate to definition of limit.
 
  • #24
Alpharup said:
I get it now. Spivak takes this way so that it will be easy to correlate to definition of limit.
The standard limit use , AFAIK is ## (x \rightarrow a ) \rightarrow (f(x) \rightarrow f(a) )## .
 
  • #25
Alpharup said:
I get it now. Spivak takes this way so that it will be easy to correlate to definition of limit.
You overthink the difference between 1/n<ε and 1/n<=ε in this case. It really doesn't matter, and I doubt Spivak had any deep reason to pick one rather than the other.
 
  • #26
##\forall \epsilon>0 \ \exists \delta>0: \forall x: |x-a|<\delta \ \Rightarrow |f(x)-f(a)|<\epsilon##
It's easy to prove that this is equivalent to:
##\forall \epsilon>0 \ \exists \delta>0: \forall x: |x-a|\leq \delta \ \Rightarrow |f(x)-f(a)|\leq \epsilon##.
Right. However, in a more general, i.e. topological sense of continuity the first one is the correct one. Hence I'd always use it. If it were only for consistency or to avoid misunderstandings. And my personal opinion is: "≤" is ugly here for using closed sets.
 
  • #27
fresh_42 said:
Right. However, in a more general, i.e. topological sense of continuity the first one is the correct one. Hence I'd always use it. If it were only for consistency or to avoid misunderstandings. And my personal opinion is: "≤" is ugly here for using closed sets.
Sure. But according to the OP Spivak used ≤ in this particular proof. In the given context it really doesn't matter.

Whether it is good pedagogy is a matter of discussion. My 1st year Mathematical Analysis professor was very strict on these things, and would, like you, always use <. But that was more then 40 years ago, and I have become a little more forgiving.
 
  • #28
Please don't get me wrong. I want nothing less than criticize you. Therefore I removed your name from the quotation. It was just that as I saw it (≤) it somehow felt wrong and I started to ask myself why. I remember a similar discussion long ago, I guess some 30 years, whether one could denote a matrix ##A_{ji}##. I'm still convinced that one should avoid it. Conventions may be broken, but IMO they are there for good reasons.
It is as with the usage of language: Someone should only play and make fun with it if he knows the correct usage. But you are right. It's a matter of discussion.

EDIT: Which means: You using the "≤" is by far not the same thing as anybody using it since you know what you're doing. Those who start learning might not.
 
Last edited:
  • #29
fresh_42 said:
Please don't get me wrong. I want nothing less than criticize you. Therefore I deleted your name in the quotation. It was just that as I saw it (≤) it somehow felt wrong and I started to ask myself why. I remember a similar discussion long ago, I guess some 30 years, whether one could denote a matrix ##A_{ji}##. I'm still convinced that one should avoid it. Conventions may be broken, but IMO they are there for good reasons.
It is as with the usage of language: Someone should only play and make fun with it if he knows the correct usage. But you are right. It's a matter of discussion.
I wasn't in the least offended, no problem.
 
  • Like
Likes fresh_42
  • #30
Samy_A said:
Lets take, as an example, the condition for continuity of a ##\mathbb R \to \mathbb R## function ##f## in point ##a##:
##\forall \epsilon>0 \ \exists \delta>0: \forall x: |x-a|<\delta \ \Rightarrow |f(x)-f(a)|<\epsilon##
It's easy to prove that this is equivalent to:
##\forall \epsilon>0 \ \exists \delta>0: \forall x: |x-a|\leq \delta \ \Rightarrow |f(x)-f(a)|\leq \epsilon##.

Sorry( for nagging), but how can we prove? Thought about it but I feel that I can't come up with my own proof.
 
  • #31
Alpharup said:
Sorry( for nagging), but how can we prove? Thought about it but I feel that I can't come up with my own proof.
(1) ⇒ (2) is obvious.
In the other direction simply consider ε and ε' = ε - 1/n for sufficiently large n.
 
  • Like
Likes Alpharup
  • #32
Alpharup said:
Sorry( for nagging), but how can we prove? Thought about it but I feel that I can't come up with my own proof.
Let's prove that
(1) ##\forall \epsilon>0 \ \exists \delta>0: \forall x: |x-a|<\delta \ \Rightarrow |f(x)-f(a)|<\epsilon##
implies
(2) ##\forall \epsilon>0 \ \exists \delta>0: \forall x: |x-a|\leq \delta \ \Rightarrow |f(x)-f(a)|\leq \epsilon##.

Take ##\epsilon>0##
From (1) we know that ##\exists \delta_1>0: \forall x: |x-a|<\delta_1 \ \Rightarrow |f(x)-f(a)|<\epsilon##
Set ##\delta = \delta_1/2##
Then if ##|x-a|\leq \delta##, surely ##|x-a|<2*\delta=\delta_1##, so that ##|f(x)-f(a)|<\epsilon##
But if ##|f(x)-f(a)|<\epsilon##, surely ##|f(x)-f(a)|\leq\epsilon##
Hence we have deduced (2) from (1)

EDIT: @fresh_42 has given you a hint for (2) implies (1).
 
  • Like
Likes Alpharup
  • #33
The idea is simple, therefore I called it obvious (in both directions). In every ball (interval) with positive radius (length) you can always find another ball (interval) within with a smaller but still positive radius (length). Therefore it doesn't matter whether you consider the balls (intervals) with or without their surface (boundaries). In general topological spaces, however, continuity is defined without the surfaces / boundaries because they are not always as convenient as ##ℝ## or ##ℝ^n##. This has been the reason for Samy's and mine short debate on the issue. And it is the reason why Samy's Analysis professor insisted on "<". To his excuse I'd like to mention that it's been in the 1st year so he probably was especially fussy.
 
  • #34
fresh_42 said:
The idea is simple, therefore I called it obvious (in both directions). In every ball (interval) with positive radius (length) you can always find another ball (interval) within with a smaller but still positive radius (length). Therefore it doesn't matter whether you consider the balls (intervals) with or without their surface (boundaries). In general topological spaces, however, continuity is defined without the surfaces / boundaries because they are not always as convenient as ##ℝ## or ##ℝ^n##. This has been the reason for Samy's and mine short debate on the issue. And it is the reason why Samy's Analysis professor insisted on "<". To his excuse I'd like to mention that it's been in the 1st year so he probably was especially fussy.
I agree with everything, except the last part: my professor was always fussy. :oldsmile:
But I came to like him and appreciate him and his teaching. From day one he made it clear to our poor student brains that Mathematics has to be rigorous, and it was a lesson well learned. I may cut an edge sometimes now, but only when I know it is Ok to do so.
 
  • Like
Likes fresh_42
  • #35
Samy_A said:
But if ##|f(x)-f(a)|<\epsilon##, surely ##|f(x)-f(a)|\leq\epsilon##
Hence we have deduced (2) from (1)

EDIT: @fresh_42 has given you a hint for (2) implies (1).
I can't understand this step
 
<h2>1. What is Spivak Thomae's Function?</h2><p>Spivak Thomae's Function, also known as the Thomae Function or the Popcorn Function, is a mathematical function that is defined as f(x) = 0 for irrational numbers and f(x) = 1/n for rational numbers, where n is the smallest integer such that x can be written as a fraction with a denominator of n.</p><h2>2. What is the significance of Spivak Thomae's Function?</h2><p>Spivak Thomae's Function is significant because it is a counterexample to many common conjectures in mathematics, such as the Intermediate Value Theorem and the Continuity Theorem. It also serves as an example of a function that is continuous at irrational numbers but discontinuous at rational numbers.</p><h2>3. What is the proof for Spivak Thomae's Function?</h2><p>The proof for Spivak Thomae's Function involves showing that for any given rational number, there exists a neighborhood around it where the function takes on values close to 1, and for any given irrational number, there exists a neighborhood around it where the function takes on values close to 0. This can be done using the Archimedean Property and the Density of Rational Numbers.</p><h2>4. How does Spivak Thomae's Function relate to the concept of continuity?</h2><p>Spivak Thomae's Function is an example of a function that is continuous at irrational numbers but discontinuous at rational numbers. This means that it satisfies the definition of continuity at all irrational numbers, but not at any rational numbers. This highlights the importance of specifying the domain of a function when discussing continuity.</p><h2>5. Are there any real-world applications of Spivak Thomae's Function?</h2><p>While Spivak Thomae's Function may not have direct real-world applications, it serves as a valuable tool for understanding the concepts of continuity and differentiability in mathematics. It also highlights the importance of carefully defining functions and considering their domains when making mathematical statements.</p>

1. What is Spivak Thomae's Function?

Spivak Thomae's Function, also known as the Thomae Function or the Popcorn Function, is a mathematical function that is defined as f(x) = 0 for irrational numbers and f(x) = 1/n for rational numbers, where n is the smallest integer such that x can be written as a fraction with a denominator of n.

2. What is the significance of Spivak Thomae's Function?

Spivak Thomae's Function is significant because it is a counterexample to many common conjectures in mathematics, such as the Intermediate Value Theorem and the Continuity Theorem. It also serves as an example of a function that is continuous at irrational numbers but discontinuous at rational numbers.

3. What is the proof for Spivak Thomae's Function?

The proof for Spivak Thomae's Function involves showing that for any given rational number, there exists a neighborhood around it where the function takes on values close to 1, and for any given irrational number, there exists a neighborhood around it where the function takes on values close to 0. This can be done using the Archimedean Property and the Density of Rational Numbers.

4. How does Spivak Thomae's Function relate to the concept of continuity?

Spivak Thomae's Function is an example of a function that is continuous at irrational numbers but discontinuous at rational numbers. This means that it satisfies the definition of continuity at all irrational numbers, but not at any rational numbers. This highlights the importance of specifying the domain of a function when discussing continuity.

5. Are there any real-world applications of Spivak Thomae's Function?

While Spivak Thomae's Function may not have direct real-world applications, it serves as a valuable tool for understanding the concepts of continuity and differentiability in mathematics. It also highlights the importance of carefully defining functions and considering their domains when making mathematical statements.

Similar threads

Replies
5
Views
396
Replies
1
Views
1K
Replies
2
Views
1K
Replies
2
Views
795
Replies
4
Views
886
Replies
16
Views
2K
Replies
1
Views
944
Replies
11
Views
2K
  • Calculus
Replies
15
Views
2K
Back
Top