# Problem with Riemann-Stieltjes integral

Compute the integral $\int_{-1}^{1} f(x)dg(x)$

where $f(x)=x$ and $g(x)$ = {x+1 if x<0, 0 if x=0, x-1 if x>0. (had trouble formatting g(x))

My attempt: $g'(x)$ = {1 if x<0, 0 if x=0, 1 if x>0. There are two discontinuities in g(x).

I'm having trouble setting up the integral:

$\int_{-1}^{1} f(x)dg(x) = \int_{-1}^{-1}f(x)g'(x)dx = \int_{-1}^{0}x(1)dx + \int_{0}^{1}x(1) dx$

From other Riemann-Stieltjes integral examples similar to this one I see more added to the equation, and do not know what to add. Thanks for the help!

• $g'(x)$ is not $0$ but undefined at $x=0$. Since $g$ is discontinuous there, it certainly can't be differentiable there. As for what to add to the two integrals, I suggest going back to the definition of the Riemann-Stieltjes integral, sorting out what parts of the definition correspond to the two integrals you've already written, and then looking carefully at the remaining terms (which will involve the jump of $g$ at $0$). Mar 18, 2013 at 3:22
• Integration by part. Mar 18, 2013 at 4:16

That is very easy exercise since $g$ is piecewise differentiable you can change it into Riemann integral for $x<0$ we have $dg(x)=d(x+1)=dx$ and for $x<0$ again we have $dg(x)=d(x-1)-dx$ it changed to a Riemann integral.