If a function is continuous at a point and monotone, then does there exist a neighborhood around that point for which the function is continuous? I am trying to use this property in the context of answering Rudin Exercise 6.1. I will repeat the problem statement and my proof below, and I will embolden the part where I use the statement in the title.
Suppose $\alpha$ increases on $[a,b]$, and $\alpha$ is continuous at some $c \in [a,b]$. If $f(c) = 1$ and $f(x) = 0$ for $x \neq c$, then $f \in \mathcal{R}(\alpha)$ and $\int_a^b f(x) d\alpha(x) = 0$.
We verify the existence and value of the limit directly. Observe that
\begin{align*}
    \underline{\int_a^b}f dx &= \sup L(P,f,\alpha)\\
    &= \sup\left\{\sum_{i=1}^n m_i\Delta \alpha_i\right\} =0
\end{align*}
The above follows from the fact that the infimum of the function on any interval will be $0$ since the function is $0$ everywhere except at $c$.
Meanwhile, for the upper Riemann-Stieltjes integral, we claim that
\begin{align*}
    \overline{\int_a^b} f dx &= \inf U(P,f,\alpha) \\
    &=\inf\left\{\sum_{i=1}^n M_i\Delta \alpha_i\right\} =0
\end{align*}
To prove the equality above, let $\varepsilon>0$ be arbitrary. Since $c \in [a,b]$ it is not an isolated point. Since $\alpha$ is continuous and monotonic, we can find some interval $[x_k, x_{k+1}]$ around $c$ for which $\alpha$ is continuous. Choose points $x_k', x_{k+1}'$ in this interval so that $c \in [x_k', x_{k+1}']$ and so that for any positive integer $n$
$$\alpha(x_{k+1}') - \alpha(x_{k}') = \frac{\alpha(x_{k+1}) - \alpha(x_k)}{n}$$
we can do this by the Intermediate Value Theorem in a similar way to Theorem 6.9 in Rudin.
Let us include $x_k', x_{k+1}'$ in our partition. Then we have
$$\sum_{i=1}^n M_i\Delta\alpha_i = \alpha(x_{k+1}') - \alpha(x_{k}')=  \frac{\alpha(x_{k+1}) - \alpha(x_k)}{n} < \varepsilon$$
for large enough $n \in \mathbb{N}$. Thus, for every $\varepsilon>0$ we can find a partition such that $\sum_{i=1}^n M_i\Delta\alpha_i < \varepsilon$. Therefore,
$$\underline{\int_a^b}f dx = \overline{\int_a^b} f dx = 0$$
 A: No, it is possible for a function to be increasing, continuous at a point $x_0$, and for the function to not be continuous on any neighborhood of $x_0$.
For example, here’s a function that is increasing on all of $\mathbb{R}$, and is discontinuous at exactly all the rationals:
Let $(q_n)_{n\in\mathbb{N}}$ be an enumeration of the rationals. Define $f(x)$ by
$$f(x)  = \sum_{q_n\lt x}2^{-n}.$$
This makes sense, since the series $\sum_{n=1}^{\infty} 2^{-n}$ converges, so $f(x)$ takes real values; it is always positive, and $\lim_{x\to-\infty}f(x) = 0$, $\lim_{x\to\infty}f(x) =2$.
It is also increasing: if $y\gt x$, then $\{n\mid q_n\lt x\}\subset \{n\mid q_n\lt y\}$. Thus,
$$f(y) = \sum_{q_n\lt y}2^{-n} = \sum_{q_n\lt x}2^{-n} + \sum_{x\leq q_n\lt y}2^{-n} \gt \sum_{q_n\lt x}2^{-n} = f(x).$$
It is discontinuous at all rationals: if $a$ is rational, then $a=q_N$ for some $N$. Then for all $y\gt a$ we have
$$f(y) = \sum_{q_n\lt y}2^{-n} = f(a) + 2^{-N} + \sum_{a\lt q_n\lt y} 2^{n} \gt f(a)+2^{-N}.$$
Thus,
$$\lim_{x\to a^+}f(x) \geq f(a)+2^{-N}\gt f(a),$$
and in particular, the limit as $x\to a$ of $f(x)$ cannot equal $f(a)$, so $f$ is not continuous at $a$.
Finally, if $a$ is irrational, let $\epsilon\gt 0$. Then there exists $N\gt 0$ such that $\sum_{n\geq N}2^{-n}\lt \epsilon$. Let $\delta\gt 0$ be such that if $i\lt N$, then $|q_i-a|\gt\delta$ (we can do this, since there are only finitely many rationals we need to avoid). I claim that if $0\lt|x-a|\lt\delta$, then $|f(x)-f(a)|\lt\epsilon$.
Indeed, if $0\lt |x-a|\lt\delta$, then for any $n$, if $q_n$ is between $x$ and $a$, then $n\geq N$. Thus, since the difference between $f(x)$ and $f(a)$ is the sum over all $q_n$ that lie between $x$ and $a$, then
$$|f(x)-f(a)|\leq \sum_{n\geq N}2^{-n}\lt\epsilon,$$
proving that $\lim_{x\to a}f(x) = f(a)$. Thus, $f$ is continuous at all irrationals.
So we have a strictly increasing function $f(x)$, bounded and defined on all reals, with the property that $f$ is continuous at $a$ if and only if $a$ is irrational. In particular, there is no non-degenerate interval in which $f$ is continuous.
