Solveeit Logo

Question

Question: Evaluate \(\int {\dfrac{{dx}}{{\sin x + \cos x}}} \) A) \(\log \tan \left( {\dfrac{\pi }{8} + \dfr...

Evaluate dxsinx+cosx\int {\dfrac{{dx}}{{\sin x + \cos x}}}
A) logtan(π8+x2)+C\log \tan \left( {\dfrac{\pi }{8} + \dfrac{x}{2}} \right) + C
B) logtan(π8x2)+C\log \tan \left( {\dfrac{\pi }{8} - \dfrac{x}{2}} \right) + C
C) 12logtan(π8+x2)+C\dfrac{1}{{\sqrt 2 }}\log \tan \left( {\dfrac{\pi }{8} + \dfrac{x}{2}} \right) + C

Explanation

Solution

We will multiply and divide the whole expression with 12\dfrac{1}{{\sqrt 2 }} and then term is as sinπ4\sin \dfrac{\pi }{4} or cosπ4\cos \dfrac{\pi }{4} as per our requirements and then, we will see a formula in it to combine and our integral will become really easy to be solved.

Complete step-by-step answer:
We have I=dxsinx+cosxI = \int {\dfrac{{dx}}{{\sin x + \cos x}}}
We can rewrite this as I=(12)dxsinx(12)+cosx(12)I = \int {\dfrac{{\left( {\dfrac{1}{{\sqrt 2 }}} \right)dx}}{{\sin x\left( {\dfrac{1}{{\sqrt 2 }}} \right) + \cos x\left( {\dfrac{1}{{\sqrt 2 }}} \right)}}}
We can also rewrite this as: I=(12)dxsinxcosπ4+cosxsinπ4I = \left( {\dfrac{1}{{\sqrt 2 }}} \right)\int {\dfrac{{dx}}{{\sin x\cos \dfrac{\pi }{4} + \cos x\sin \dfrac{\pi }{4}}}}
We also know that sin(x+y)=sinxcosy+cosxsiny\sin (x + y) = \sin x\cos y + \cos x\sin y.
So, we will get:- I=(12)dxsin(x+π4)I = \left( {\dfrac{1}{{\sqrt 2 }}} \right)\int {\dfrac{{dx}}{{\sin \left( {x + \dfrac{\pi }{4}} \right)}}}
We know that sinx=1cosecx\sin x = \dfrac{1}{{\cos ecx}}
I=(12)cosec(x+π4)dxI = \left( {\dfrac{1}{{\sqrt 2 }}} \right)\int {\cos ec\left( {x + \dfrac{\pi }{4}} \right)dx}
Now using the formula: cosecx=lntanx2+C\int {\cos ecx = \ln \left| {\tan \dfrac{x}{2}} \right| + C}
Hence, we get: I=(12)tan(x2+π8)+CI = \left( {\dfrac{1}{{\sqrt 2 }}} \right)\tan \left( {\dfrac{x}{2} + \dfrac{\pi }{8}} \right) + C

Hence, the correct option is (C).

