Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|cite|improve this question
Write the floor function as a piecewise function, broken up at each integer. – Shaun Ault Oct 2 '12 at 18:56
Think about what the graph of the floor function looks like, and what the area under the graph would be. – Alex J Best Oct 2 '12 at 18:57
Hints: e.g. $u=3-x$ $$ \left\lfloor 3-u\right\rfloor =3+\left\lfloor -u\right\rfloor $$ $$ \left\lfloor -u\right\rfloor =\left\{ \begin{array}{ccc} -1 & \text{if} & 0<x<1 \\ -2 & \text{if} & 1<x<2 \\ -3 & \text{if} & 2<x<3 \end{array} \right. $$ – Américo Tavares Oct 2 '12 at 19:49
@Shaun: Yes, as long as the integrator $|3-x|$ has no discontinuity at an integer, the way to do this is to subdivide at the integers into 6 integrals. – GEdgar Oct 3 '12 at 14:25
up vote 4 down vote accepted

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}$$


$$\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}$$

share|cite|improve this answer
Tank you very much for working out the problem.It was very kind of you.Best regards. – Joao Pereira Oct 3 '12 at 9:01
@JoaoPereira You are welcome. – Américo Tavares Oct 3 '12 at 10:45

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.