What is \int_{0}^{2}h(x)\,dx equal to ?

Consider the following for the next two (02) items that follow : Let f(x)=|x-1|, g(x)=[x] and h(x)=f(x)g(x) where [.] is greatest integer function.

  1. A. -\frac{3}{2}
  2. B. -1
  3. C. 0
  4. D. \frac{1}{2}

Correct Answer: D. \frac{1}{2}

Explanation

Split the integral into two parts: [0, 1) and [1, 2). In [0, 1), [x] = 0, so h(x) = 0, making its integral 0. In [1, 2), [x] = 1 and |x-1| = x-1, so h(x) = (x-1)(1) = x-1. Integrating from 1 to 2: \int_{1}^{2}(x-1)\,dx = \left[\frac{(x-1)^2}{2}\right]_{1}^{2} = \frac{1}{2} - 0 = \frac{1}{2}. The total sum is 0 + \frac{1}{2} = \frac{1}{2}.

Related questions on Calculus

Practice more NDA Mathematics questions