** Final answer to the problem

**

** Step-by-step Solution **

** How should I solve this problem?

- Choose an option
- Integrate by partial fractions
- Integrate by substitution
- Integrate by parts
- Integrate using tabular integration
- Integrate by trigonometric substitution
- Weierstrass Substitution
- Integrate using trigonometric identities
- Integrate using basic integrals
- Product of Binomials with Common Term
- Load more...

**

**

We can solve the integral $\int\frac{1}{\sin\left(x\right)-1}dx$ by applying the method Weierstrass substitution (also known as tangent half-angle substitution) which converts an integral of trigonometric functions into a rational function of $t$ by setting the substitution

**

**

Hence

**

**

Substituting in the original integral we get

**

**

Simplifying

**

**

Rewrite the expression $\frac{2}{2t-\left(1+t^{2}\right)}$ inside the integral in factored form

**

**

Simplify the division $2$ by $-1$

**

**

We can solve the integral $\int\frac{-2}{\left(t-1\right)^{2}}dt$ by applying integration by substitution method (also called U-Substitution). First, we must identify a section within the integral with a new variable (let's call it $u$), which when substituted makes the integral easier. We see that $t-1$ it's a good candidate for substitution. Let's define a variable $u$ and assign it to the choosen part

**

**

Now, in order to rewrite $dt$ in terms of $du$, we need to find the derivative of $u$. We need to calculate $du$, we can do that by deriving the equation above

**

**

Substituting $u$ and $dt$ in the integral and simplify

**

**

Rewrite the exponent using the power rule $\frac{a^m}{a^n}=a^{m-n}$, where in this case $m=0$

**

**

The integral of a function times a constant ($-2$) is equal to the constant times the integral of the function

**

**

Apply the power rule for integration, $\displaystyle\int x^n dx=\frac{x^{n+1}}{n+1}$, where $n$ represents a number or constant function, such as $-2$

**

**

Simplify the fraction $-2\left(\frac{u^{-1}}{-1}\right)$

**

**

Replace $u$ with the value that we assigned to it in the beginning: $t-1$

**

**

Applying the property of exponents, $\displaystyle a^{-n}=\frac{1}{a^n}$, where $n$ is a number

**

**

Replace $t$ with the value that we assigned to it in the beginning: $\tan\left(\frac{x}{2}\right)$

**

**

As the integral that we are solving is an indefinite integral, when we finish integrating we must add the constant of integration $C$

** Final answer to the problem

**