Question:

Evaluate: \(\displaystyle\int_0^2 \left([x^2]-[x]^2\right)dx\), where \([\cdot]\) denotes the greatest integer (floor) function.

Show Hint

Split at x=1, sqrt2 and sqrt3, the points where [x] and [x^2] change value.
Updated On: Jul 3, 2026
  • \(0\)
  • \(1\)
  • \(4-\sqrt3-\sqrt2\)
  • \(2-\sqrt3\)
Show Solution
collegedunia
Verified By Collegedunia

The Correct Option is C

Solution and Explanation

Step 1: Split the integral over \([0,1)\) and \([1,2)\) since \([x]\) changes value at \(x=1\). On \([0,1)\), \([x]=0\), and on \([1,2)\), \([x]=1\), so \([x]^2\) equals \(0\) and \(1\) on these two pieces respectively.

Step 2: On \([0,1)\), \(x^2\in[0,1)\), so \([x^2]=0\). Hence \([x^2]-[x]^2=0-0=0\) throughout \([0,1)\), which contributes \(0\) to the integral.

Step 3: On \([1,2)\), \([x]^2=1\), and as \(x\) runs over \([1,2)\), \(x^2\) runs over \([1,4)\). Splitting further: for \(x\in[1,\sqrt2)\), \(x^2\in[1,2)\) so \([x^2]=1\), giving difference \(0\); for \(x\in[\sqrt2,\sqrt3)\), \(x^2\in[2,3)\) so \([x^2]=2\), giving difference \(1\); for \(x\in[\sqrt3,2)\), \(x^2\in[3,4)\) so \([x^2]=3\), giving difference \(2\).

Step 4: Integrate each piece: \[\int_1^{\sqrt2}0\,dx=0,\qquad \int_{\sqrt2}^{\sqrt3}1\,dx=\sqrt3-\sqrt2,\qquad \int_{\sqrt3}^{2}2\,dx=2(2-\sqrt3)=4-2\sqrt3\]

Step 5: Add all contributions: \[\int_0^2\left([x^2]-[x]^2\right)dx=0+(\sqrt3-\sqrt2)+(4-2\sqrt3)=4-\sqrt3-\sqrt2\]

\[\boxed{4-\sqrt3-\sqrt2}\]
Was this answer helpful?
0
0