Convergence of $\int_0^{\pi/2}(1+\cos2x)^{-0.5}\,dx$ 
I used Wolfram Alpha to try and compute the integral $$\int_0^{\pi/2}(1+\cos2x)^{-0.5}\,dx$$ and I'm told that the integral does not converge. However, if I try
  $$\lim_{a\to0.5^-}\int_0^{\pi/2}\frac{dx}{(1+\cos2x)^a}$$
  by substituting in values of $a$ close to $0.5$ e.g $a\in\{0.49,0.499,0.4999...\}$ the integral appears to converge to $26.8877$.

Is it possible to determine analytically if the integral in the title converges? If so, what technique should I use to deduce this?
 A: $$\int_{0}^{\pi/2}\frac{dx}{\sqrt{1+\cos(2x)}}=\int_{0}^{\pi/2}\frac{dx}{\sqrt{2}\left|\cos x\right|}=\frac{1}{\sqrt{2}}\int_{0}^{\pi/2}\frac{dx}{\sin x}\geq\frac{1}{\sqrt{2}}\int_{0}^{\pi/2}\frac{dx}{x}=+\infty.$$
For any $\alpha<\frac{1}{2}$ we have, through Euler's Beta function,
$$ \int_{0}^{\pi/2}\frac{dx}{(1+\cos(2x))^{\alpha}}=\frac{1}{2^\alpha}\int_{0}^{\pi/2}\frac{dx}{\left(\sin x\right)^{2\alpha}}=\frac{\sqrt{\pi}\,\Gamma\left(\frac{1}{2}-\alpha\right)}{2^{\alpha+1}\,\Gamma(1-\alpha)} $$
and the $\Gamma$ function has a simple pole with residue $1$ at the origin. It follows that the wanted limit is $+\infty$ as expected.
A: In the interval you are looking at
$$
\frac{1}{(1+\cos 2x)^a}=\frac{1}{2^a\cos^{2a}x}.
$$
Hence, the integral you are looking at is
$$
\frac{1}{2^a}\int_0^{\pi/2}\frac{1}{\cos^{2a}x}\,dx=\frac{1}{2^{a+1}}B(1/2,1/2-a)
=\frac{1}{2^{a+1}}\sqrt{\pi}\frac{\Gamma(1/2-a)}{\Gamma(1-a)}.
$$
Here $B$ denotes the Beta function. The expression in the right-hand side blows up to $+\infty$ as $a\to 1/2^-$. This is goind hand-in-hand with other answers, showing that the integral with $a$ replaced by $1/2$ is divergent.
