# Calculate integral $\int_{}^{} \frac{1}{\sqrt{1 - \cos x}} \,dx$

The integral is

$$\int_{}^{} \frac{1}{\sqrt{1 - \cos x}} \,dx$$

I've made a bit of progress below, but I'm stuck as to how to move forward.

Using some help, I've used $$1 - \cos x = 2\sin^{2} \frac{x}{2}$$ to get that this integral becomes $$\frac{1}{\sqrt{2}} \int_{}^{} \frac{1}{\sin \frac{x}{2}} dx$$. Because $$\sin \frac{x}{2} = \frac{2\tan \frac{x}{4}}{1 + \tan^{2} \frac{x}{4}}$$, we get it to be $$\frac {1}{\sqrt{2}} \int_{}^{} \frac{1 + \tan^{2} \frac{x}{4}}{2\tan \frac{x}{4}} dx$$. I would like some help as to how to proceed from here.

• It is indeed somewhat tricky: $$\frac{2 \sin \left(\frac{x}{2}\right) \left(\log \left(\sin \left(\frac{x}{4}\right)\right)-\log \left(\cos \left(\frac{x}{4}\right)\right)\right)}{\sqrt{1-\cos (x)}}$$ Dec 19, 2020 at 17:53
• How exactly did you get to this? Sorry I'm just unsure of the steps involved. Dec 19, 2020 at 18:00
• Mathematica.. Dec 19, 2020 at 18:04
• $\sqrt{1-\cos x}=\sqrt 2\color{red}|\sin \frac x2\color{red}|$. Dec 19, 2020 at 18:26

Note $$\int\frac1{\sin\frac x2}dx=\int\frac1{2\cos\frac x4 \sin\frac x4}dx =\frac12 \int\frac{\sec^2\frac x4}{\tan\frac x4 }dx=2\ln(\tan\frac x4)+C$$ Thus $$\int_{}^{} \frac{1}{\sqrt{1 - \cos x}} \,dx= \frac{1}{\sqrt{2}} \int_{}^{} \frac{1}{\sin \frac{x}{2}} dx =\sqrt2 \ln(\tan\frac x4)+C$$
The evaluation of the antiderivatives of $$\sec x$$ and $$\csc x$$ are frequently taught as follows: $$\sec x = \frac{\sec x (\tan x + \sec x)}{\tan x + \sec x} = \frac{\sec x \tan x + \sec^2 x}{\tan x + \sec x},$$ and since $$\frac{d}{dx}[\tan x] = \sec^2 x, \quad \frac{d}{dx}[\sec x] = \sec x \tan x,$$ we get with the substitution $$u = \tan x + \sec x, \quad du = (\sec x \tan x + \sec^2 x) \, dx$$ $$\int \sec x \, dx = \int \frac{1}{u} \, du = \log | \tan x + \sec x | + C.$$ A similar approach applies with $$\csc x$$: $$\int \csc x \, dx = - \int \frac{-\csc x \cot x - \csc^2 x}{\cot x + \csc x} \, dx = - \log | \csc x + \cot x | + C.$$
\begin{aligned} & \int \frac{1}{\sqrt{1-\cos x}} d x \\ =& \int \frac{1}{\sqrt{2 \sin ^{2} \frac{x}{2}}} d x \\ =& \frac{1}{\sqrt{2}} \int \frac{1}{\operatorname{sgn}\left(\sin \frac{x}{2}\right)} \csc \frac{x}{2} d x \\ =&-\sqrt{2} \operatorname{sgn}\left(\sin \frac{x}{2}\right) \ln \left|\csc \frac{x}{2}+\cot \frac{x}{2}\right|+C \end{aligned}