Evaluate the following integrals:
$\int \sqrt{\operatorname{cosec} x-1} d x$
$\int \sqrt{\operatorname{cosec} x-1} d x$
Since $\operatorname{cosec} x=1 / \sin x$
$\int \sqrt{\operatorname{cosec} x-1} d x=\int \sqrt{\frac{1}{\sin x}-1} d x=\int \sqrt{\frac{1-\sin x}{\sin x}} d x$
Multiply with $(1+\sin x)$ both numerator and denominator
$=\int \sqrt{\frac{1-\sin x}{\sin x}} d x=\int \sqrt{\frac{1-\sin x *(1+\sin x)}{\sin x *(1+\sin x)}} d x$
Since $(a+b) \times(a-b)=a^{2}-b^{2}$
$=\int \sqrt{\frac{1-\sin x \times(1+\sin x)}{\sin x \times(1+\sin x)}} d x=\int \sqrt{\frac{1-\sin ^{2} x}{\left.\sin x+\sin ^{2} x\right)}} d x$
$=\int \sqrt{\left.\frac{\cos ^{2} x}{\sin x+\sin ^{2} x}\right)} d x$
$=\int \frac{\cos x}{\sqrt{\sin x+\sin ^{2} x}} d x$
Let $\sin x=t$
$d t=\cos x d x$
therefore, $\int \frac{\cos x}{\sqrt{\sin x+\sin ^{2} x}} d x=\int \frac{d t}{\sqrt{t^{2}-t}}$
multiply and divide by 2 and add and subtract $(1 / 2)^{2}$ in denominator,
$=\int \frac{d t}{\sqrt{t^{2}-2 t\left(\frac{1}{2}\right)+\left(\frac{1}{2}\right)^{2}-\left(\frac{1}{2}\right)^{2}}}=\frac{\int d t}{\sqrt{\left(t+\frac{1}{2}\right)^{2}}-\left(\frac{1}{2}\right)^{2}}$
Let $t+1 / 2=u$
$d t=d u$
$=\frac{\int \mathrm{dt}}{\sqrt{\left.\left(\mathrm{t}+\frac{1}{2}\right)^{2}-\left(\frac{1}{2}\right)^{2}\right)}}=\int \frac{\mathrm{dt}}{\sqrt{\left(\mathrm{u}^{2}-\left(\frac{1}{2}\right)^{2}\right.}}$
Since, $\int \frac{1}{\sqrt{\left(x^{2}-a^{2}\right)}} d x=\log \left[x+\sqrt{\left.\left(x^{2}-a^{2}\right)\right]+c}\right.$
$=\int \frac{\mathrm{dt}}{\sqrt{\left(\mathrm{u}^{2}-\left(\frac{1}{2}\right)^{2}\right.}}=\log \left[\mathrm{u}+\sqrt{\left(\left(\mathrm{u}^{2}-\left(\frac{1}{2}\right)^{2}\right)\right]}+\mathrm{c}\right.$
$=\log \left[\mathrm{t}+\frac{1}{2}+\sqrt{\left(\left(\left(\mathrm{t}+\frac{1}{2}\right)^{2}-\left(\frac{1}{2}\right)^{2}\right)\right]}+\mathrm{c}\right.$
$=\log \left[\sin x+\frac{1}{2}+\sqrt{\sin ^{2} x+\sin x}\right]+c$