# Math question: Continuity at a point

**URL:** <https://boards.straightdope.com/t/math-question-continuity-at-a-point/598368>\
**Category:** Factual Questions\
**Created:** [October 2, 2011, 8:02pm UTC](https://boards.straightdope.com/t/math-question-continuity-at-a-point/598368 "2011-10-02T20:02:27Z")\
**Posts on this page:** 18\
**Page:** 2

<div class="post-metadata">

**Author:** ![ultrafilter](https://avatars.discourse-cdn.com/v4/letter/u/3d9bf3/32.png) [@ultrafilter](https://boards.straightdope.com/u/ultrafilter)\
**Post date:** [October 4, 2011, 11:08pm UTC](https://boards.straightdope.com/t/math-question-continuity-at-a-point/598368/21 "2011-10-04T23:08:56Z")

</div>

> [@robert\_columbia](#):
>
> Also, another way to define “continuous” is that if the derivative of the function is defined at a point or range, then that point or range is continuous for that original function. If f’(n) (the value of the derivative of function f at x=n) is not defined (e.g. infinity, negative infinity, or otherwise not defined in the real number system), then the function is discontinuous at that point. f(n) may or may not be defined.

[No](https://secure.wikimedia.org/wikipedia/en/wiki/Weierstrass_function). That’s not a pathological case, either–it’s well-known that the set of continuous functions with a derivative at even one point is very small in some technical sense.

---

<div class="post-metadata">

**Author:** ![Asympotically\_fat](https://avatars.discourse-cdn.com/v4/letter/a/e47c2d/32.png) [@Asympotically\_fat](https://boards.straightdope.com/u/Asympotically_fat)\
**Post date:** [October 4, 2011, 11:19pm UTC](https://boards.straightdope.com/t/math-question-continuity-at-a-point/598368/22 "2011-10-04T23:19:04Z")

</div>

I have to admit the idea of a function that is continuous at all irrational values, but discontinuous at all rational values seemed very counterintuitve to me, but this is the way I thought of it:

The real numbers can be constructed as equivalence classes of Cauchy sequences of rational numbers.

If you represent the rational numbers in the form p/q, where p is an integer and q is a natural number, then in any Cauchy sequence in an equivalence class representing an irrational number q must go to ∞ as n goes to ∞ (if not the sequence is either not a Cauchy sequence or it represents a rational number). Therefore 1/q goes to 0 as n goes to ∞.

And it’s quite easy to see from that why the function described by **Chronos** must be continuous for all irrational values.

One (admittedly very dubious) way of seeing it is that the denominator of a rational number becomes larger and larger the more ‘irrational’ it gets.

---

<div class="post-metadata">

**Author:** ![ultrafilter](https://avatars.discourse-cdn.com/v4/letter/u/3d9bf3/32.png) [@ultrafilter](https://boards.straightdope.com/u/ultrafilter)\
**Post date:** [October 4, 2011, 11:21pm UTC](https://boards.straightdope.com/t/math-question-continuity-at-a-point/598368/23 "2011-10-04T23:21:20Z")

</div>

> [@These are my own pants](#):
>
> One (admittedly very dubious) way of seeing it is that the denominator of a rational number becomes larger and larger the more ‘irrational’ it gets.

That’s hard to make sense of, but it’s very easy to see that you can only get so close to a given irrational number with a cap on the size of your denominators.

---

<div class="post-metadata">

**Author:** ![Asympotically\_fat](https://avatars.discourse-cdn.com/v4/letter/a/e47c2d/32.png) [@Asympotically\_fat](https://boards.straightdope.com/u/Asympotically_fat)\
**Post date:** [October 4, 2011, 11:33pm UTC](https://boards.straightdope.com/t/math-question-continuity-at-a-point/598368/24 "2011-10-04T23:33:29Z")

</div>

> [@ultrafilter](#):
>
> That’s hard to make sense of, but it’s very easy to see that you can only get so close to a given irrational number with a cap on the size of your denominators.

Yep, it’s not meant to be a mathematical statement. It’s how I intially thought of how the function Chronos described could be continuous at all irrational values, I then sought to express this idea as a more mathematical statement.

Perhaps I shouldn’t expect the shorthand that my own mind uses to make sense to nayone else.

---

<div class="post-metadata">

**Author:** ![Senegoid](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/senegoid/32/6606_2.png) [@Senegoid](https://boards.straightdope.com/u/Senegoid)\
**Post date:** [October 12, 2011, 1:38am UTC](https://boards.straightdope.com/t/math-question-continuity-at-a-point/598368/25 "2011-10-12T01:38:17Z")

</div>

I don’t see any post up-thread yet that specifically cites any Wikipedia pages. I just found them!

> [@Chronos](#):
>
> Actually, it might be instructive to first start with a few simpler cases. First, take the Dirichlet function: d(x) = {0: x irrational, 1: x rational}. OK, that’s kind of weird, but I think everyone can accept that it’s discontinuous everywhere.
> 
> Now, consider the function e(x) = d(x)\*x. This has much the same property as the Dirichlet function, except now, for any x close to zero, e(x) will also be close to zero, so it’s continuous at exactly that point. Once you accept that this function can be continuous at a single point, it’s a lot easier to see how the function in the OP is continuous at all the irrationals.

> [@Chronos](#):
>
> All right, now let’s play this game again with the function [the OP is] talking about. For the record, the function is h(x) = {0: x is irrational, 1/q: x = p/q in lowest terms}. We’ll play in the vicinity of pi. To keep things fully fair, I’ll let you choose a tolerance, and then I’ll answer with an interval. I’ll bet you that no matter what tolerance you pick, I can still win, which means that this function is continuous at pi.

I just found **Dirichlet** and the **above-described variation** on Wikipedia under “Nowhere continuous function” at:

> **[Dirichlet function](https://en.wikipedia.org/wiki/Dirichlet_function)**
>
> In mathematics, the Dirichlet function is the indicator function 
>   
>     
>       
>         
>           
> 1
>           
>           
>             
> Q
>             
>           
>         
>       
>     
> {\\displaystyle \\mathbf {1} \_{\\mathbb {Q} }}
>   
> of the set of rational numbers 
>   
>     
>       
>         
> Q
>         
>       
>     
> {\\displaystyle \\mathbb {Q} }
>   
> over the set of real numbers 
>   
>     
>       
>         
> R
>         
>       
>     
> {\\displaystyle It is...

And the OP’s function is called **“Thomae’s function”** a.k.a. **Popcorn function.** It has a jump discontinuity at every rational x and is continuous at every irrational x. That is on Wikipedia, including an informal proof and even a graph, at:

> **[Thomae's function](https://en.wikipedia.org/wiki/Thomae%27s_function)**
>
> Thomae's function is a real-valued function of a real variable that can be defined as:: 531 
> 
>   
>     
>       
> f
> (
> x
> )
> =
>         
>           
> {
>             
>               
>                 
>                   
>                     
> 1
> q
>                     
>                   
>                 
>                 
>                   
> if 
>                   
> x

# – senegoid

---

<div class="post-metadata">

**Author:** ![BigT](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/bigt/32/12044_2.png) [@BigT](https://boards.straightdope.com/u/BigT)\
**Post date:** [October 14, 2011, 7:31pm UTC](https://boards.straightdope.com/t/math-question-continuity-at-a-point/598368/26 "2011-10-14T19:31:13Z")

</div>

> [@Chronos](#):
>
> Actually, it might be instructive to first start with a few simpler cases. First, take the Dirichlet function: d(x) = {0: x irrational, 1: x rational}. OK, that’s kind of weird, but I think everyone can accept that it’s discontinuous everywhere.
> 
> Now, consider the function e(x) = d(x)\*x. This has much the same property as the Dirichlet function, except now, for any x close to zero, e(x) will also be close to zero, so it’s continuous at exactly that point. Once you accept that this function can be continuous at a single point, it’s a lot easier to see how the function in the OP is continuous at all the irrationals.
> 
> And **Hari Seldon** , does your post there imply that, say, the Heaviside function is not constructable? That seems a rather peculiar definition of “constructable”, to exclude something as simple as the Heaviside.

However, no matter what x you pick, I can find another number within interval [0,x] that is not continuous. Why isn’t continuity defined as present for an interval [x,z] iff [x,y] and [y,z] are continuous, where x\<y\<z? Why use such a counterintuitive definition of the term that allows a function to treat rationals as if they are on a completely separate number line than irrationals? What does this definition accomplish that **Frylock** ’s does not?

This what I need to accept a mathematical concept. For example, I accept that 0.999… = 1 because it’s the only way to allow repeating decimal representations of any fraction. I accept that points are infinitesimally small for the same reason. I accept that the infinitesimal _dx_ exists because it allows for instant velocity/acceleration/etc. But I cannot see a mathematical purpose to this concept of continuity.

Also, in Calc 1, I was taught exactly what **robert columbia** was taught: A function is continuous at an interval iff the derivative is also continuous at that interval. I remember specifically having problems that were based on that. Why I now lack the knowledge to prove it, it does seem that that fits my earlier definition of continuity, but not the apparent official one.

I also admit that, while I found all math through calculus to be a breeze, I don’t in any way understand the Wikipedia higher math articles. The best I’ve gotten is a conception of aleph null and it’s brethren.

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [October 14, 2011, 8:35pm UTC](https://boards.straightdope.com/t/math-question-continuity-at-a-point/598368/27 "2011-10-14T20:35:48Z")

</div>

> [@](#):
>
> Why use such a counterintuitive definition of the term that allows a function to treat rationals as if they are on a completely separate number line than irrationals? What does this definition accomplish that Frylock’s does not?

Plenty, given that **Frylock** didn’t actually offer a definition. The closest he came was “having an interval without any discontinuities”, but that doesn’t help, since you still have to define discontinuities. And how do you do that without already having a definition of continuities? The simplest definition of a discontinuity is to say that a function is discontinuous at a point if it is not continuous at that point, but now we’re right back to continuity being a property defined at a point.

> [@](#):
>
> Also, in Calc 1, I was taught exactly what robert columbia was taught: A function is continuous at an interval iff the derivative is also continuous at that interval.

You don’t need a very pathological example to show the problem with this one. Just take the absolute value function: The derivative of the absolute value function is clearly discontinuous at the origin, but I’m not aware of any definition by which the absolute value function is itself discontinuous.

It’s possible that the property you’re thinking of is C-infinity, or analytic. For a function to be C-infinity, it means that the function and all of its derivatives must be continuous. Analytic is similar, but even more strict, and also requires that the function behave well when extended to the complex plane.

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [October 14, 2011, 9:47pm UTC](https://boards.straightdope.com/t/math-question-continuity-at-a-point/598368/28 "2011-10-14T21:47:49Z")

</div>

One way of thinking about this concept of continuity, and of abstract topology more generally, is in terms of information or computation:

A function is continuous just in case it can be completely described via a bunch of rules of the form “If the input has primitive property P, then the output has primitive property Q”. To compute the function’s value on an input, splay out all the primitive properties that input has, then splay out all the consequences the rules deduce from that; the result will be all the primitive properties the output has (which presumably comprises a full specification of the output).

Of course, to make sense of this, one has to fix a notion of primitive property. For arithmetic, we usually take the primitive properties a number can have to be having a certain value to a certain (inexact) precision; these are the primitive data which comprise the specification of the number. E.g., a primitive property might be “x is somewhere between 5 and 7”, or “x is somewhere between 5.08 and 5.09”, or such things. [The fact that the primitive data can only specify a number up to inexact precision means, in some sense, that a continuous function is somewhat stable under small perturbations, which is one intuition for what “continuity” ought to be.]

This framework gives us the same definition of continuity for real number arithmetic as described above. But this also illustrates how to apply this idea more generally to study issues of information or computation in other contexts. For example, one other space often considered in this framework, with rather less geometric motivation, is the “topology” on bit-sequences where the primitive properties are “My kth element has value b”; then we could speak of continuity of functions from bit-sequences to bit-sequences in a manner which tracks quite well an intuitive account of what “stream computation” ought to be (specifically, a function is continuous in this manner if it’s possible to implement it by sitting there listening to the input stream piece by piece, and at the same time spitting out an output stream, piece by piece).

So if perhaps you can’t see why anyone would use an account of continuity other than intermediate value properties, try thinking in terms of information rather than geometry.

---

<div class="post-metadata">

**Author:** ![ultrafilter](https://avatars.discourse-cdn.com/v4/letter/u/3d9bf3/32.png) [@ultrafilter](https://boards.straightdope.com/u/ultrafilter)\
**Post date:** [October 14, 2011, 9:54pm UTC](https://boards.straightdope.com/t/math-question-continuity-at-a-point/598368/29 "2011-10-14T21:54:36Z")

</div>

> [@Chronos](#):
>
> It’s possible that the property you’re thinking of is C-infinity, or analytic. For a function to be C-infinity, it means that the function and all of its derivatives must be continuous. Analytic is similar, but even more strict, and also requires that the function behave well when extended to the complex plane.

Not quite. An analytic function is simply one that’s equal to its Taylor series everywhere. For a function from reals to reals, this really isn’t that strong a condition, but it does have some weight in the complex plane.

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [October 14, 2011, 10:04pm UTC](https://boards.straightdope.com/t/math-question-continuity-at-a-point/598368/30 "2011-10-14T22:04:21Z")

</div>

Just to clarify a little further: for a function to be analytic means that given any point, the Taylor series of the function centered at that point has a nonzero radius of convergence within which it agrees with the function. It won’t generally be the case that a single Taylor series converges to the function everywhere.

Basically, analytic is like saying “Ok, maybe the function isn’t exactly linear; maybe it experiences some acceleration. Maybe it isn’t exactly quadratic; maybe it experiences some jerk. Maybe it isn’t even exactly 17th degree. But, goshdarn it, once we’ve got all the finite derivatives down, we’ve accounted for everything!”.

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [October 14, 2011, 10:10pm UTC](https://boards.straightdope.com/t/math-question-continuity-at-a-point/598368/31 "2011-10-14T22:10:04Z")

</div>

(“finite derivatives” meaning “finite order derivatives”)

(Also, in an Abel summation-esque sense, there _will_ be a single Taylor series converging to the function everywhere, but that’s just tautology)

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [October 14, 2011, 10:18pm UTC](https://boards.straightdope.com/t/math-question-continuity-at-a-point/598368/32 "2011-10-14T22:18:05Z")

</div>

> [@Indistinguishable](#):
>
> One way of thinking about this concept of continuity, and of abstract topology more generally, is in terms of information or computation:

Oh, I forgot to say how this relates to continuity at a point: Continuity at a point means splaying out the primitive properties of that input point, then splaying out the primitive properties of the output which follow from this for that function, results in a full specification of the output at that point. The output has no primitive properties other beyond those produced by a primitive property of the input.

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [October 15, 2011, 12:37am UTC](https://boards.straightdope.com/t/math-question-continuity-at-a-point/598368/33 "2011-10-15T00:37:26Z")

</div>

But if a function is analytic, doesn’t that imply that it’s C-infinity on the reals? But the reverse isn’t true: A function can be C-infinity on the reals without being analytic. So doesn’t that mean that analyticity is, as I said, a stronger condition than C-infinity?

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [October 15, 2011, 12:43am UTC](https://boards.straightdope.com/t/math-question-continuity-at-a-point/598368/34 "2011-10-15T00:43:03Z")

</div>

That part was entirely correct. I think **ultrafilter** was taking issue with the idea (which you seemed perhaps to be stating in your post, though it wasn’t clear; you may have had something else in mind instead) that being analytic on the reals implies having an analytic (equivalently, C-infinity or even just differentiable) continuation to the entire complex plane. A function like 1/(1 + x^2) serves as a counterexample.

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [October 15, 2011, 12:49am UTC](https://boards.straightdope.com/t/math-question-continuity-at-a-point/598368/35 "2011-10-15T00:49:10Z")

</div>

Even simpler: x^(1/3)

---

<div class="post-metadata">

**Author:** ![ultrafilter](https://avatars.discourse-cdn.com/v4/letter/u/3d9bf3/32.png) [@ultrafilter](https://boards.straightdope.com/u/ultrafilter)\
**Post date:** [October 15, 2011, 12:51am UTC](https://boards.straightdope.com/t/math-question-continuity-at-a-point/598368/36 "2011-10-15T00:51:04Z")

</div>

> [@Indistinguishable](#):
>
> That part was entirely correct. I think **ultrafilter** was taking issue with the idea (which you seemed perhaps to be stating in your post, though it wasn’t clear; you may have had something else in mind instead) that being analytic on the reals implies having an analytic (equivalently, C-infinity or even just differentiable) continuation to the entire complex plane. A function like 1/(1 + x^2) serves as a counterexample.

Exactly. We don’t make as big a deal about real analytic functions because they don’t have as many nice properties as complex analytic functions, but they do exist.

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [October 15, 2011, 3:43am UTC](https://boards.straightdope.com/t/math-question-continuity-at-a-point/598368/37 "2011-10-15T03:43:59Z")

</div>

Is there any function which is C-infinity on the complex plane, but not analytic?

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [October 15, 2011, 4:36am UTC](https://boards.straightdope.com/t/math-question-continuity-at-a-point/598368/38 "2011-10-15T04:36:53Z")

</div>

> [@Chronos](#):
>
> Is there any function which is C-infinity on the complex plane, but not analytic?

No, complex differentiability throughout an open region implies analyticity throughout that region.

[Previous page](https://boards.straightdope.com/t/math-question-continuity-at-a-point/598368.md?page=1)
