Below is a problem I attempted. However, I failed to find the right approach.
Problem: Perform the following integration: $$ \int \dfrac{ 1 } { \sin x - \cos x - 1} dx$$
Answer:
Let $I$ be the integral we are trying to evaluate. My first approach is to try to simplify the denominator by using the idenity $\sin^2 x + \cos^2 x = 1$. \begin{align*} I &= \int \dfrac{1 } { \sin x - (\cos x + 1)}dx \\ I &= \int \dfrac{ ( \sin x + (\cos x + 1)) } { ( \sin x + (\cos x + 1))( \sin x - (\cos x + 1))}dx \\ % I &= \int \dfrac{ ( \sin x + (\cos x + 1)) } {\sin^2x - \sin x(\cos x + 1) + \sin x (\cos x + 1) - (\cos^2 x + 1)^2} dx\\ % I &= \int \dfrac{ ( \sin x + \cos x + 1) } {\sin^2x - \cos^2x - 2\cos x - 1} dx\\ \end{align*} At this point, I do not see how to make progress. I was hoping for a $\sin^2x + \cos^2x$ in the denominator.
My second approach. \begin{align*} I &= \int \dfrac{ (\cos x) \,\, dx } { \sin x \cos x - \cos^2x - \cos x } \\ I &= \int \dfrac{ (\cos x) \,\, dx } { \sin x \cos x - \cos^2x - (1 - \sin^2 x) - \sqrt{1-\sin^2 x} } \\ \end{align*} Now I can apply the subsutution $u = \sin x$ and get rid of the trig functions. \begin{align*} I &= \int \dfrac{ du } { u^{\frac{3}{2}} - (1-u^2) - u^{ \frac{1}{2}} } \\ I &= \int \dfrac{ du } { u^2 + u^{\frac{3}{2}} - u^{ \frac{1}{2}} - 1 } \end{align*} Again, I do not see how to make progress.
My third approach is to dividend numerator and denominator by $\cos^2 x$ hoping to setup a substitution like $u = \tan x$. \begin{align*} I &= \int \dfrac{ (\sec^2 x) \,\, dx } { \dfrac{ \tan x}{\cos x} - \sec x - \sec^2 x } \\ \end{align*} What is the right way to solve this problem?
Note: I was planning on adding the homework tag to this post (despite the fact I am not in school) because I am not looking for the answer. I am looking for guidance to get there. When I attempted to use that tag, I got a message saying please do not use it. So I did not.
Using the famous Weierstrass substitution, let $t=\tan\left(\frac{x}{2}\right)$, the we have: $$\sin x=\frac{2t}{1+t^2} \hspace{1cm} \cos x=\frac{1-t^2}{1+t^2} \hspace{1cm} \text{d}x=\frac{2}{1+t^2}\text{d}t$$ now the integral reduces to $$\int\frac{\frac{2}{1+t^2}} {\frac{2t}{1+t^2}-\frac{1-t^2}{1+t^2}-1}dt=$$ $$=\int\frac{1}{t-1}dt$$ and this can is just $$\log |t - 1| + C$$