1/(cosx-1)

We are asked to evaluate the indefinite integral `int 1/(cosx-1)dx`

We try to think of a substitution that will allow us to do the integration. We note that `sin(x/2)=sqrt((1-cosx)/2)` . The integrand looks a lot like the radicand. There is a factor of -2 to deal with, as well as needing the reciprocal.

Thinking of the reciprocal we consider the opposite reciprocal of `sin(x/2)` which is `-csc(x/2)` . To remove the root we can square to get `-csc^2(x/2)` .

The function whose derivative is cosecant squared is the cotangent. So the answer we seek is :` `` `

`int 1/(cosx-1)=cot(x/2)+C`

We can check this answer:

`d/(dx)cot(x/2)+C=-1/2csc^2(x/2)`

`=(-1)/(2(sin^2(x/2)))`

Using the half-angle formula we get

`=(-1)/(2((1-cosx)/2))`

`=(-1)/(1-cosx)`

`=1/(cosx-1)` as required.

If you recognized the integrand as looking like one of the half-angle formulas, you could reverse some of these steps to rewrite the integrand as the square of the cosecant and immediately use anti-differentiation to get the result.

You want to familiarize yourself with basic trigonometric identities, especially half-angle and double-angle formulas, as these are often used as substitutions for algebraic expressions. The Pythagorean relationships are useful to rewrite 1 as a sum or difference of trigonometric functions. This last is also often useful to rewrite sums or differences of squares after a suitable substitution. I hope this helps.