$F(k, \theta )=\int^{\theta}_0 \frac{1}{\sqrt{1-k^2 sin^2 \theta} } d \theta$
and
$E(k, \theta )=\int^{\theta}_0 \sqrt{1-k^2 sin^2 \theta} d \theta$
are elliptic integrals of the first and second kind respectively. The case
$k \gt 1$
can be analysed as follows.
Let
$sinx= k sin \theta$
then
$cosxdx=kcos \theta d \theta$
and
$d \theta = \frac{cosx}{kcos \theta} dx$
and the integrals become
$frac{1}{k} \int^x_0 \frac{cosx}{cosx cos \theta} dx= \frac{1}{k} \int^x_0 \frac{1}{cos \theta} d \theta$
and
$\frac{1}{k} \int^x_0 cosx \frac{cosx}{cos \theta} d \theta = \frac{1}{k} \int^x_0 \frac{cos^2x}{ cos \theta} dx$
respectively.
$cos \theta=\sqrt{1-sin^2 \theta}= \sqrt{1- \frac{1}{k^2} sin^2x}$
so the integrals become
$\frac{1}{k} \int^x_0 \frac{1}{\sqrt{1- \frac{1}{k^2}sin^2 x}} dx=\frac{1}{k} F\frac{1}{k}( \frac{1}{k}, x )$
and
\begin{aligned} \frac{1}{k} \int^x_0 \frac{cos^2x}{\sqrt{1- \frac{1}{k^2}sin^2 x}} dx &= \frac{1}{k} \int^x_0 \frac{cos^2x}{\sqrt{1- \frac{1}{k^2}sin^2 x}} dx \\ &= \frac{1}{k} \int^x_0 \frac{cos^2x}{\sqrt{1- \frac{1}{k^2}sin^2 x}} dx \\ &= k{(1/k^2-1)F(1/k,x)+E(1/k,x)}) \end{aligned}
.