Riemann-Stieltjes integral of a continuous function w.r.t. a step function $
\newcommand{\para}[1]{\left( #1 \right)}
\newcommand{\abs}[1]{\left| \, #1 \, \right|}
\newcommand{\set}[1]{\left\{ #1 \right\}}
\newcommand{\ds}{\displaystyle}
\newcommand{\ol}[1]{\overline{#1}}
\newcommand{\norm}[1]{\left \Vert #1 \right \Vert}
\newcommand{\dd}{\mathrm{d}}
\newcommand{\vp}{\varphi}
\newcommand{\ve}{\varepsilon}
\newcommand{\a}{\alpha}
\newcommand{\g}{\Gamma} 
\newcommand{\og}{\overline{\Gamma}}
$Definition: I define the notion of an "increasing partition" $P$ of $[a,b]$ to be a finite partition $\set{z_k}_{k=0}^n \subseteq [a,b]$ where $a = z_0 < z_1 < \cdots < z_n = b$. It's a minor thing that helps reduce the repetition in the wording herein.

Problem Statement:  Let $\vp : [a,b] \to \Bbb R$ be a step function with $\set{\a_i}_{i=1}^m$ its discontinuities forming an increasing partition of $[a,b]$. Thus $\vp$ is constant on each interval $(\alpha_{i-1},\alpha_i)$. Let $f : [a,b] \to \Bbb R$ be continuous, and let
\begin{alignat*}{99}
\vp(\alpha_i^+) &:=\;&& \lim_{x \to  \a_i^+} \vp(x) &&\quad \forall i \in \set{0,1,\cdots,m-1} \\
\vp(\a_i^-) &:=\;&& \lim_{x \to \alpha_i^-} \vp(x) &&\quad \forall i \in \set{0,1,\cdots,m-1} \\
d_i &:=\;&& \vp(\a_i^+) - \vp(\a_i^-) &&\quad \forall i \in \set{1,2,\cdots,m-1} \\
d_0 &:=\;&& \vp(\a_0^+) - \vp(\a_0) \\
d_m &:=\;&& \vp(\a_m) - \vp(\a_m^-)
\end{alignat*}
Show
$$
\int_a^b f \, \dd \vp = \sum_{i=1}^m f(\a_i) d_i
$$

Context: This ultimately comes up as a homework assignment for me, and I just wanted to check my solution, because I have some doubts on it. I'll express those at the end, though, since they tie more intimately into my proof.

Attempted Proof:
Let the following be:

*

*Let $\g_\a := \set{\a_i}_{i=0}^m$ be an increasing partition of $[a,b]$. (This is the set of discontinuities of $\vp$, i.e. $\vp$ is constant on $(\a_{i-1},\a_i)$ $\forall i$.)

*Let the definitions in the problem statement hold.

*Let $\ve > 0$.

*Let $\ds \delta := \min_{1 \le i \le m} \left| \a_i - \a_{i-1} \right|$.

*Let $\g := \set{x_i}_{i=0}^n$ be an increasing partition of $[a,b]$ with $\norm \g < \delta$.

*Let $\ol \g := \g \cup \g_\a$, and let it be written $\ol \g := \set{\ol{x_i}}_{i=0}^p$.

*Let $\ol{\xi_i} \in [\ol{x_i}, \ol{x_{i-1}}]$ for each $i$. (These are our representative valuation points in the definition of the integral.)

By the merit of $\ol \g$ being a refinement of $\g$, and by merit of definition, we have
$$
\norm{ \ol \g } \le \norm \g < \delta \le \norm{\g_\a}
$$
By the Cauchy criterion for Riemann-Stieljes integration, then, where $R_\g$ denotes the usual Riemann-Stieltjes sum,
$$
\abs{ R_\g - R_{\ol \g} } < \ve
$$
and so $R_{\ol \g}$ equals the desired integral. It remains to see if this equals the desired sum.
Write
$$
R_{\og} = \sum_{j=1}^p f \para{ \ol{ \xi_j } } \Big( \vp \para{ \ol{x_j} } - \vp \para{ \ol{x_{j-1}} } \Big)
$$
From definition, we may have either $\ol{x_i} = \alpha_j \in \g_\a$ for some $i$ (i.e. is a discontinuity of $\vp$), or $\ol{x_i} = x_i \in \g$ for some $i$. Note that for any consecutive pairing $\ol{x_{i-1}},\ol{x_{i}}$ that not both are in $\g_\a$. (This is because each are in $\og$ for which $\norm \og < \delta$, and thus the smallest distance between any two discontinuities of $\vp$ is bigger than the distance between any two members of $\og$.) Thus, we only have three cases to consider, based on how many of a given pair are, indeed, discontinuities:

*

*Case 1 (neither): In the case neither $\ol{x_{i-1}},\ol{x_{i}}$ are discontinuities of $\vp$, then trivially we will have
$$
\vp \para{ \ol{x_j} } - \vp \para{ \ol{x_{j-1}} } = 0
$$

*Case 2 (right discontinuity): Suppose $\ol{x_{i}} = \a_j$ for some $j$ (but, again, that means $\ol{x_{i-1}}$ is not a discontinuity). Then in such a case, using the piecewise continuity and constantness of $\vp$,
$$
\vp \para{ \ol{x_j} } - \vp \para{ \ol{x_{j-1}} } = \vp\para{ \a_j } - \vp \para{ \a_{j}^- }
$$

*Case 3 (left discontinuity): Similar to the previous, we have $\ol{x_{i-1}} = \a_j$ for some $j$, and take
$$
\vp \para{ \ol{x_j} } - \vp \para{ \ol{x_{j-1}} } = \vp\para{ \a_j^+ } - \vp \para{ \a_{j} }
$$
Let $\ol{\xi_{i,j}}$ be the $\ol{\xi_i}$ whose terms are not eliminated by merit of Case 1 but lie in Case 2; similarly, $\ol{\xi'_{i,j}}$ for those whose terms lie in Case 3. Then we have, once the terms have negated,
$$
R_{\og} = \underbrace{\sum_{j=1}^m f \para{ \ol{\xi_{i,j}} } \Big( \vp\para{ \a_j } - \vp \para{ \a_{j}^- } \Big) }_{\text{case 2 terms}} + \underbrace{\sum_{j=1}^m f \para{ \ol{\xi'_{i,j}} } \Big( \vp\para{ \a_j^+ } - \vp \para{ \a_{j} } \Big)}_{\text{case 3 terms}}
$$
Note that, for the Case 2 terms, each $\ol{\xi_{i,j}}$ is within $\delta$ of $\a_j$; specifically, $\ol{\xi_{i,j}} \in (\a_j - \delta,\a_j)$. Likewise, $\ol{\xi'_{i,j}} \in (\a_j,\a_j+\delta)$. Since $f$ is continuous, we may take each to be its corresponding $\a_j$, and write
$$
R_{\og} = \sum_{j=1}^m f \para{ \a_j } \Big( \vp\para{ \a_j } - \vp \para{ \a_{j}^- } \Big)  +\sum_{j=1}^m f \para{ \a_j } \Big( \vp\para{ \a_j^+ } - \vp \para{ \a_{j} } \Big)
$$
Some clear cancellation results, giving
$$
R_{\og} = \sum_{j=1}^m f \para{ \a_j } \Big( \vp\para{ \a_j^+ } - \vp \para{ \a_{j}^- } \Big) 
$$
Taking the usual convention for what occurs for the $\a_j$ which are $a,b$, we see the $\vp$ difference here is indeed $d_i$. So we see
$$
\int_a^b f \, \dd \vp  = R_{\og} = \sum_{j=1}^m f \para{ \a_j } d_i
$$
as desired.

My Questions / Issues:
While I feel like this proof is on the right path, I have some anxieties about some steps. Some in particular I feel aren't quite "there" yet. I was wondering if anyone would be able to help me flesh these ideas uot.

*

*The use of the Cauchy criterion for Riemann-Stieltjes integrals (stated here) feels far too un-fleshed out, and I doubt it actually lets me conclude that $R_\og$ equals the integral in question. I imagine it only lets me conclude the integral exists at best. I do see that this proof seems to use something similar towards the end of their proof, but their motivation, choice of bound, and the weird $\delta$'s all escape me.


*The second chunk of the proof (verifying the alternate form for $R_\og$) feels right, but is there any issue there? Something feels sketchy about how I waited until then to define the $\ol{\xi_{i,j}}$ terms to be $\a_j$ in particular, but I don't see how it would be problematic either...


*I feel like I barely used the continuity of $f$ at all, which means its purpose is lurking elsewhere. Where would that be?
Thanks for the insights and thoughts you guys can give!
 A: To suggest a better strategy and see the continuity of $f$ enter as it should,  consider the proof for a single step discontinuity at $\alpha_1 \in (a,b)$.  The objective is to show that for any $\epsilon > 0$ there exists $\delta > 0$ such that for any partition with $\|\Gamma\| < \delta$, we have $|R_\Gamma - f(\alpha_1)d_1| < \epsilon$.
Since $f$ is uniformly continuous on the compact interval $[a,b]$ , there exists $\delta > 0$ such that $|f(x) - f(y)| < \epsilon/|d_1|$ when $|x-y| < \delta$.
Take any partition $\Gamma$ with points $a = x_0 < x_1 < \ldots < x_n = b$ such that $\|\Gamma\|< \delta$. There exists and index j such that one of the following three cases must hold:
$$\tag{1} \quad x_{j-1} < \alpha_1 < x_j, \quad \varphi(x_{j-1}) = \varphi(\alpha_1^-),\quad\varphi(x_{j}) = \varphi(\alpha_1^+)$$
$$\tag{2} \quad x_{j-1} < \alpha_1 = x_j,\quad  \varphi(x_{j-1}) = \varphi(\alpha_1^-),\quad\varphi(x_{j}) = \varphi(\alpha_1^+)$$
$$\tag{2} \quad x_{j-1} = \alpha_1 < x_j,\quad  \varphi(x_{j-1}) = \varphi(\alpha_1^-),\quad\varphi(x_{j}) = \varphi(\alpha_1^+)$$
In each case we have for some intermediate point $\xi \in [x_{j-1},x_j]$,
$$\left| R_\Gamma - f(\alpha_1)d_1\right|= \left|f(\xi)(\varphi(x_j) - \varphi(x_{j-1})-f(\alpha_1) (\varphi(\alpha_1^+) - \varphi(\alpha_1^-) \right|\\ = |f(\xi) - f(\alpha_1)|\, |d_1|<  \epsilon$$
To generalize the proof for multiple points where the step function is discontinuous, choose $\delta$ such that in addition to controlling the oscillation of $f$ on subintervals of partitions with $\|\Gamma\| < \delta$, we also have no more than one point of discontinuity $\alpha_k$ in a subinterval.
A: Actually this problem admits a direct solution. Notice that $$\int_a^b fd\phi=\sum_{i=1}^m\int_{\alpha_{i-1}}^{\alpha_i}fd\phi $$ because $\{\alpha_i\}$ it's a partition of $[a,b]$. Since $\phi$ is constant on every $[\alpha_{i-1},\alpha_i)$ and possible different only on $\alpha_i$, any Riemann Stieltjes sum is zero except for one single term (the right extreme), i.e., $$\int_{\alpha_{i-1}}^{\alpha_i}fd\phi=f(\alpha_{i})d_i $$ from where your result follows, here you need to use the uniform continuity of $f$. I realized that this idea is very similar to the other answer, with the advantage that if you prove the result for one single integral, then by additivity the general result follows. I will add the proof since it's a little bit different:
Let $\varepsilon>0$, and let $\delta>0$ such that the uniform continuity of $f$ holds on $[\alpha_{i-1}, \alpha_i]$ with $\varepsilon/|d_i|$  take $\Gamma=\{n_j\}_{j=0}^k$ a partition of $[\alpha_{i-1}, \alpha_i]$ with $\max_{1\leq j\leq k}\{|n_{j}-n_{j-1}|\}<\delta$ and $\{p_j\}$ a sequence of points such that $n_{j-1}\leq p_j\leq n_j$, then $$R_{\Gamma} =\sum_{j=1}^mf(p_j)(\phi(n_{j-1})-\phi(n_{j}))=f(p_k)(\phi(n_{k-1})-\phi(n_k))=f(p_k)(\phi(n_k^+)-\phi(n_k^-))$$ so we have $R_\Gamma=f(p_k)(\phi(\alpha_i^+)-\phi(\alpha_i^-))=f(p_k)d_i$ now since $n_{k-1}\leq p_k\leq \alpha_i$ we have $$|R_\Gamma-f(\alpha_i)d_i|\leq |d_i||f(p_k)-f(\alpha_i)|<|d_i|\varepsilon/|d_i|=\varepsilon $$ by the uniform continuity of $f$, this completes the proof.
