Question:

If [ ] denotes the greatest integer function, then the integral \(\int_0^{\pi}[\cos x]\,dx\) is equal to:

Show Hint

Find where \([\cos x]\) equals 0 and where it equals \(-1\) on \([0,\pi]\) and integrate piecewise.
Updated On: Nov 11, 2026
  • \(\frac{\pi}{2}\)
  • \(0\)
  • \(-1\)
  • \(-\frac{\pi}{2}\)
Show Solution
collegedunia
Verified By Collegedunia

The Correct Option is D

Solution and Explanation

On \(0<x\le\frac{\pi}{2}\): \(0\le\cos x<1\), so \([\cos x]=0\).
On \(\frac{\pi}{2}<x\le\pi\): \(-1\le\cos x<0\), so \([\cos x]=-1\).
(The single point \(x=0\) where \(\cos x=1\) does not affect the integral.)
\(\int_0^{\pi}[\cos x]dx=\int_0^{\pi/2}0\,dx+\int_{\pi/2}^{\pi}(-1)dx=-\left(\pi-\frac{\pi}{2}\right)=-\frac{\pi}{2}\).
Answer: (4) \(-\frac{\pi}{2}\)
Was this answer helpful?
0
0