How to compute these Riemann-Stieltjes-Integrals? I have some doubt on this exercise which I have to solve:
Compute The Integral $\displaystyle \int_0^4 F(x) \ \mathrm{d}G(x)$ for
1.) $F(x) = x$ for $x<2$, $1$ otherwise; $G(x)=x^2$
2.) $F(x) = e^{-x}$ ; $G(x) = 0$ for $x<2$, $4$ for $2≤x<3$ and $-2$ otherwise.
3.) $F(x)=(1+i)^{\lfloor -x\rfloor}$ with $i$ in $(0,1)$; $G(x) = 0$ for $x<0$, $1$ for $0≤x<1$, $2$ for $1≤x<2$ and $\sin(\pi \cdot x)$ otherwise.  
On 2.) I think the integral will be $0$ because $F$ is continuous, $G(x)$ is constant and there are no common discontinuity points between $F$ and $G$.
On 3.) There are common discontinuity points like $0,1,2$. So there doesn't exist an Integral.
Now my question is, how to find the integral in 1.)? Because $F$ is not continuous but $G$ is continuously differentiable. So $\mathrm{d}G(x)=G'(x)\mathrm{d}x$.
I tried to calculate the integral in two parts. One from $0$ to $2$ and the other one from $2$ to $4$. But There does not exist a value $F(x)=x$ for $2$. So I don't how to compute the first integral.
How can I solve this problem?
Am I right in 2.) and 3.)?
 A: Regarding the definition and the basic existence theorems of the Riemann-Stieltjes integral see p.ex. the Wikipedia article. 
(1) If the derivative of the integrator is continuous, like in the case of our $G(x)=x^2$, then the Riemann-Stieltjes integral can be calculated as a Riemann integral:
$$\int_0^4F(x)\frac{dG(x)}{dx}dx=2\int_0^2x^2dx+2\int_2^4xdx=\frac{52}{3}.$$ 
(2) Let $0=x_0<x_1<x_2<\ldots<x_n=4$ be a partition of $[0,4]$. And let $$\Delta G_i=G(x_{i+1})-G(x_i).$$
An approximation of our Riemann-Stieltjes integral is
$$\sum_{i=0}^{n-1}e^{-c_i}\Delta G_i$$
where $c_i\in[x_{i},x_{i+1}]$, for all $i$. Since
$$G(x)=\begin{cases}
\ \ \ 0 \text{, if } x<2\\
\ \ \ 4 \text{, if } 2\le x<3\\
-2\text{, if } 3\le x
\end{cases},$$
we have $$\Delta G_i=\begin{cases}
\ \ \ 4 \text{ if } 2\in (x_i,x_{i+1}]\\
-6 \text{ if } 3\in (x_i,x_{i+1}]\\
\ \ \ 0 \text{ otherwise}.
\end{cases}$$
As a result
$$\int_0^4e^{-x}dG(x)=4e^{-2}-6e^{-3}.$$
(3) If there are points where both $F$ and $G$ are discontinuous then the R-S integral is not well defined. Even so, the Lebesgue-Stieltjes integral of our function exists.
