15

Suppose $X\subseteq\mathbb{R}$ and $Y\subseteq\mathbb{R}$ are arbitrary sets.

Motivation:

I want to measure how discontinuous is a given function $f:X\to Y$. The measure should range from zero to positive infinity: e.g., when $f$ is continuous the measure should be zero; however, when $f$ is "hyper-discontinuous" the measure should be positive infinity.

When the measure of how discontinuous is a function has a value between zero and positive infinity, the more "disconnected" the graph of $f$, the higher the value of the measure.

Question:

Does a measure of how discontinuous $f$ is exist? If not, how do we create one?

Arbuja
  • 53
  • 1
    Comments have been moved to chat; please do not continue the discussion here. Before posting a comment below this one, please review the purposes of comments. Comments that do not request clarification or suggest improvements usually belong as an answer, on [meta], or in [chat]. Comments continuing discussion may be removed. – Shaun Jan 20 '25 at 10:26
  • You can always try to count the amount of discontinuity points, if possible :-) – Dominique Jan 20 '25 at 14:59

5 Answers5

12

This way to measure the total discontinuity of a function is based on the following definition from Spivak's "Calculus on Manifolds" (p. 12-13): Let $f:\mathbb{R}\to\mathbb{R}$ be bounded. Then define the oscillation of $f$ at $a\in\mathbb{R}$, $o(f,a)$, by $$o(f,a)=\lim_{\delta\to 0} M(f,a,\delta)-m(f,a,\delta),$$ where $M(f,a,\delta)$ and $m(f,a,\delta)$ are the max and min of $f$ on the open ball centered at $a$ of radius $\delta$, respectively (if we allow $f$ to be only bounded from below or from above, then we can extend the definition by allowing $o(f,a)$ to possibly be infinite. If $f$ is unbounded, it could be that the oscillation is not well defined, for example looking at $o(f,0)$ for a function $f=1/x$ on $\mathbb{R}\setminus \{0\}$).

This limit exists since $o(f,a)$ decreases as $\delta$ decreases, and the quantity in the limit is bounded below by zero. As Spivak notes, $o(f,a)$ is a way to measure how discontinuous a function is at a point. The above definition can easily be lifted to any bounded function $f:X\to Y$ for $X,Y\subset \mathbb{R}$ just by restricting everything to the subspace topology on $X$. Then one can show that $f$ is continuous at $x\in X$ if and only if $o(f,x)=0$ (with this in mind, one could also extend this definition to measure the level of continuity on an arbitrary metric space instead of just $\mathbb{R}$).

Now we make some additional observations about the oscillation $o(f,x)$. First, observe that $o(f,x)$ is upper-semicontinuous, and therefore Lebesgue measurable (see here for more references and additional properties of the oscillation of a function). Moreover, a standard result in a measure theory class is that $D_f$, the set of discontinuities of a function $f$, is a Lebesgue measurable set.

Therefore, if one wants to obtain a measure of how discontinuous a function is, the following seems like a natural candidate in light of the above exposition: $$MC(f):=\int_{D_f} o(f,x)\:d\lambda(x),$$ where the integral is with respect to the Lebesgue measure (we restrict the domain of integration to be $D_f$ so that the definition makes sense even when the more natural domain $X$ is non measurable. If $X$ were measurable the two choices would coincide). Per the previous paragraphs, $MC(f)$ is well defined for any bounded function $f:X\to Y$.

I believe this definition also has all of the properties that were asked for by Arbuja. Since $o(f,x)=0$ iff $f$ is continuous at $x$, and because $o(f,x)\geq 0$, $MC(f)=0$ if and only if $f$ is continuous almost everywhere. Moreover, a function like $1_\mathbb{Q}$ has $MC(1_\mathbb{Q})=\infty$, since $o(1_\mathbb{Q},x)=1$ for all $x\in\mathbb{R}$ and $1_\mathbb{Q}$ is nowhere continuous.

We can also run a quick computation to see that this definition is able to qualitatively distinguish between functions where one is arguably "more continuous" than the other. Let $c>0$ and consider the function $$f_c(x)=e^{-cx^2}1_\mathbb{Q}(x).$$ Then even though $f_c$ is nowhere continuous, we could think of it as being more continuous than $1_\mathbb{Q}$ because $f_c$ rapidly approaches zero as $|x|\to\infty$, and so as $|x|$ becomes large, the function gets "closer" to being continuous in a loose sense. One can compute that $$o(f_c,x)=e^{-cx^2},$$ and from there it's straightforward to see that $MC(f_c)$ is a positive number which decreases to zero as $c\to\infty$ and increases to infinity as $c\to 0$. Note as $c\to 0$, $f_c$ approaches $1_\mathbb{Q}$ pointwise, while as $c\to\infty$, $f_c$ approaches 0 pointwise, which is continuous.

