Asymptotic expansion of complete elliptic integral of third kind Is there a way to compute the expansion of the complete elliptic integral of third kind
$\Pi(n,k)=\int_0^{\pi/2} \frac{d\varphi}{(1-n\sin^2\varphi)\sqrt{1-k^2\sin^2\varphi}}$
for
$\Pi(1+\epsilon,1-\epsilon)\ , \qquad \epsilon\to 0$,
and if so, what is it? 

Assuming $\epsilon > 0$, I get
\begin{equation}
\Pi (1 + \epsilon, 1- \epsilon ) = - \frac{1}{\epsilon \sqrt{3}} \left( \textrm{arcsinh} ( \tfrac{1}{\sqrt{2}} ) + \frac{i \pi}{2} \right) - \frac{1}{4} \log \epsilon + \frac{1}{36} \left( 6 - 8 \sqrt{3} \: \textrm{arcsinh} ( \tfrac{1}{\sqrt{2}} ) + 27 \log 2 - 4 i \pi \sqrt{3} \right) + O(\epsilon).
\end{equation}
To prove it express the elliptic integral in terms of hypergeometric functions. According to http://functions.wolfram.com/EllipticIntegrals/EllipticPi/introductions/CompleteEllipticIntegrals/05/ one has
\begin{equation}
\Pi (1 + \epsilon, 1- \epsilon ) = \Pi \left(1 + \epsilon | (1- \epsilon)^2 \right) = - \frac{i \pi}{2 \epsilon} \sqrt{\frac{1+\epsilon}{3 - \epsilon}} - \frac{\pi (1- \epsilon)^2}{4} \times \sum_{j=0}^\infty (- \epsilon)^j {}_2 F_1 \left( \frac{3}{2}, \frac{3}{2} + j; 2; (1- \epsilon)^2 \right).
\end{equation}
The Wolfram's definition of elliptic integrals differs from your more standard definition, i.e. $\Pi(n, k) = \Pi(n | k^2)$.
To deal with the hypergeometric terms we can use a linear transformation. Equation 15.3.12 of Abramowitz/Stegun gives us
\begin{equation}
{}_2 F_1 \left( \frac{3}{2}, \frac{3}{2} + j; 2; z \right) = \frac{2 \Gamma(1 + j)}{\sqrt{\pi} \Gamma (\tfrac{3}{2} + j)} (1 - z)^{-1-j} \sum_{n=0}^j \frac{ ( \tfrac{1}{2} - j)_n ( \tfrac{1}{2} )_n}{n! (-j)_n} (1 - z)^n - \frac{(-1)^{1+j}}{\sqrt{\pi} \Gamma( \tfrac{1}{2}-j )} \sum_{n=0}^{\infty} \frac{( \tfrac{3}{2} )_n ( \tfrac{3}{2} + j )_n}{n! (1 +j + n)!} (1-z)^n \left[ \log(1 - z) - \psi(1 + n) - \psi(n + j + 2) + \psi(\tfrac{3}{2} + n) + \psi( \tfrac{3}{2} + n + j) \right].
\end{equation}
Since each hypergeometric function is multiplied by $\epsilon^j$, we only need to extract divergences up to and including order $\epsilon^{-j}$, after the substitution $z = (1 - \epsilon)^2$. The second term contains at most the logarithmic divergence, while only elements with $n=0,1$ matter in the first term. For $j \geq 1$ we find
\begin{equation}
{}_2 F_1 \left( \frac{3}{2}, \frac{3}{2} + j; 2; (1 - \epsilon)^2 \right) = \frac{j!}{2^j \sqrt{\pi} \Gamma (\tfrac{3}{2} + j)} \epsilon^{-j} \left[ \frac{1}{\epsilon} + \frac{j^2 + 3j - 1}{2j} + O(\epsilon) \right], \qquad j = 1,2,3,\ldots
\end{equation}
while for $j = 0$ an additional logarithmic divergence appears,
\begin{equation}
{}_2 F_1 \left( \frac{3}{2}, \frac{3}{2}; 2; (1 - \epsilon)^2 \right) = \frac{2}{\pi \epsilon} + \frac{\log ( \epsilon / 8) + 4}{\pi} + O(\epsilon).
\end{equation}
Now we can resum the expansions of the hypergeometrics, which leads to the final result. You can check it numerically.
