How can I evaluate the integral $$\int_1^2x\,d[x^2]$$

I think this meaningless, because the area below separate points is not defined.

Note: $[.]$ is the floor function.

  • $\begingroup$ I edited my answer. Apologies for the misunderstanding. $\endgroup$
    – User8128
    Feb 12, 2017 at 19:54
  • $\begingroup$ @User8128 My answer is $\sqrt{2}+\sqrt{3}+\sqrt{4}$ but I don't know is true or false. $\endgroup$
    – Nosrati
    Feb 12, 2017 at 20:00
  • $\begingroup$ It's incorrect. The correct answer is $\sqrt 2$. $\endgroup$
    – User8128
    Feb 12, 2017 at 20:01
  • $\begingroup$ This joke is not it? What makes the floor function under a differential sign? $\endgroup$
    – bot
    Feb 13, 2017 at 8:28
  • 1
    $\begingroup$ @MyGlasses I'm sorry, I completely botched this one. Your answer is correct $\endgroup$
    – User8128
    Feb 13, 2017 at 15:41

3 Answers 3


This is just the Riemann-Stieltjes integral. If you have monotone function $g$ which is continuously differentiable (and the range of integration is a compact interval $[a,b]$), then $$\int_a^b f(x) dg(x) = \int^b_a f(x)g'(x) dx.$$ Here we have $$\int^2_1 x d[x^2] = \int^2_1 2x^2 dx = \frac 2 3(2^3 - 1^3) = \frac {14} 3$$

For more info: https://en.wikipedia.org/wiki/Riemann%E2%80%93Stieltjes_integral

EDIT: I see now that we are using $g(x) = [x^2]$ as the integrator where $[\cdot]$ is the floor function. Generally, if $f$ is continuous on $[a,b]$ and $g$ is piecewise constant with jump discontinuities at $a_1, a_2, \ldots, a_\ell$ in the interval (but $g$ has one-sided limits $g(a_j^+)$ and $g(a_j^-)$ on each side of the jumps), then a similar argument will give $$\int^b_a f(x) dg(x) = \sum_{j=1}^\ell f(a_j) (g(a_j^+) - g(a_j^-)).$$ This gives $$\int^2_1 x d[x^2] = \sqrt 2 + \sqrt 3 + \sqrt 4.$$

  • $\begingroup$ Doesn't the bounds change? Because we go from $x^2=1$ to $x^2=2$ $\endgroup$ Feb 12, 2017 at 19:15
  • $\begingroup$ No. There is no substitution being made here, so the bounds wont change $\endgroup$
    – User8128
    Feb 12, 2017 at 19:15
  • $\begingroup$ As I said, we aren't really making a substitution here. It's more like we are integrating on the interval $[1,2]$ with respect to a different measure than usual (here our measure is $dg(x)$ rather than the usual $dx$). $\endgroup$
    – User8128
    Feb 12, 2017 at 19:22
  • $\begingroup$ Are you using the greatest integer function in the differential term? $\endgroup$
    – user404127
    Feb 12, 2017 at 19:29
  • 1
    $\begingroup$ Oh of course, I completely botched this one. Thanks for the correction $\endgroup$
    – User8128
    Feb 13, 2017 at 15:41

One has $$ \int_1^2 x\,d[x^2]=\sqrt{2}+\sqrt{3}+\sqrt{4}. $$

Argument 1

We use

Theorem (9-11 in Apostol's Real Analysis) Let $\alpha$ be a step function defined on $[a,b]$ with jump $\alpha_k$ at $x_k$, where $a\leq x_1<x_2<\ldots<x_n\leq b$. Let $f$ be defined on $[a,b]$ in such a way that not both $f$ and $\alpha$ are discontinuous from the right or from the left at each $x_k$. Then $\int_a^b f\,d\alpha$ exists and $$ \int_a^b f(x)\,d\alpha(x)=\sum_{k=1}^n f(x_k)\alpha_k. $$

If we take $f(x)=x$ and $\alpha(x)=[x^2]$ the conditions are fulfilled, and with $x_1=\sqrt{2}$, $x_2=\sqrt{3}$ and $x_3=\sqrt{4}$, we find that $$ \int_1^2x\,d[x^2]=\sqrt{2}(2-1)+\sqrt{3}(3-2)+\sqrt{4}(4-2)=\sqrt{2}+\sqrt{3}+\sqrt{4}. $$

Argument 2

We can use integration by parts. The general formula reads $$ \int_a^b f(x)\,d\alpha(x)+\int_a^b \alpha(x)\,df(x)=f(b)\alpha(b)-f(a)\alpha(a). $$ With $f(x)=x$ and $\alpha(x)=[x^2]$, we have $$ \begin{aligned} \int_1^2 x\,d[x^2]&=-\int_1^2 [x^2]\,dx+2[2^2]-1[1^2]\\ &=-\bigl\{(\sqrt{2}-1)+2(\sqrt{3}-\sqrt{2})+3(\sqrt{4}-\sqrt{3})\bigr\}+8-1\\ &=\sqrt{2}+\sqrt{3}+\sqrt{4}. \end{aligned} $$

  • $\begingroup$ why is the point $1$ not included in the point of discontinuity $\endgroup$
    – Upstart
    Feb 13, 2017 at 8:07
  • $\begingroup$ Because the function $x\mapsto [x^2]$, defined on $[1,2]$, does not jump there. $\endgroup$
    – mickep
    Feb 13, 2017 at 8:15
  • $\begingroup$ How did you get $(\sqrt 2-1)+...$ ? I mean how did you compute $\int_1^2[x^2]dx$ don't see it :( (in argument 2) $\endgroup$
    – user441848
    Jun 10, 2017 at 22:40

Compute this as Riemann-Stieltjes integral: $$\int\limits_a^b f(x)\text{d}g(x)=\int\limits_a^b f(x)g'(x)\text{d}x$$ under suitable regularity asssumptions (which are in this case satisfied).

  • $\begingroup$ They are not, really. $\endgroup$ Feb 12, 2017 at 20:47
  • $\begingroup$ @MarianoSuárez-Álvarez, you are right, I have treated $[x^2]$ as the parenthesis. Nevertheless, Riemann-Stieltjes integral does exist, because $x$ is continuous and $[x^2]$ has a bounded variation. But, of course, more careful analysis is needed. It was given by User8128 above. Thanks for pointing my mistake. $\endgroup$
    – szw1710
    Feb 12, 2017 at 20:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .