prove that $T(x) = \int_0^x\frac{du}{\sqrt{2(\cos u - \cos x)}}$ is analytic $$
\text{Let } T(x) = \int_0^x\frac{du}{\sqrt{2(\cos u - \cos x)}}
$$
Prove that every $x\in(0, \pi)$ satisfies $0 < T(x) < \infty$
Prove that $T(x):(0,\pi) \longrightarrow \textbf{R}$ is strictly increasing
There's also some extra part: Find $\lim_{x\to0}T(x)$ and assuming $T(0) = \lim_{x\to0}T(x)$ prove that $T\in C^{\infty}([0,\pi))$, T is analytic at $x = 0$ and find $T'(0)$
While it is very easy to prove the first inequality I couldn't manage to do the rest. The way I tried it was to transform somehow the integral to make it more simple but I didn't do very well. I would be very grateful for some hint. Thanks in advance and sorry for any mistakes- that's my first post.
 A: Let $k = \sin\left(\frac{x}{2}\right)$ and introduce variables $v,w$ such that $v = kw  = \sin\left(\frac{u}{2}\right)$, we have
$$\begin{align}
T(x) &= \int_0^x \frac{du}{2\sqrt{\sin\left(\frac{x}{2}\right)^2 - \sin\left(\frac{u}{2}\right)^2}}
=\int_0^k \frac{dv}{\sqrt{(1-v^2)(k^2-v^2)}}\\
&= \int_0^1 \frac{dw}{\sqrt{(1-w^2)(1-k^2 w^2)}}
\end{align}
$$
We find $T(x)$ has the form $K(g(x))$, a composition of two functions
$$K(k) = \int_0^1 \frac{dw}{\sqrt{(1-w^2)(1-k^2w^2)}}
\quad\text{ and }\quad
g(x)  = \sin\left(\frac{x}{2}\right)
$$
It is clear both $K(x)$ and $g(x)$ are increasing function for its argument in $(0,1)$ and  $(0,\pi)$ respectively. This implies $T = K\circ g$ is increasing over $(0,1)$.
Since $g \in C^\infty((0,\pi))$ and $g((0,\pi)) = (0,1)$, one only need to show  $K \in C^\infty((0,1))$ in order to conclude $T = K\circ g \in C^\infty((0,\pi))$. 
To see why $K \in C^\infty((0,1))$, introduce variable $w = \sin\theta$ and expand the
the integrand as a power series
$$K(k) = 
\int_0^{\pi/2} \frac{1}{\sqrt{1-k^2\sin\theta^2}} d\theta
= \int_0^{\pi/2} \sum_{n=0}^\infty\frac{(\frac12)_n}{n!} (k\sin\theta)^{2n} d\theta
$$
Since $k < 1$, the convergence is uniform and we can integrate this term by term and obtain a power series expansion for $K(k)$.
$$
K(k) 
= \sum_{n=0}\frac{(\frac12)_n}{n!} \left(\frac{\Gamma(\frac12)\Gamma(n+\frac12)}{2\Gamma(n+1)}\right) k^{2n}
= \frac{\pi}{2}\sum_{n=0} \frac{(\frac12)_n(\frac12)_n}{n!^2} k^{2n}\tag{*1}
$$
where $(\gamma)_n = \gamma(\gamma+1)\cdots(\gamma+n-1)$ is the rising Pochhmammer symbol. The key is the radius of convergence for this power series of $K(k)$ is $1$ and hence $K(x) \in C^\infty((-1,1)) \supset  C^\infty((0,1))$.
For some background information, $K(k)$ is the complete elliptic integral of the first kind and the power series
expansion in $(*1)$ is the well known relation 
$$K(k) = \frac{\pi}{2}{}_2F_1\left(\frac12,\frac12; 1; k^2\right)$$
between $K(k)$ and Gauss's hypergeometric function ${}_2F_1$.
A: Outline of the strictly increasing part:  On $[0,\pi]$, the cosine is decreasing.  So $\cos u > \cos x$ for $u \in [0,x] \subset [0,\pi]$.  We then have $\cos u - \cos x>0$ and then the integrand is positive.
