\subsection{Total variation}\label{subsec:total_variation}

\begin{definition}\label{def:riemann_stieltjes_integral}
  The most common generalization of the \hyperref[def:riemann_integral]{Riemann integral} is the Riemann-Stieltjes integral. It is not as well-behaved, hence we will give the most general definition and not attempt to prove equivalences.

  Let \( \mscrX \) be a real \hyperref[def:separation_axioms/T2]{Hausdorff} \hyperref[def:topological_vector_space]{topological vector space}. Fix two \hyperref[def:function]{functions} \( f, \alpha: [a, b] \to X \).

  The \term{Riemann sum} of \( f \) with respect to \( \alpha \) corresponding to the \hyperref[def:riemann_partition/tagged]{tagged partition} \eqref{eq:def:riemann_partition/tagged} is defined as
  \begin{equation*}
    S(f, \alpha, \Delta, \Xi) \coloneqq \sum_{k=1}^n f(\xi_k) (\alpha(x_k) - \alpha(x_{k-1})).
  \end{equation*}

  The limit of the net
  \begin{equation}\label{eq:def:riemann_stieltjes_integral/net}
    \{ S(f, \alpha, \Delta, \Xi) \}_{(\Delta, \Xi) \in \op{tpart}([a, b])},
  \end{equation}
  if it exists, is called the \term{Riemann-Stieltjes integral} of \( f \) with respect to \( \alpha \) and is denoted by
  \begin{equation*}
    \int_a^b f(x) d \alpha(x).
  \end{equation*}
\end{definition}
