# What does $g(x)$ really mean in Riemann-Stieltjes intergral?

I just start to learn Riemann-Stieltjes integral. But I feel confused about what is $g(x)$ for in Riemann-Stieltjes integral.

Here is the definition of Riemann-Stieltjes integral.

My understanding is that in integral, we want a partition of the domain of the function, $f(x)$, in this case.

In this sense, we already have a partition P. So what is $g(x)$for?

To choose a proper partition from all possible partitions?

And why $g(x)$ needs to be an increasing real-valued function also defined in $[a,b]$?

• The idea here is that you are weighing different parts of the interval differently. For the regular Riemann integral you simply have $g(x)=x$. But by taking different functions for $g$ you can give "more mass" for example between $0$ and $1/2$ and "less mass" between $1/2$ and $1$, so that the area under the curve between $1/2$ and $1$ does not "count" as much. – Matt Feb 2 '17 at 20:59
• Complementing on the fine answer of @Matt: $g$ doesn't need to be increasing on $[a,b]$ but it should have bounded variation; however, a function has bounded variation if and only it is the difference of nondecreasing functions and so it is fine to consider only nondecreasing functions and then subtracting parts. – John B Feb 2 '17 at 21:06
• @Matt Why we need to weigh different parts of the interval differently? – Parting Feb 2 '17 at 21:08
• @Parting There are many applications; perhaps the most natural comes from probability: the expected value of a continuous random variable $f(x)$ is given by $\int f dP$, where $P$ is the so-called "probability measure." Using this integral we can compute the likelihood of a particular event (random variable) occurring. – Matt Feb 2 '17 at 21:17
• A down to Earth application would be calculating the expected value of a random variable. A more theoretical reason is that if you do this, then you can prove that each functional in the dual space of C[a,b], (the space of continuous functions in an interval [a,b]) is given by a Stieltjes integral. – Matematleta Feb 2 '17 at 21:22