Question:

If \(f(x)=\begin{cases} \frac{[x]\cdot |x|}{x}, & x\neq 0 \\ 0, & x=0 \end{cases}\), where \([x]\) and \(|x|\) denote the greatest integer function and the modulus function respectively, then \(\int _{-2}^{1}f(x)dx=...\)

Show Hint

Split the interval at the integers and find the constant value of f(x) on each piece.
Updated On: Nov 12, 2026
  • \(0\)
  • \(1\)
  • \(3\)
  • \(7\)
Show Solution
collegedunia
Verified By Collegedunia

The Correct Option is C

Solution and Explanation

Step 1: Understanding the Concept
Split \([-2,1]\) at the points where \([x]\) changes, and use \(\dfrac{|x|}{x}=-1\) for \(x<0\) and \(1\) for \(x>0\).

Step 2: Find f(x) on each piece
For \(-2\le x<-1\): \([x]=-2\), \(\dfrac{|x|}x=-1\), so \(f=2\).
For \(-1\le x<0\): \([x]=-1\), so \(f=1\).
For \(0<x<1\): \([x]=0\), so \(f=0\).

Step 3: Integrate
\(\int_{-2}^{1}f(x)dx=2(1)+1(1)+0(1)\).

Step 4: Add up
The total is \(2+1+0=3\).

Final Answer:
The value of the integral is 3. \[ \boxed{\text{(C) }3} \]
Was this answer helpful?
0
0