Help solving an integral of the form $\int \sqrt{\frac{1+ax^2}{(1+x^2)^2}}dx$ I am reading a physics paper in which I got stuck trying to reproduce some results. Since it seems to be strictly a question of mathematics (integration specifically) I decided to post it here. In summary, we have two variables, call them $\chi$ and $h$, which are related according to the relation
$$
\frac{d\chi}{dh} = \sqrt{\frac{1+(1+6\xi)\xi h^2/M^2}{(1+\xi h^2/M^2)^2}},
$$
where $\xi \gg 1$ and $M$ are both fixed parameters. I would like to integrate and solve $\chi$ in terms of $h$. The answer is given without any more detail and supposed to be 
$$
\frac{\sqrt{\xi}}{M}\chi = \sqrt{1+6\xi}\sinh^{-1}{(\sqrt{1+6\xi}\,\psi)} - \sqrt{6\xi}\sinh^{-1}\left(\frac{\sqrt{6\xi}\psi}{\sqrt{1+\psi^2}}\right).
$$
where $\psi(h) = \sqrt{\xi}h/M$. My attempt so far, looking at the answer for inspiration is of course start with the given substitution so that I have 
$$
\frac{\sqrt{\xi}}{M}\chi = \int \frac{\sqrt{1+(1+6\xi)\psi^2}}{1+\psi^2}d\psi. \qquad \qquad (*)
$$
The first and only thing I have come up until now is integration by parts. I thought for instance I could take 
$$
dv = \sqrt{1+a\psi^2} d\psi \qquad \text{where} \qquad a = 1+6\xi \\
\Rightarrow v = \frac{1}{2}\psi \sqrt{1+a\psi^2} + \frac{\sinh^{-1}(\sqrt{a}\psi)}{2\sqrt{a}}
$$
where the second term kind of looks like something I am looking for. Then for $u$, I would take $u = 1/(1+\psi^2)$. However, when I carry, I get to a point where the integration seems hopeless, unless some magical cancelation happens. I discarted the opposite choice for $u$ and $dv$, since I would end up with $\tan^{-1}{\psi}$ terms, and that doesn't look right. I was hoping you could advice me on how to approach this integral $(*)$, since I don't know if I quit too soon and should persevere with this approach or if I am hitting a dead end. The answer is supposed to be the general solution (i.e., to my understanding there's no physics in the way in justifying any step or approximation), so I would like the opinion of someone more experienced at taming integrals. As always, thank you so much for your time.
 A: First let us denote: $$I=\int \frac{\sqrt{1+ax^2}}{1+x^2}dx$$
Our goal is first to get rid of the square root. With $\displaystyle{x=\frac{\tan t}{\sqrt a}\Rightarrow dx=\frac{1}{\sqrt a}\sec^2 t dt} $ we get:
$$\require{cancel}I=\frac{1}{\sqrt a}\int \frac{\sqrt{1+\cancel a \frac{\tan^2 t}{\cancel a}}}{1+\frac{\tan^2 t}{a}}\sec^2 t dt=\sqrt a \int \frac{\sec t}{a+\tan^2 t}\sec^2 t dt$$
$$=\sqrt a \int \frac{1}{\cos^3 t} \frac{1}{a+\frac{\sin^2 t}{\cos^2 t}}dt=\sqrt a \int\frac{1}{\cos t}\cdot\frac{1}{a\cos^2 t+\sin^2 t}dt$$
$$=\sqrt a \int \frac{\cos t}{1-\sin^2 t}\cdot \frac{1}{a(1-\sin^2 t)+\sin^2 t}dt\overset{\sin t=y}=\sqrt a \int \frac{1}{1-y^2}\frac{1}{a(1-y^2)+y^2}dy$$
$$=\sqrt a\int \frac{1}{y^2-1}dx-\sqrt a\int \frac{1}{y^2+\frac{a}{1-a}}dy $$
$$=\frac{\sqrt a}{2}\ln\left(\frac{y-1}{y+1}\right)-\sqrt{1-a} \arctan\left(y\sqrt{\frac{1-a}{a}}\right)+C, \quad y=\sin(\arctan(\sqrt a x))$$
A: As given by a CAS (and almost the same as given by David G. Stork in comments), the result, for the integral in title, is
$$\int \frac{\sqrt{1+ax^2}}{1+x^2}\,dx=\frac{2 \sqrt{(1-a) a} \sinh ^{-1}\left(\sqrt{a} x\right)-i (a-1) \log
   \left(\frac{(2 a-1) x^2-2 i \sqrt{1-a}\, x \sqrt{a x^2+1}+1}{x^2+1}\right)}{2
   \sqrt{1-a}}$$ which is a real which seems to be difficult to simplify.
Using $a=1+6\xi$ and assuming $\xi >0$ and simplifying, this would give for 
$$ I=\int \frac{\sqrt{1+(1+6\xi)x^2}}{1+x^2}\,dx$$
$$I=\sqrt{1+6 \xi } \sinh ^{-1}\left(x\sqrt{1+6 \xi} \right)-\sqrt{\frac{3\xi}{2}}
    \log \left(\frac{x \left(2 \sqrt{6\xi} \sqrt{1+ (1+ 6 \xi) 
   x^2}+(1+12 \xi)  x\right)+1}{x^2+1}\right)$$ and the logarithm can be transformed in a $\sinh(.)$
