Evaluating $ \int \frac{ 1 } { \sin x – \cos x – 1} dx$

calculusindefinite-integralsintegrationtrigonometry

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.

Best Answer

Another approach

$$ I=\int \dfrac{ 1 } { \sin x - \cos x - 1}dx = \int \dfrac{ \sin x - \cos x + 1 } { (\sin x - \cos x)^2 - 1} dx=\int \dfrac{ \sin x - \cos x + 1 } { -2\sin x \cos x} dx$$

we get

$$I=-\frac{1}2\int \sec x~ dx+\frac{1}2\int \csc x~ dx-\int \csc (2x)~ dx$$

So we convert it into the sum of three basic integrals. Can you proceed from here?