Integral of $$$\frac{1}{\sin{\left(x \right)} \cos{\left(x \right)}}$$$

The calculator will find the integral/antiderivative of $$$\frac{1}{\sin{\left(x \right)} \cos{\left(x \right)}}$$$, with steps shown.

Related calculator: Definite and Improper Integral Calculator

Please write without any differentials such as $$$dx$$$, $$$dy$$$ etc.
Leave empty for autodetection.

If the calculator did not compute something or you have identified an error, or you have a suggestion/feedback, please contact us.

Your Input

Find $$$\int \frac{1}{\sin{\left(x \right)} \cos{\left(x \right)}}\, dx$$$.

Solution

Multiply the numerator and denominator by one sine and write everything else in terms of the cosine, using the formula $$$\sin^2\left(\alpha \right)=-\cos^2\left(\alpha \right)+1$$$ with $$$\alpha=x$$$:

$${\color{red}{\int{\frac{1}{\sin{\left(x \right)} \cos{\left(x \right)}} d x}}} = {\color{red}{\int{\frac{\sin{\left(x \right)}}{\left(1 - \cos^{2}{\left(x \right)}\right) \cos{\left(x \right)}} d x}}}$$

Let $$$u=\cos{\left(x \right)}$$$.

Then $$$du=\left(\cos{\left(x \right)}\right)^{\prime }dx = - \sin{\left(x \right)} dx$$$ (steps can be seen »), and we have that $$$\sin{\left(x \right)} dx = - du$$$.

Thus,

$${\color{red}{\int{\frac{\sin{\left(x \right)}}{\left(1 - \cos^{2}{\left(x \right)}\right) \cos{\left(x \right)}} d x}}} = {\color{red}{\int{\left(- \frac{1}{u \left(1 - u^{2}\right)}\right)d u}}}$$

Apply the constant multiple rule $$$\int c f{\left(u \right)}\, du = c \int f{\left(u \right)}\, du$$$ with $$$c=-1$$$ and $$$f{\left(u \right)} = \frac{1}{u \left(1 - u^{2}\right)}$$$:

$${\color{red}{\int{\left(- \frac{1}{u \left(1 - u^{2}\right)}\right)d u}}} = {\color{red}{\left(- \int{\frac{1}{u \left(1 - u^{2}\right)} d u}\right)}}$$

Let $$$v=1 - u^{2}$$$.

Then $$$dv=\left(1 - u^{2}\right)^{\prime }du = - 2 u du$$$ (steps can be seen »), and we have that $$$u du = - \frac{dv}{2}$$$.

Therefore,

$$- {\color{red}{\int{\frac{1}{u \left(1 - u^{2}\right)} d u}}} = - {\color{red}{\int{\frac{1}{2 v \left(v - 1\right)} d v}}}$$

Apply the constant multiple rule $$$\int c f{\left(v \right)}\, dv = c \int f{\left(v \right)}\, dv$$$ with $$$c=\frac{1}{2}$$$ and $$$f{\left(v \right)} = \frac{1}{v \left(v - 1\right)}$$$:

$$- {\color{red}{\int{\frac{1}{2 v \left(v - 1\right)} d v}}} = - {\color{red}{\left(\frac{\int{\frac{1}{v \left(v - 1\right)} d v}}{2}\right)}}$$

Perform partial fraction decomposition (steps can be seen »):

$$- \frac{{\color{red}{\int{\frac{1}{v \left(v - 1\right)} d v}}}}{2} = - \frac{{\color{red}{\int{\left(\frac{1}{v - 1} - \frac{1}{v}\right)d v}}}}{2}$$

Integrate term by term:

$$- \frac{{\color{red}{\int{\left(\frac{1}{v - 1} - \frac{1}{v}\right)d v}}}}{2} = - \frac{{\color{red}{\left(- \int{\frac{1}{v} d v} + \int{\frac{1}{v - 1} d v}\right)}}}{2}$$

Let $$$w=v - 1$$$.

Then $$$dw=\left(v - 1\right)^{\prime }dv = 1 dv$$$ (steps can be seen »), and we have that $$$dv = dw$$$.

