Definite IntegrationmediumFree

GIF Integral ∫[|sinx|−|cosx|] dx, 0 to 2π | JEE

JEE Maths question with a full step-by-step solution.

Question
If [][\,\cdot\,] denotes the greatest integer function, 02π[sinxcosx]dx\displaystyle\int_{0}^{2\pi}\big[\,|\sin x|-|\cos x|\,\big]\,dx equals
A2π-2\pi
B4π-4\pi
Cπ-\picorrect
D00
Solution
Step 1: Note that sinxcosx|\sin x|-|\cos x| is periodic with period π\pi and takes values in [1,1][-1,1]. Over [0,2π][0,2\pi] there are two such periods, so
02π[sinxcosx]dx=20π[sinxcosx]dx.\int_{0}^{2\pi}\big[\,|\sin x|-|\cos x|\,\big]\,dx=2\int_{0}^{\pi}\big[\,|\sin x|-|\cos x|\,\big]\,dx.
Step 2: On [0,π][0,\pi] the quantity h(x)=sinxcosxh(x)=|\sin x|-|\cos x| is negative near the ends and reaches 11 only at the single point x=π2x=\dfrac{\pi}{2}. Precisely, h(x)(1,0)h(x)\in(-1,0) on (0,π4)(3π4,π)\left(0,\dfrac{\pi}{4}\right)\cup\left(\dfrac{3\pi}{4},\pi\right), while h(x)[0,1)h(x)\in[0,1) on (π4,3π4)\left(\dfrac{\pi}{4},\dfrac{3\pi}{4}\right). Thus [h(x)]=1[h(x)]=-1 on the outer parts and [h(x)]=0[h(x)]=0 on the middle part. Step 3: Evaluate the integral over one period:
0π[h(x)]dx=0π/4(1)dx+π/43π/40dx+3π/4π(1)dx=π4+0π4=π2.\int_{0}^{\pi}[h(x)]\,dx=\int_{0}^{\pi/4}(-1)\,dx+\int_{\pi/4}^{3\pi/4}0\,dx+\int_{3\pi/4}^{\pi}(-1)\,dx=-\dfrac{\pi}{4}+0-\dfrac{\pi}{4}=-\dfrac{\pi}{2}.
Step 4: Double it:
02π[h(x)]dx=2(π2)=π.\int_{0}^{2\pi}[h(x)]\,dx=2\left(-\dfrac{\pi}{2}\right)=-\pi.
Correct answer: (3)
Still stuck on this question?Ask your doubt on WhatsApp
Similar questions

Solve more, learn faster

Sign up free to solve more JEE Maths questions and explore doMath — timed drills, mastery sprints, bookmarks, and chapter-wise progress tracking.