Solveeit Logo

Question

Question: How do I evaluate \(\int {\dfrac{{1 + \cos x}}{{\sin x}}dx} \)?...

How do I evaluate 1+cosxsinxdx\int {\dfrac{{1 + \cos x}}{{\sin x}}dx} ?

Explanation

Solution

First, separate the denominator in the integral and use trigonometric identities to simplify it. Then, use the property that the integral of the sum or difference of a finite number of functions is equal to the sum or difference of the integrals of the various functions. Next, use integral formula for cosecant and cotangent function. Then, use logarithm property and trigonometry identity to further simplify the result.and get the desired result.

Formula used:
The integral of the product of a constant and a function = the constant ×\times integral of the function.
i.e., (kf(x)dx)=kf(x)dx\int {\left( {kf\left( x \right)dx} \right)} = k\int {f\left( x \right)dx} , where kk is a constant.
Trigonometric identity: cosecx=1sinx\cos ecx = \dfrac{1}{{\sin x}}, cotx=cosxsinx\cot x = \dfrac{{\cos x}}{{\sin x}}
The integral of the sum or difference of a finite number of functions is equal to the sum or difference of the integrals of the various functions.
i.e., [f(x)±g(x)]dx=f(x)dx±g(x)dx\int {\left[ {f\left( x \right) \pm g\left( x \right)} \right]dx} = \int {f\left( x \right)dx} \pm \int {g\left( x \right)dx}
Integration formula: cosecxdx=logcosecxcotx+C\int {\cos ecxdx} = \log \left| {\cos ecx - \cot x} \right| + C and cotxdx=logsinx+C\int {\cot xdx} = \log \left| {\sin x} \right| + C

Complete step by step answer:
We have to find 1+cosxsinxdx\int {\dfrac{{1 + \cos x}}{{\sin x}}dx} …(i)
First, separate the denominator in integral (i).
[1sinx+cosxsinx]dx\int {\left[ {\dfrac{1}{{\sin x}} + \dfrac{{\cos x}}{{\sin x}}} \right]dx} …(ii)
Now, use trigonometry identities cosecx=1sinx\cos ecx = \dfrac{1}{{\sin x}} and cotx=cosxsinx\cot x = \dfrac{{\cos x}}{{\sin x}} in integral (ii).
[cosecx+cotx]dx\int {\left[ {\cos ecx + \cot x} \right]dx} …(iii)
Now, using the property that the integral of the sum or difference of a finite number of functions is equal to the sum or difference of the integrals of the various functions.
i.e., [f(x)±g(x)]dx=f(x)dx±g(x)dx\int {\left[ {f\left( x \right) \pm g\left( x \right)} \right]dx} = \int {f\left( x \right)dx} \pm \int {g\left( x \right)dx}
So, in above integral (iii), we can use above property
cosecxdx+cotxdx\int {\cos ecxdx} + \int {\cot xdx} …(iv)
Now, use property cosecxdx=logcosecxcotx+C\int {\cos ecxdx} = \log \left| {\cos ecx - \cot x} \right| + C and cotxdx=logsinx+C\int {\cot xdx} = \log \left| {\sin x} \right| + C in integral (iv).
logcosecxcotx+logsinx+C\Rightarrow \log \left| {\cos ecx - \cot x} \right| + \log \left| {\sin x} \right| + C
Now, use property logm+logn=logmn\log m + \log n = \log mn to simplify the above result.
log(cosecxcotx)(sinx)+C\Rightarrow \log \left| {\left( {\cos ecx - \cot x} \right)\left( {\sin x} \right)} \right| + C
Multiply sinx\sin x to (cosecxcotx)\left( {\cos ecx - \cot x} \right), we get
logcosecx×sinxcotx×sinx+C\Rightarrow \log \left| {\cos ecx \times \sin x - \cot x \times \sin x} \right| + C
Now, use trigonometry identities cosecx=1sinx\cos ecx = \dfrac{1}{{\sin x}} and cotx=cosxsinx\cot x = \dfrac{{\cos x}}{{\sin x}}.
log1sinx×sinxcosxsinx×sinx+C\Rightarrow \log \left| {\dfrac{1}{{\sin x}} \times \sin x - \dfrac{{\cos x}}{{\sin x}} \times \sin x} \right| + C
Cancel the common factor.
log1cosx+C\Rightarrow \log \left| {1 - \cos x} \right| + C

Hence, 1+cosxsinxdx=log1cosx+C\int {\dfrac{{1 + \cos x}}{{\sin x}}dx} = \log \left| {1 - \cos x} \right| + C.

Note: cotxdx=logsinx+C\int {\cot xdx} = \log \left| {\sin x} \right| + C
We have cotxdx=cosxsinxdx\int {\cot xdx} = \int {\dfrac{{\cos x}}{{\sin x}}dx}
Put sinx=t\sin x = t so that cosxdx=dt\cos xdx = dt.
Then, cotxdx=dtt=logt+C=logsinx+C\int {\cot xdx} = \int {\dfrac{{dt}}{t}} = \log \left| t \right| + C = \log \left| {\sin x} \right| + C.
And, cosecxdx=logcosecxcotx+C\int {\cos ecxdx} = \log \left| {\cos ecx - \cot x} \right| + C
We have cosecxdx=cosecx(cosecx+cotx)(cosecx+cotx)dx\int {\cos ecxdx} = \int {\dfrac{{\cos ecx\left( {\cos ecx + \cot x} \right)}}{{\left( {\cos ecx + \cot x} \right)}}dx}
Put cosecx+cotx=t\cos ecx + \cot x = t so that cosecx(cosecx+cotx)dx=dt - \cos ecx\left( {\cos ecx + \cot x} \right)dx = dt.
So, cosecxdx=dtt=logt=logcosecx+cotx+C\int {\cos ecxdx} = - \int {\dfrac{{dt}}{t}} = \log \left| t \right| = - \log \left| {\cos ecx + \cot x} \right| + C
It can also be written as
cosecxdx=logcosec2xcot2xcosecxcotx+C\int {\cos ecxdx} = - \log \left| {\dfrac{{\cos e{c^2}x - {{\cot }^2}x}}{{\cos ecx - \cot x}}} \right| + C
Therefore, cosecxdx=logcosecxcotx+C\int {\cos ecxdx} = \log \left| {\cos ecx - \cot x} \right| + C.