I want to solve the integral
\begin{equation} I(y)=\int_0^y\sqrt{\dfrac{x(1+ax)}{(1+ax)^2-b^2}}\,\mathrm{d}x,\qquad a<0,\; b\in(0,1),\; y>0,\; (1+ax)^2-b^2>0, \end{equation}
using Maple 18. The solution is known to be real. Maple finds a solution in terms of incomplete elliptic integrals of the first, second, and third kind:
\begin{equation} \mathrm{EllipticF}(z,k), \;\;\mathrm{EllipticE}(z,k), \;\;\mathrm{EllipticPi}(z,n,k). \end{equation}
Although when evaluated numerically Maple gives indeed the correct answer, the arguments are:
\begin{equation} z=\sqrt{\dfrac{-yab}{(1+ay)(1-b)}}, \quad k=\mathrm{i}\,\sqrt{\dfrac{b-1}{b+1}},\quad \mathrm{and}\quad n = \dfrac{1-b}{b}, \end{equation}
where $z,n\in\mathbb{R}$ but $k\in\mathbb{C}$ and $\Re(k)=0$, since $b\in(0,1)$. So there is one complex argument, $k$.
Is there any way to rearrange Maple's output to avoid dealing with complex arguments, provided that everything is known to be real? Maybe some simplifications?
If I study the case $b>1$ with the corresponding assuming the solution from Maple has the form:
\begin{equation}
\mathrm{i\,EllipticF}(z,k), \;\; \mathrm{i\,EllipticE}(z,k), \;\; \mathrm{i\,EllipticPi}(z,n,k).
\end{equation}
where now $k\in\mathbb{R}$. The elliptic integrals give purely imaginary values, but they are multiplied by $\mathrm{i}$. Again, would it be possible to simplify this somehow to avoid using complex numbers?