Question:

\[ \int_0^3 \left(|x-1|-x[x]\right)dx = \underline{} \] rounded off to one decimal place.

Show Hint

For integrals involving the greatest integer function \([x]\), split the interval at integer points and evaluate separately.
Updated On: Jun 1, 2026
Show Solution
collegedunia
Verified By Collegedunia

Correct Answer: -4

Solution and Explanation

Step 1: Split the integral according to greatest integer function.
Since \([x]\) changes at integers, split the integral as
\[ \int_0^3=\int_0^1+\int_1^2+\int_2^3 \]

Step 2: For \(0\leq x<1\).
Here, \([x]=0\) and \(|x-1|=1-x\).
\[ I_1=\int_0^1(1-x)dx \]
\[ I_1=\left[x-\frac{x^2}{2}\right]_0^1=\frac12 \]

Step 3: For \(1\leq x<2\).
Here, \([x]=1\) and \(|x-1|=x-1\).
\[ I_2=\int_1^2\left((x-1)-x\right)dx \]
\[ I_2=\int_1^2(-1)dx=-1 \]

Step 4: For \(2\leq x\leq 3\).
Here, \([x]=2\) and \(|x-1|=x-1\).
\[ I_3=\int_2^3\left((x-1)-2x\right)dx \]
\[ I_3=\int_2^3(-x-1)dx \]

Step 5: Evaluate \(I_3\).
\[ I_3=\left[-\frac{x^2}{2}-x\right]_2^3 \]
\[ I_3=\left(-\frac{9}{2}-3\right)-\left(-2-2\right) \]
\[ I_3=-\frac{15}{2}+4=-\frac{7}{2} \]

Step 6: Add all parts.
\[ I=I_1+I_2+I_3 \]
\[ I=\frac12-1-\frac72 \]

Step 7: Final answer.
\[ I=-4 \] \[ \boxed{-4.0} \]
Was this answer helpful?
0
0