# Math Help - 1/sin(x) integral question

1. ## 1/sin(x) integral question

Wolfram Alpha says this https://www.wolframalpha.com/input/?...Fsin%28x%29%29
And my solution is this https://www.wolframalpha.com/input/?...=&equal=Submit

When I check if they are the same it says no. https://www.wolframalpha.com/input/?...=&equal=Submit

Am I missing something?

2. ## Re: 1/sin(x) integral question

$\log(\sin(\frac x 2)) - \log(\cos(\frac x 2))=\log\left(\dfrac{\sin(\frac x 2)}{\cos(\frac x 2)}\right)=\log\left(\sqrt{\dfrac{\cos(x)-1}{\cos(x)+1}}\right)=-\dfrac 1 2 \log\left(\dfrac{\cos(x)+1}{\cos(x)-1}\right)$

3. ## Re: 1/sin(x) integral question

Hello, kicma!

I don't know why everyone has those intricate answers.

There is a "standard" method to integrate: . $\int \frac{dx}{\sin x}$

We have: . $\int \csc x\,dx$

Multiply by $\frac{\csc x - \cot x}{\csc x-\cot x}$

$\int \frac{\csc x}{1}\cdot\frac{\csc x - \cot x}{\csc x - \cot x}\,dx \;=\;\int \frac{\csc^2x - \csc x\cot x}{\csc x - \cot x}\,dx$

Let $u \:=\:\csc x - \cot x \quad\Rightarrow\quad du \:=\:(-\csc x\cot x + \csc^2x)dx$

Substitute: . $\int \frac{du}{u} \;=\;\ln |u| +C$

Back-substitute: . $\ln|\csc x - \cot x| + C$

4. ## Re: 1/sin(x) integral question

Originally Posted by kicma
Wolfram Alpha says this https://www.wolframalpha.com/input/?...Fsin%28x%29%29
And my solution is this https://www.wolframalpha.com/input/?...=&equal=Submit

When I check if they are the same it says no. https://www.wolframalpha.com/input/?...=&equal=Submit

Am I missing something?
\displaystyle \begin{align*} \int{ \frac{dx}{\sin{(x)}} } &= \int{ \frac{\sin{(x)}\,dx}{\sin^2{(x)}} } \\ &= -\int{ \frac{-\sin{(x)}\,dx}{1 - \cos^2{(x)}} } \end{align*}

Now make the substitution \displaystyle \begin{align*} u = \cos{(x)} \implies du = -\sin{(x)}\,dx \end{align*} and the integral becomes

\displaystyle \begin{align*} -\int{ \frac{-\sin{(x)}\,dx}{1 - \cos^2{(x)}}} &= -\int{ \frac{du}{1 - u^2} } \\ &= -\int{ \frac{du}{(1 - u)(1 + u)} } \end{align*}

Now applying partial fractions:

\displaystyle \begin{align*} \frac{A}{1 - u} + \frac{B}{1 + u} &\equiv \frac{1}{(1 - u)(1 + u)} \\ A(1 + u) + B(1 - u) &\equiv 1 \end{align*}

Let \displaystyle \begin{align*} u = 1 \end{align*} to find \displaystyle \begin{align*} 2A = 1 \implies A = \frac{1}{2} \end{align*} and let \displaystyle \begin{align*} u = -1 \end{align*} to find \displaystyle \begin{align*} 2B = 1 \implies B = \frac{1}{2} \end{align*} and we get

\displaystyle \begin{align*} -\int{ \frac{du}{(1 - u)(1 + u)} } &= -\int{ \frac{1}{2} \left( \frac{1}{1 - u} \right) + \frac{1}{2} \left( \frac{1}{1 + u} \right) \, du} \\ &= -\frac{1}{2} \int{ \frac{1}{1 - u} + \frac{1}{1 + u} \, du} \\ &= -\frac{1}{2} \left( -\ln{ \left| 1 - u \right| } + \ln{ \left| 1 + u \right| } \right) + C \\ &= -\frac{1}{2} \ln{ \left| \frac{1 + u}{ 1 - u} \right| } + C \\ &= \frac{1}{2} \ln{ \left| \frac{1 - u}{1 + u} \right| } + C \\ &= \frac{1}{2} \ln{ \left| \frac{1 - \cos{(x)}}{1 + \cos{(x)}} \right| } + C \end{align*}