Note: Let us look at the alternate methods for the same question in brief:-
Method 1:
Let I=dxsinx+cosxI = \int {\dfrac{{dx}}{{\sin x + \cos x}}}
We know that we have the formulas: sin2θ=2tanθ1+tan2θ\sin 2\theta = \dfrac{{2\tan \theta }}{{1 + {{\tan }^2}\theta }} and cos2θ=1tan2θ1+tan2θ\cos 2\theta = \dfrac{{1 - {{\tan }^2}\theta }}{{1 + {{\tan }^2}\theta }}
Now, putting in θ=x2\theta = \dfrac{x}{2} in these formulas, we will get:-
sinx=2tan(x2)1+tan2(x2)\sin x = \dfrac{{2\tan \left( {\dfrac{x}{2}} \right)}}{{1 + {{\tan }^2}\left( {\dfrac{x}{2}} \right)}} and cosx=1tan2(x2)1+tan2(x2)\cos x = \dfrac{{1 - {{\tan }^2}\left( {\dfrac{x}{2}} \right)}}{{1 + {{\tan }^2}\left( {\dfrac{x}{2}} \right)}}.
Putting these in the given expression, we will get:-
I=dxsinx+cosx=dx2tan(x2)1+tan2(x2)+1tan2(x2)1+tan2(x2)\Rightarrow I = \int {\dfrac{{dx}}{{\sin x + \cos x}}} = \int {\dfrac{{dx}}{{\dfrac{{2\tan \left( {\dfrac{x}{2}} \right)}}{{1 + {{\tan }^2}\left( {\dfrac{x}{2}} \right)}} + \dfrac{{1 - {{\tan }^2}\left( {\dfrac{x}{2}} \right)}}{{1 + {{\tan }^2}\left( {\dfrac{x}{2}} \right)}}}}}
Simplifying the RHS, we will get the following expression:-
I=1+tan2(x2)dx2tan(x2)+1tan2(x2)\Rightarrow I = \int {\dfrac{{1 + {{\tan }^2}\left( {\dfrac{x}{2}} \right)dx}}{{2\tan \left( {\dfrac{x}{2}} \right) + 1 - {{\tan }^2}\left( {\dfrac{x}{2}} \right)}}}
Now, we also know that 1+tan2θ=sec2θ1 + {\tan ^2}\theta = {\sec ^2}\theta . Putting this, we will get the following expression:-
I=sec2(x2)dx2tan(x2)+1tan2(x2)\Rightarrow I = \int {\dfrac{{{{\sec }^2}\left( {\dfrac{x}{2}} \right)dx}}{{2\tan \left( {\dfrac{x}{2}} \right) + 1 - {{\tan }^2}\left( {\dfrac{x}{2}} \right)}}}
We can write this as:-
I=sec2(x2)dx2[12tan(x2)+tan2(x2)]\Rightarrow I = \int {\dfrac{{{{\sec }^2}\left( {\dfrac{x}{2}} \right)dx}}{{2 - \left[ {1 - 2\tan \left( {\dfrac{x}{2}} \right) + {{\tan }^2}\left( {\dfrac{x}{2}} \right)} \right]}}}
We will now use the formula: (ab)2=a2+b22ab{(a - b)^2} = {a^2} + {b^2} - 2ab. Thus, we will get:-
I=sec2(x2)dx2(tan(x2)1)2\Rightarrow I = \int {\dfrac{{{{\sec }^2}\left( {\dfrac{x}{2}} \right)dx}}{{2 - {{\left( {\tan \left( {\dfrac{x}{2}} \right) - 1} \right)}^2}}}} ……..(X)
Now, assume that t=tanx2t = \tan \dfrac{x}{2}. So, we will have: dt=ddx(tanx2)×ddx(x2)dt = \dfrac{d}{{dx}}\left( {\tan \dfrac{x}{2}} \right) \times \dfrac{d}{{dx}}\left( {\dfrac{x}{2}} \right).
We know that ddθ(tanθ)=sec2θ\dfrac{d}{{d\theta }}(\tan \theta ) = {\sec ^2}\theta .
So, we have:- dt=12sec2x2dt = \dfrac{1}{2}{\sec ^2}\dfrac{x}{2}
Putting all these in (X), we will get:-
I=sec2(x2)dx2(tan(x2)1)2=2dt2(t1)2\Rightarrow I = \int {\dfrac{{{{\sec }^2}\left( {\dfrac{x}{2}} \right)dx}}{{2 - {{\left( {\tan \left( {\dfrac{x}{2}} \right) - 1} \right)}^2}}}} = \int {\dfrac{{2dt}}{{2 - {{\left( {t - 1} \right)}^2}}}}
We can write this as follows by using the formula: a2b2=(ab)(a+b){a^2} - {b^2} = (a - b)(a + b).
I=2dt(2+(t1))(2(t1))\Rightarrow I = 2\int {\dfrac{{dt}}{{\left( {\sqrt 2 + \left( {t - 1} \right)} \right)\left( {\sqrt 2 - \left( {t - 1} \right)} \right)}}}
Rearranging the terms to get the following expression:-
I=12(12+(t1)+12(t1))dt\Rightarrow I = \dfrac{1}{{\sqrt 2 }}\int {\left( {\dfrac{1}{{\sqrt 2 + \left( {t - 1} \right)}}} \right.} + \left. {\dfrac{1}{{\sqrt 2 - \left( {t - 1} \right)}}} \right)dt ………….(Y)
We also know that dxx+a=lnx+a+C\int {\dfrac{{dx}}{{x + a}}} = \ln |x + a| + C
Hence, using this in (Y), we will get:-
\Rightarrow I = \dfrac{1}{{\sqrt 2 }}\left\\{ {\ln |\sqrt 2 + (t - 1)| - \ln |\sqrt 2 - (t - 1)|} \right\\} + C
Now, we can just modify this as per our requirements and if there are no options given, we can leave it here only.
Method 2:
We have I=dxsinx+cosxI = \int {\dfrac{{dx}}{{\sin x + \cos x}}}
We can rewrite this as I=(12)dxsinx(12)+cosx(12)I = \int {\dfrac{{\left( {\dfrac{1}{{\sqrt 2 }}} \right)dx}}{{\sin x\left( {\dfrac{1}{{\sqrt 2 }}} \right) + \cos x\left( {\dfrac{1}{{\sqrt 2 }}} \right)}}}
We can also rewrite this as: I=(12)dxsinxsinπ4+cosxcosπ4I = \left( {\dfrac{1}{{\sqrt 2 }}} \right)\int {\dfrac{{dx}}{{\sin x\sin \dfrac{\pi }{4} + \cos x\cos \dfrac{\pi }{4}}}}
We also know that cos(xy)=sinxsiny+cosxcosy\cos (x - y) = \sin x\sin y + \cos x\cos y.
So, we will get:- I=(12)dxcos(xπ4)I = \left( {\dfrac{1}{{\sqrt 2 }}} \right)\int {\dfrac{{dx}}{{\cos \left( {x - \dfrac{\pi }{4}} \right)}}}
Let u=xπ4u = x - \dfrac{\pi }{4}
I=(12)secuduI = \left( {\dfrac{1}{{\sqrt 2 }}} \right)\int {\sec udu}
Now using the formula: secx=lnsecx+tanx+C\int {\sec x = \ln \left| {\sec x + \tan x} \right| + C}
Hence, we get: I=(12)lnsecu+tanu+CI = \left( {\dfrac{1}{{\sqrt 2 }}} \right)\ln \left| {\sec u + \tan u} \right| + C
Now, just put in the value of u as we assumed and thus, we get our answer.