One limitation of this definition is that it cannot distinguish between $1_\mathbb{Q}$ and, say, $1_\mathbb{Q}/100$ in the sense these both have an infinite $MC$ if the domain $X$ on which we consider them has a subset of infinite measure. However even qualitatively I would posit this is not too much of an issue, since these functions are both discontinuous in a qualitatively identical way (both are discontinuous everywhere with constant oscillation). If you still wanted to find some way to compare the level of discontinuity between functions $f$ and $g$, something like $$\lim_{x\to\infty}\frac{MC(f|_{X\cap[-x,x]})}{MC(g|_{X\cap[-x,x]})}$$ could be useful (e.g. this would say that in some sense $1_\mathbb{Q}$ is 100 times more discontinuous than $1_\mathbb{Q}$), but I have not thought too much about it.

  • If you see my answer, note the set of all limit points of the graph of $\mathbf{1}{\mathbb{Q}}$ is $f(x)=0$ and $f(x)=1$. Hence, since there are two functions $f$ instead of one, I want the measure of how discontinuous $\mathbf{1}{\mathbb{Q}}(x)$ is to be $2-1=1$ – Arbuja Jan 21 '25 at 15:32
  • Can you adjust your answer to match this? – Arbuja Jan 21 '25 at 15:34
  • 3
    Instead of integrating with respect to the Lebesgue measure $d\lambda$, you could pick some function $f\in L^1(\mathbb{R})$ and integrate with respect to the measure $f:d\lambda$. If $\int_\mathbb{R}f:d\lambda=1$, then this would achieve your goal. The problem with this is that the choice is arbitrary, and since $L^1$ functions decay at infinity almost everywhere, changing the measure like this will bias the $MC$ toward the behavior of the function of interest where this chosen function $f$ is supported, which is a disadvantage my original construction doesn't have. – Eli Seamans Jan 21 '25 at 16:05
  • In two days, I will give you the bounty; however, I still think my answer is the best one. – Arbuja Jan 23 '25 at 14:30
  • Since I can't explain my answer well, I ask if you can find an answer which gives what I want. – Arbuja Jan 27 '25 at 16:48
3

One possibility is thinking in terms of Sobolev-like spaces... which give a finer gradation on generalized functions (=distributions) than merely saying "not a classical function". Also, the Sobolev idea is compatible with differentiation, and so on.

paul garrett
  • 55,317
0

Someone check if the the answer is wrong or over complex. If so, I hope there's a better version.

Motivation:

Let $X\subseteq \mathbb{R}$ and $Y\subseteq\mathbb{R}$ be arbitrary sets, where we define a function $f:X\to Y$.

Moreover, suppose $a,b\in\mathbb{R}$ and $\ell\subset\mathbb{R}^2$ is an arbitrary vertical line, where $\left\{(x,y)\in\mathbb{R}^2: a< x < b, y=0\right\}\cap \ell \not=\emptyset$.

When $f$ is continuous, $\ell$ interesects once with the graph of $f$, whereas if $f$ is the Dirichlet function, $\ell$ interesects with all limit points of the graph of $\left.f\right|_{[a,b]}$ twice. Therefore, we can subtract these values by one to get a measure of the discontinuity of $f$ on its domain.

However, when $f$ is "hyper-discontinuous", $\ell$ intersects with all limit points of the graph of $\left.f\right|_{[a,b]}$ zero times (when $f$ is discrete) or once ( when $\small{X=\mathbb{Q}\cap[0,1]}$) rather than infinitely. To fix this, $\ell$ should intersect with the intersection of the graph of $\left.f\right|_{[a,b]}$ and all limit points of the graph of $\left. f \right|_{[a,b]}$. The result would be zero, where the current measure is $0-1=-1$. Hence, since negative one is less than zero, we manipulate the current measure into the infimum of the emptyset or positive infinity.

Definition:

