A problem on Riemann-Stieltjes integral Compute the following Riemann-Stieltjes integral $\int_{-1}^{1} f(x)dg(x)$  where $f(x)=x^2 + e^x$ and $g(x)=Sgn(x)$.  
I found the answer is 2 but answer given is 1. I have used the following formula 
$\int_{a}^{b} f(x)dg(x)$ + $\int_{a}^{b} g(x)df(x)$ = $f(b)g(b)-f(a)g(a)$
Please check my answer.
 A: if $g(x)=\mathrm{sgn}({x})$ then at, say, $x=2$ we get $dg(x)=0$.
In fact, $dg=0\;\forall x\neq0$. At $x=0, dg=2$
Hence, the integral reduces to an evaluation of $f(x)$ at $x=0$ multiplied by $dg(0)=2$ (I originally had this as a 0-1 step function, which would give $1$)
$$f(0)=0^2+e^0=1$$
So, actually, I also get $2$...contrary to my first attempt at this post, where I was visualizing $g$ as a 0->1 step function.
A: I'd try the following by definition: for any partition of the integration interval: 
$\;P=\left\{-1=x_0<x_1<...<x_k<x_{k+1}<...<x_n=1\right\}\;$ of $\;[-1,1]\;$
, with $\;x_k<0\;,\;\;x_{k+1}>0\;$ 
we have that the Riemann-Stieltjes sum for our functions is
$$\sum_{i=1}^nf(c_i)\left[g(x_i)-g(x_{i-1})\right]=f(c_{k+1})\cdot2\;,\;\;c_i\in[x_{i-1},\,x_i]\;$$
since $\;g(x_i)-g(x_{i-1})=0 \;$ for any two points with the same sign. 
If we now take the limit of the sums when $\;n\to\infty\;$ while also $\;\max\limits_i\left\{x_i-x_{i-1}\right\}\rightarrow0\;$ , we get the limit equals $\;f(0)\cdot2=1\cdot2=2\;$ , so I get the same as you got.
