# Trouble with a Riemann-Stieltjes Integral

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

where $f(x)=x$ and $g(x) = \left\{\begin{array}{l l} x+1 & \text{if } x<0\\ 0 & \text{if } x=0\\ x-1 & \text{if } x>0 \end{array}\right.$

My attempt: $g'(x) = \left\{\begin{array}{l l} 1 & \text{if } x<0\\ 0 & \text{if } x=0\\ 1 & \text{if } x>0 \end{array}\right.$

You can see two jump discontinuities when you graph g(x) at x=0.

I'm not sure if I'm setting up the integral correctly:

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

After solving the equation I get $0$ as my answer. I would appreciate any help, thanks.

-
$g'$ is not defined at $x=0$ (that is, $g$ is not a differentiable function). You need to instead go back to the definition of the Riemann-Stieltjes integral, as a limit of finite sums. –  Greg Martin Mar 18 '13 at 18:49