The integral becomes

$$\frac{\int{\frac{1}{v} d v}}{2} - \frac{{\color{red}{\int{\frac{1}{v - 1} d v}}}}{2} = \frac{\int{\frac{1}{v} d v}}{2} - \frac{{\color{red}{\int{\frac{1}{w} d w}}}}{2}$$

The integral of $$$\frac{1}{w}$$$ is $$$\int{\frac{1}{w} d w} = \ln{\left(\left|{w}\right| \right)}$$$:

$$\frac{\int{\frac{1}{v} d v}}{2} - \frac{{\color{red}{\int{\frac{1}{w} d w}}}}{2} = \frac{\int{\frac{1}{v} d v}}{2} - \frac{{\color{red}{\ln{\left(\left|{w}\right| \right)}}}}{2}$$

Recall that $$$w=v - 1$$$:

$$- \frac{\ln{\left(\left|{{\color{red}{w}}}\right| \right)}}{2} + \frac{\int{\frac{1}{v} d v}}{2} = - \frac{\ln{\left(\left|{{\color{red}{\left(v - 1\right)}}}\right| \right)}}{2} + \frac{\int{\frac{1}{v} d v}}{2}$$

The integral of $$$\frac{1}{v}$$$ is $$$\int{\frac{1}{v} d v} = \ln{\left(\left|{v}\right| \right)}$$$:

$$- \frac{\ln{\left(\left|{v - 1}\right| \right)}}{2} + \frac{{\color{red}{\int{\frac{1}{v} d v}}}}{2} = - \frac{\ln{\left(\left|{v - 1}\right| \right)}}{2} + \frac{{\color{red}{\ln{\left(\left|{v}\right| \right)}}}}{2}$$

Recall that $$$v=1 - u^{2}$$$:

$$- \frac{\ln{\left(\left|{-1 + {\color{red}{v}}}\right| \right)}}{2} + \frac{\ln{\left(\left|{{\color{red}{v}}}\right| \right)}}{2} = - \frac{\ln{\left(\left|{-1 + {\color{red}{\left(1 - u^{2}\right)}}}\right| \right)}}{2} + \frac{\ln{\left(\left|{{\color{red}{\left(1 - u^{2}\right)}}}\right| \right)}}{2}$$

Recall that $$$u=\cos{\left(x \right)}$$$:

$$\frac{\ln{\left(\left|{-1 + {\color{red}{u}}^{2}}\right| \right)}}{2} - \frac{\ln{\left({\color{red}{u}}^{2} \right)}}{2} = \frac{\ln{\left(\left|{-1 + {\color{red}{\cos{\left(x \right)}}}^{2}}\right| \right)}}{2} - \frac{\ln{\left({\color{red}{\cos{\left(x \right)}}}^{2} \right)}}{2}$$

Therefore,

$$\int{\frac{1}{\sin{\left(x \right)} \cos{\left(x \right)}} d x} = - \frac{\ln{\left(\cos^{2}{\left(x \right)} \right)}}{2} + \frac{\ln{\left(\left|{\cos^{2}{\left(x \right)} - 1}\right| \right)}}{2}$$

Simplify:

$$\int{\frac{1}{\sin{\left(x \right)} \cos{\left(x \right)}} d x} = \frac{\ln{\left(1 - \cos^{2}{\left(x \right)} \right)}}{2} - \ln{\left(\cos{\left(x \right)} \right)}$$

Add the constant of integration:

$$\int{\frac{1}{\sin{\left(x \right)} \cos{\left(x \right)}} d x} = \frac{\ln{\left(1 - \cos^{2}{\left(x \right)} \right)}}{2} - \ln{\left(\cos{\left(x \right)} \right)}+C$$

Answer

$$$\int \frac{1}{\sin{\left(x \right)} \cos{\left(x \right)}}\, dx = \left(\frac{\ln\left(1 - \cos^{2}{\left(x \right)}\right)}{2} - \ln\left(\cos{\left(x \right)}\right)\right) + C$$$A


Please try a new game Rotatly