Integral Intermediate

Problem - 4604

Compute $$\int\frac{1}{\sin{x}}d{x}$$


Solution 1

Multiplying both the numerator and the denominator by $\sin{x}$: $$\int\frac{\sin{x}}{\sin^2{x}}d{x}=-\int\frac{d{\cos{x}}}{1-\cos^2{x}}$$

The next step is to apply the following identity (This technique is discussed in the book  Power Calculation 

$$\frac{1}{1-u^2}=\frac{1}{(1+u)(1-u)}=\frac{1}{2}\left(\frac{1}{1+u}+\frac{1}{1-u}\right)$$

The original integral becomes $$\begin{align*}&-\frac{1}{2}\int\left(\frac{1}{1+\cos{x}}+\frac{1}{1-\cos{x}}\right)d{\cos{x}}\\&=-\frac{1}{2}\int\left(\frac{1}{1+\cos{x}}\right)d{\cos{x}} +\frac{1}{2}\int\left(\frac{1}{1-\cos{x}}\right)d(-\cos{x})\\&=-\frac{1}{2}\ln\left|1+\cos{x}\right| + \frac{1}{2}\ln\left|1-\cos{x}\right| + C\\&=\frac{1}{2}\ln\left|\frac{1-\cos{x}}{1+\cos{x}}\right|+C\end{align*}$$

Now by the double angle formulas

$$1-\cos{x}=2\sin^2{\frac{x}{2}}\quad\text{and}\quad 1+\cos{x}=2\cos^2{\frac{x}{2}}$$

we have

$$\frac{1}{2}\ln{\left|\frac{1-\cos{x}}{1+\cos{x}}\right|}+C=\frac{1}{2}\ln\tan^2{\frac{x}{2}}+C=\boxed{\ln{\left|\tan{\frac{x}{2}}\right|}+C}$$

Solution 2

Let $x=2u$ then $d{x}=2d{u}$. Also note the identities that $\sin{2u}=2\sin{u}\cos{u}$ and $1=\sin^2{u}+\cos^{u}$. Therefore the original integral is equivalent to

$$\begin{align*}\int\frac{1}{\sin{x}}d{x} &= \int\frac{2}{2\sin{u}\cos{u}}d{u}\\&=\int\frac{\sin^2u + \cos^2u}{\sin{u}\cos{u}}d{u}\\&=\int\left(\frac{\sin{u}}{\cos{u}}+\frac{\cos{x}}{\sin{u}}\right)d{u}\\&=-\int\frac{d{\cos{x}}}{\cos{x}} +\int\frac{d{\sin{x}}}{\sin{u}}\\&=-\ln{\left|\cos{x}\right|} + \ln\left|\sin{x}\right| + C\\&=\ln\left|\tan{u}\right| + C\\&=\boxed{\ln{\left|\tan{\frac{x}{2}}\right|}+C}\end{align*}$$

Solution 3

This transformation is less obvious.

$$\int\frac{1}{\sin{x}}d{x}=\int\csc{x}d{x}=\int\csc{x}\frac{\csc{x}+\cot{x}}{\csc{x}+\cot{x}}d{x}$$

Now, note the following two results by the chain rule and the quotient rule: (They can be included into the table of derivatives too.)

$$\begin{align*}\frac{d}{dx}\csc{x}&=\frac{d}{dx}\left(\frac{1}{\sin{x}}\right)=\frac{-\cos{x}}{\sin^2{x}}=-\csc{x}\cot{x}\\\frac{d}{dx}\cot{x}&=\frac{d}{dx}\left(-\frac{\cos{x}}{\sin{x}}\right)=\frac{\sin{x}\sin{x}-\cos{x}\cos{x}}{\sin^2{x}}=-\csc^2{x}\end{align*}$$

It follows that the derivative of the original integral's denominator is equal to

$$\frac{d}{dx}(\csc{x}+\cot{x})=-\csc{x}\cot{x} -\csc^2{x}$$

which equals to the opposite of its numerator. Hence, the original integral equals

$$-\int\frac{d{(\csc{x}+\cot{x})}}{\csc{x}+\cot{x}}=\boxed{-\ln{\left|\csc{x}+\cot{x}\right|}+C}$$

It can be shown that this result is equivalent to the one obtained in the previous two solutions by trigonometric transformation.

report an error