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

The calculator will find the integral/antiderivative of $$$\frac{1}{1 - \sin{\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}{1 - \sin{\left(x \right)}}\, dx$$$.

Solution

Rewrite $$$1$$$ as $$$\sin^2\left(\frac{x}{2}\right)+\cos^2\left(\frac{x}{2}\right)$$$ and apply the double angle formula for the sine $$$\sin\left(x\right)=2\sin\left(\frac{x}{2}\right)\cos\left(\frac{x}{2}\right)$$$:

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

Complete the square (steps can be seen »):

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

Multiply the numerator and denominator by $$$\sec^2\left(\frac{x}{2}\right)$$$:

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

Let $$$u=\tan{\left(\frac{x}{2} \right)} - 1$$$.

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

The integral can be rewritten as

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

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

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

Apply the power rule $$$\int u^{n}\, du = \frac{u^{n + 1}}{n + 1}$$$ $$$\left(n \neq -1 \right)$$$ with $$$n=-2$$$:

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

Recall that $$$u=\tan{\left(\frac{x}{2} \right)} - 1$$$:

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

Therefore,

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

Add the constant of integration:

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

Answer

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


Please try a new game Rotatly