The Riemann–Stieltjes integral $\int\_a^b f(x)\,dg(x)$ is a generalization of the Riemann integral. It is e.g. heavily used as a starting point for stochastic integration. The approximating Riemann–Stieltjes sums are analogous to the Riemann sums $\sum\_{i=0}^{n-1} f(c\_i)(g(x\_{i+1})-g(x\_i))$ where $c\_i$ is in the $i$-th subinterval $[x\_i,x\_{i+1}]$.


The Riemann-sums can be very intuitively visualized by rectangles that approximate the area under the curve.
See e.g. [Wikipedia:Riemann sum](https://en.wikipedia.org/wiki/Riemann_sum).
Unfortunately, I cannot find respective intuitive visualizations of the Riemann–Stieltjes sums.


**My question:** Could anyone provide me with some literature, pictures, links, or especially tools (e.g. Mathematica or even Excel) with which I could play around to get a similar intuition for this more general kind of integral?



Visualization of Riemann–Stieltjes Integrals
It's fairly easy to visualize the Riemann–Stieltjes integral $\int\_a^b f(t)\,dg(t)$ [I changed the name of the integration variable for convenience below] if $f\ge0$ and $g$ is nondecreasing. Just draw the graph of the curve $(x,y)=(g(t),f(t))$. The integral is just the area below the curve. (Whenever $g$ makes a jump at some $t\_0$, fill in the gap by setting $y=f(t\_0)$ there.) The Riemann–Stieltjes sums are now easy to visualize as sums of areas of rectangles (details left as an exercise).


