I want to get the closed-form of $F=F_++F_-$, where $F_{\nu}$ is the integral of the form

$$

F_{\nu} = \frac{1}{\pi}\int_0^{\pi}\frac{1}{\sqrt{1+\nu\sqrt{q^2+d^2\cos^2k}}}\;dk

$$

where $q\in(-1,1)$, $d\in[0,1)$, and $\nu=\pm1$. It is alse assumed that $q^2+d^2<1$, so do not warry about the complex number.

If $q=0$, the integral above relates to the elliptic integral(https://en.wikipedia.org/wiki/Elliptic_integral).