Question

# Integrate the following $\int{\dfrac{dx}{\cos x-\sin x}}$

Verified
131.4k+ views
Hint: From the question, it is clear that we should find the value of $\int{\dfrac{dx}{\cos x-\sin x}}$. Let us assume the value of $\int{\dfrac{dx}{\cos x-\sin x}}$ is equal to I. Now let us multiply and divide with $\dfrac{1}{\sqrt{2}}$ on R.H.S. We know that $\cos \dfrac{\pi }{4}=\sin \dfrac{\pi }{4}=\dfrac{1}{\sqrt{2}}$. By using $\cos \dfrac{\pi }{4}=\sin \dfrac{\pi }{4}=\dfrac{1}{\sqrt{2}}$, we should write the denominator in the form of $\cos A\cos B-\sin A\sin B$. We know that $\cos \left( A+B \right)=\cos A\cos B-\sin A\sin B$. Now by using this formula, we should write the denominator in the form of $\cos \theta$. We know that $\sec \theta =\dfrac{1}{\cos \theta }$. We know that $\int{\sec \theta }=\ln \left| \tan \theta +\sec \theta \right|$. By using this formula, we can find the value of $\int{\dfrac{dx}{\cos x-\sin x}}$.

From the question, it is clear that we should find the value of $\int{\dfrac{dx}{\cos x-\sin x}}$.
Let us assume the value of $\int{\dfrac{dx}{\cos x-\sin x}}$ is equal to I.
$I=\int{\dfrac{dx}{\cos x-\sin x}}$
Now let us multiply and divide with $\dfrac{1}{\sqrt{2}}$.
\begin{align} & \Rightarrow I=\dfrac{1}{\sqrt{2}}\int{\dfrac{dx}{\dfrac{1}{\sqrt{2}}\left( \cos x-\sin x \right)}} \\ & \Rightarrow I=\dfrac{1}{\sqrt{2}}\int{\dfrac{dx}{\dfrac{1}{\sqrt{2}}\cos x-\dfrac{1}{\sqrt{2}}\sin x}} \\ \end{align}
We know that $\cos \dfrac{\pi }{4}=\sin \dfrac{\pi }{4}=\dfrac{1}{\sqrt{2}}$.
$\Rightarrow I=\dfrac{1}{\sqrt{2}}\int{\dfrac{dx}{cos\dfrac{\pi }{4}\cos x-\sin \dfrac{\pi }{4}\sin x}}$
We know that $\cos \left( A+B \right)=\cos A\cos B-\sin A\sin B$.
$\Rightarrow I=\dfrac{1}{\sqrt{2}}\int{\dfrac{dx}{cos\left( x+\dfrac{\pi }{4} \right)}}$
We know that $\sec \theta =\dfrac{1}{\cos \theta }$.
$\Rightarrow I=\dfrac{1}{\sqrt{2}}\int{\sec \left( x+\dfrac{\pi }{4} \right)dx}.......(1)$
Let us assume $y=x+\dfrac{\pi }{4}.....(2)$.
Now let us differentiate equation (2) with respect to x on both sides.
\begin{align} & \Rightarrow \dfrac{dy}{dx}=\dfrac{d}{dx}\left( x+\dfrac{\pi }{4} \right) \\ & \Rightarrow \dfrac{dy}{dx}=\dfrac{dx}{dx}+\dfrac{d}{dx}\left( \dfrac{\pi }{4} \right) \\ & \Rightarrow \dfrac{dy}{dx}=1 \\ \end{align}
Now we will apply cross multiplication.
$\Rightarrow dy=dx......(3)$
Now let us substitute equation (2) and equation (3) in equation (1), then we get
$\Rightarrow I=\dfrac{1}{\sqrt{2}}\int{\operatorname{secy}dy}.......(4)$
We know that $\int{\sec \theta }=\ln \left| \tan \theta +\sec \theta \right|$.
$\Rightarrow I=\dfrac{1}{\sqrt{2}}\left( \ln \left| \operatorname{tany}+\operatorname{secy} \right| \right)+C..........(5)$
Now let us substitute equation (2) in equation (5), then we get
$\Rightarrow I=\dfrac{1}{\sqrt{2}}\left( \ln \left| \tan \left( x+\dfrac{\pi }{4} \right)+\sec \left( x+\dfrac{\pi }{4} \right) \right| \right)+C.......(6)$
From equation (6), we can say that
$\Rightarrow \int{\dfrac{dx}{\cos x-\sin x}}=\dfrac{1}{\sqrt{2}}\left( \ln \left| \tan \left( x+\dfrac{\pi }{4} \right)+\sec \left( x+\dfrac{\pi }{4} \right) \right| \right)+C$

Note: Students may assume a misconception that $\int{\sec \theta }=\ln \left| \tan \theta -\sec \theta \right|$. If this formula is applied, then we get the value of I is equal to $\dfrac{1}{\sqrt{2}}\left( \ln \left| \tan \left( x+\dfrac{\pi }{4} \right)-\sec \left( x+\dfrac{\pi }{4} \right) \right| \right)+C$. Then, we get the value of $\int{\dfrac{dx}{\cos x-\sin x}}$ is equal to $\dfrac{1}{\sqrt{2}}\left( \ln \left| \tan \left( x+\dfrac{\pi }{4} \right)-\sec \left( x+\dfrac{\pi }{4} \right) \right| \right)+C$. But we know that the value of $\int{\dfrac{dx}{\cos x-\sin x}}$ is equal to $\dfrac{1}{\sqrt{2}}\left( \ln \left| \tan \left( x+\dfrac{\pi }{4} \right)+\sec \left( x+\dfrac{\pi }{4} \right) \right| \right)+C$. So, this misconception should be avoided to get an accurate result.