Riemann Stieltjes Integral I've been trying to get  knowledge with Riemann Steltjes integral and came across to some assignments in the web about the subject.In doing my practice I could´t achieve to the solution of a particular example that states as follows
$$
\int_0^6  (x^2+[x])d(|3-x|) =
$$
According to the assignment the solution is supposed to be 63.
I tried to get to the solution using two different ways but none solution coincide.
I developed the example like this
$$
\int_0 ^3(x^2+[x])d(3-x) + \int_3^6 (x^2+[x])d(x-3)
$$
which cancels the absolute value, and then
$$
\int_0 ^3(x^2\cdot d(3-x))  +\int_0 ^3([x]\cdot d(3-x) +\int_3 ^6(x^2\cdot d(x-3) +\int_3 ^6([x]\cdot d(x-3)=
$$
The problem is that I can't work out the integral that involves the$ [x]$ floor function.
I searched your archives but couldn't get any hint.
Doesn't seem that complicated but in fact I'stuck.
Can you give some help?
Tks in advance
Joao Pereira
 A: Make the substitution $u=3-x$. Then
$$\begin{align}
I =&\int_{0}^{6}(x^{2}+\left\lfloor x\right\rfloor )d(\left\vert
3-x\right\vert )\\
=&\int_{3}^{-3}(\left( 3-u\right) ^{2}+\left\lfloor 3-u\right\rfloor
)d(\left\vert u\right\vert ) \\
=&\int_{3}^{-3}(\left( 3-u\right) ^{2}+3+\left\lfloor -u\right\rfloor
)d(\left\vert u\right\vert ),
\end{align}$$
because 
$$
\left\lfloor 3-u\right\rfloor =3+\left\lfloor -u\right\rfloor, 
$$
since for $x$ real and $n$ integer, $\lfloor x+n\rfloor=\lfloor x\rfloor +n$. Hence
$$\begin{align}
I=&-\int_{-3}^{0}(\left( 3-u\right) ^{2}+3+\left\lfloor -u\right\rfloor
)d\left\vert u\right\vert-\int_{0}^{3}(\left( 3-u\right)^{2}+3+\left\lfloor -u\right\rfloor )d\left\vert u\right\vert\end{align}$$
and
$$\begin{align}  
I=&\int_{-3}^{0}(\left( 3-u\right) ^{2}+3+\left\lfloor -u\right\rfloor
)du-\int_{0}^{3}(\left( 3-u\right) ^{2}+3+\left\lfloor -u\right\rfloor )du \end{align}$$
$$\begin{align}  
I=&\int_{-3}^{0}(\left( 3-u\right) ^{2}+3)du-\int_{0}^{3}(\left( 3-u\right)
^{2}+3)du \\&+\int_{-3}^{0}\left\lfloor -u\right\rfloor du-\int_{0}^{3}\left\lfloor
-u\right\rfloor du.\end{align}$$
The first two integrals are $72$ and $18$. As for the last two their evaluation follows from the definition of the floor function of $-u$
$$
\left\lfloor -u\right\rfloor =\left\{ 
\begin{array}{ccc}
2 & \text{if} & -3<x\le -2 \\ 
1 & \text{if} & -2<x\le -1 \\ 
0 & \text{if} & -1<x\le 0 \\ 
-1 & \text{if} & 0<x\le 1 \\ 
-2 & \text{if} & 1<x\le 2 \\ 
-3 & \text{if} & 2<x\le 3.
\end{array}
\right. 
$$
So
$$\begin{align}
I=&72-18+\left( \int_{-3}^{-2}2du+\int_{-2}^{-1}1du+\int_{-1}^{0}0du\right)\\&-\left( \int_{0}^{1}-1du+\int_{1}^{2}-2du+\int_{2}^{3}-3du\right)
\\
=&72-18+3-\left( -6\right)  \\
=&63.
\end{align}$$
