
Solve $\int_{0}^{\dfrac{\pi}{2}}|sin~x-cos~x\lvert.\text{d}x$
(A) $0$
(B) $2(\surd2-1)$
(C) $\surd2-1$
(D) $2(\surd2+1)$
Answer
233.1k+ views
Hint: In the given question, we can observe that the function given does not have any positive values over its entire range. The value of this function is negative in the range of $0$ to $\dfrac{\pi}{4}$ and positive in the range of $\dfrac{\pi}{4}$ to $\dfrac{\pi}{2}$. So, the given function is broken into two parts, one from $0$ to $\dfrac{\pi}{4}$ and another from $\dfrac{\pi}{4}$ to $\dfrac{\pi}{2}$.
Formula used:
Complete step by step solution: The given integral is: I = $\int_{0}^{\dfrac{\pi}{2}}|sin~x-cos~x\lvert.\text{d}x$
Here the given function is f(x) = $\|sin~x-cos~x\lvert$ and the total range over which the integral is to be done is $0$ to $\dfrac{\pi}{2}$, with a lower limit of $0$ and an upper limit of $\dfrac{\pi}{2}$. We observe that the value of this function is negative in the range of $0$ to $\dfrac{\pi}{4}$ and positive in the range of $\dfrac{\pi}{4}$ to $\dfrac{\pi}{2}$.
So, the above integral can be written as I = $\int_{0}^{\dfrac{\pi}{4}}(sin~x-cos~x).\text{d}x+\int_{\dfrac{\pi}{4}}^{\dfrac{\pi}{2}}(sin~x-cos~x).\text{d}x$
As integration of $sin x = -cos x$ and the integration of $cos x = sin x$. So, the above integral becomes
I = $\left[-cos~x-sin~x\right]_{0}^{\dfrac{\pi}{4}}+\left[-cos~x-sin~x\right]_{\dfrac{\pi}{4}}^{\dfrac{\pi}{2}}$
We should remember the following values of sine and cosine functions at different angles: $sin 0 = 0$; sin $\dfrac{\pi}{4}$ = $\dfrac{1}{\surd2}$; sin $\dfrac{\pi}{2}$ = 1; $cos 0 = 1$; cos $\dfrac{\pi}{4}$ =$\dfrac{1}{\surd2}$; cos $\dfrac{\pi}{2}$ = 0.
Using these values to solve the question, we get
I = $(\dfrac{-1}{\surd2}-\dfrac{1}{\surd2}-(-1-0))+(-0-1-(\dfrac{-1}{\surd2}-\dfrac{1}{\surd2})$
I = $2(\surd2-1)$
Hence, $\int_{0}^{\dfrac{\pi}{2}}|sin~x-cos~x\lvert.\text{d}x$ = $2(\surd2-1)$
Thus, Option (B) is correct.
Note: The integration should be done carefully. We should keep in mind that it is a question of definite integration, so we should also substitute the upper and lower limits after integrating.
Formula used:
Complete step by step solution: The given integral is: I = $\int_{0}^{\dfrac{\pi}{2}}|sin~x-cos~x\lvert.\text{d}x$
Here the given function is f(x) = $\|sin~x-cos~x\lvert$ and the total range over which the integral is to be done is $0$ to $\dfrac{\pi}{2}$, with a lower limit of $0$ and an upper limit of $\dfrac{\pi}{2}$. We observe that the value of this function is negative in the range of $0$ to $\dfrac{\pi}{4}$ and positive in the range of $\dfrac{\pi}{4}$ to $\dfrac{\pi}{2}$.
So, the above integral can be written as I = $\int_{0}^{\dfrac{\pi}{4}}(sin~x-cos~x).\text{d}x+\int_{\dfrac{\pi}{4}}^{\dfrac{\pi}{2}}(sin~x-cos~x).\text{d}x$
As integration of $sin x = -cos x$ and the integration of $cos x = sin x$. So, the above integral becomes
I = $\left[-cos~x-sin~x\right]_{0}^{\dfrac{\pi}{4}}+\left[-cos~x-sin~x\right]_{\dfrac{\pi}{4}}^{\dfrac{\pi}{2}}$
We should remember the following values of sine and cosine functions at different angles: $sin 0 = 0$; sin $\dfrac{\pi}{4}$ = $\dfrac{1}{\surd2}$; sin $\dfrac{\pi}{2}$ = 1; $cos 0 = 1$; cos $\dfrac{\pi}{4}$ =$\dfrac{1}{\surd2}$; cos $\dfrac{\pi}{2}$ = 0.
Using these values to solve the question, we get
I = $(\dfrac{-1}{\surd2}-\dfrac{1}{\surd2}-(-1-0))+(-0-1-(\dfrac{-1}{\surd2}-\dfrac{1}{\surd2})$
I = $2(\surd2-1)$
Hence, $\int_{0}^{\dfrac{\pi}{2}}|sin~x-cos~x\lvert.\text{d}x$ = $2(\surd2-1)$
Thus, Option (B) is correct.
Note: The integration should be done carefully. We should keep in mind that it is a question of definite integration, so we should also substitute the upper and lower limits after integrating.
Recently Updated Pages
Geometry of Complex Numbers Explained

JEE General Topics in Chemistry Important Concepts and Tips

JEE Extractive Metallurgy Important Concepts and Tips for Exam Preparation

JEE Amino Acids and Peptides Important Concepts and Tips for Exam Preparation

JEE Atomic Structure and Chemical Bonding important Concepts and Tips

Electricity and Magnetism Explained: Key Concepts & Applications

Trending doubts
JEE Main 2026: Session 2 Registration Open, City Intimation Slip, Exam Dates, Syllabus & Eligibility

JEE Main 2026 Application Login: Direct Link, Registration, Form Fill, and Steps

JEE Main Marking Scheme 2026- Paper-Wise Marks Distribution and Negative Marking Details

Understanding the Angle of Deviation in a Prism

Hybridisation in Chemistry – Concept, Types & Applications

How to Convert a Galvanometer into an Ammeter or Voltmeter

Other Pages
JEE Advanced Marks vs Ranks 2025: Understanding Category-wise Qualifying Marks and Previous Year Cut-offs

Understanding the Electric Field of a Uniformly Charged Ring

Derivation of Equation of Trajectory Explained for Students

Understanding Electromagnetic Waves and Their Importance

Inductive Effect and Its Role in Acidic Strength

JEE Advanced Weightage 2025 Chapter-Wise for Physics, Maths and Chemistry