Suppose,

  • $a,b\in\mathbb{R}$
  • $G(a,b)$ is the graph of $\left.f\right|_{[a,b]}$
  • $\mathbb{G}(a,b)$ is all limit points of $G(a,b)$
  • $\ell\subset \mathbb{R}^2$ is a arbitrary non-vertical line, where $\left\{(x,y)\in\mathbb{R}^2: a< x < b, y=0\right\}\cap \ell \not=\emptyset$
  • $|\cdot|$ is the absolute value
  • $\#|\cdot|$ is the cardinality
  • $\mathcal{D}$ is the measure of discontinuity, where $$\scriptsize{\mathcal{D}=\inf\left(\left\{\sup\limits_{a,b\in\mathbb{R}}\bigg(\inf\limits_{\text{x-intercept}(\ell)\in(a,b)}\bigg(\limsup\limits_{|\text{slope}(\ell)|\to +\infty}\bigg\{z-1: z=\#\Big|G(a,b)\cap\mathbb{G}(a,b)\cap\ell\Big|\bigg\}\bigg)\bigg)\right\}\setminus\{-1\}\right)}$$

Examples:

Arbuja
  • 53
  • 1
    Comments have been moved to chat; please do not continue the discussion here. Before posting a comment below this one, please review the purposes of comments. Comments that do not request clarification or suggest improvements usually belong as an answer, on [meta], or in [chat]. Comments continuing discussion may be removed. – Shaun Jan 23 '25 at 16:04
0

This might sound ridiculously naïve, but what about simply counting the amount of discontinuity points?

Imagine $f_1 : \mathbb{R} \to \mathbb{R} : f_1(x) = 0$
The amount discontinuity points of $f_1(x)$ equals zero.

Imagine $f_2 : \mathbb{R} \to \mathbb{R} : f_2(x) = \text{sign}(x)$
The amount discontinuity points of $f_2(x)$ equals one ($x=0$).

Imagine $f_3 : \mathbb{R} \to \mathbb{R} : f_3(x) = \frac{1}{x^2-1}$
The amount discontinuity points of $f_3(x)$ equals two ($x=\pm 1$).

Imagine $f_4 : \mathbb{R} \to \mathbb{R} : f_4(x) = \frac{1}{\sin(\pi \cdot x)}$
The amount discontinuity points of $f_4(x)$ equals the amount of integer numbers ($\aleph_0$), as for every integer number, there's one discontinuity point.

Imagine $f_5 : \mathbb{R} \to \mathbb{R} : f_5(x) = 0$ if $x \in \mathbb {Q}$ and $f_5(x) = 1$ if $x \in \mathbb {R} / \mathbb {Q}$
The amount discontinuity points of $f_5(x)$ equals the amount of real numbers ($\aleph_1$), as for every real number, there's one discontinuity point.

Edit: what about "infinity_order()"?
You seem to say that:

  • in case the number of discontinuity points is finite, you want zero.
  • in case the number of discontinuity points is infinity, you want a higher number.

What if you create a function "infinity_order()", as follows: $\text{infinity_order}(n) = 0, \forall n \in \mathbb {Z}$
$\text{infinity_order}(\aleph_n) = n, \forall n \in \mathbb{N}$

Dominique
  • 3,267
  • 1
    That can be used, but it doesn't give the measure of discontinuity that I want. "The more disconnected the graph of $f$, the higher the measure of discontinuity." The first four functions have a Lebesgue measure of zero of discontinuous points, therefore the meaure of discontinuity should be zero. For $f_5$, I want the measure of discontinuity to be between zero and infinity. Since all limit points of the graph of $f_5$ lie on two lines (i.e., $f_5(x)=0$ and $f_5(x)=1$) we can say the discontinuity measure of $f_5$ is $2-1=1$. – Arbuja Jan 20 '25 at 16:10
  • 1
    Of course, I'm fine with any simpler concrete measures that give what I want. – Arbuja Jan 20 '25 at 16:10
  • 1
    @Arbuja: what if you take the "infinity_order" of the amount of discontinuity points? – Dominique Jan 21 '25 at 07:46
  • If $f$ is the Derichlet function what is the infinity order of the amount of discontinuity points. (The measure should be one.) I'm not sure about the meaning of "infinite order". – Arbuja Jan 21 '25 at 18:27
  • Hopefully, someone can check. – Arbuja Jan 21 '25 at 18:28
  • @Arbuja: what about $f_4$? I have defined the function "infinity_order" in such a way to have a distinct measure for $f_{1..3}$ and $f_4$. Is that ok or do you want $f_4$ to have the same measure as those previous ones? – Dominique Jan 23 '25 at 14:34
  • That should also have the same measure as the previous ones. The graph of $f_4$ is not "disconnected" compared to most discontinuous functions. (Furthermore, the measure should be between zero and infinity...not a cardinal number.) – Arbuja Jan 23 '25 at 14:42
  • @Arbuja: I've updated my "infinity_order()" function accordingly. – Dominique Jan 23 '25 at 14:46
0

For a function $f$ define $S_f$ to be the set of points for which $f$ is discontinuous. $S_f$ is measurable for any measurable function $f$. We can use the set density function $$d(S_f)(x)=\lim_{h \rightarrow 0} \frac{\mu(S_f \cap [x-h,x+h])}{2h}$$ Then the measure of discontinuity defined by $$\int_{-\infty}^{\infty} d(S_f) dx$$ (might?) meet what you're looking for.

Paul
  • 8,314
  • 1
    One thing that may be inconsistent with the intuition laid out by the OP is that this depends only on $S_f$ and not on $f$ per se. For instance, two functions could be nowhere continuous, but one could vary wildly (e.g. being unbounded on every open set), and the other could be bounded (e.g. the indicator function for the rationals). – Eli Seamans Jan 23 '25 at 22:45