<s>[INST] How do we integrate the function $\frac{b\sqrt{[1+(\theta-1)2b]^{2} - 4\theta(\theta-1)b^{2}}}{4(\theta-1)}$? I came across the problem of determining the following integral:
\begin{align*}
I(\theta) = \int_{0}^{1}\dfrac{b\sqrt{[1+(\theta-1)2b]^{2} - 4\theta(\theta-1)b^{2}}}{4(\theta-1)}\mathrm{d}b
\end{align*}
where $b\in[0,1]$, $\theta > 0$ and $\theta\neq 1$. Here, we are going to study the case where $0 < \theta < 1$.
I managed to rearrange the square root argument as $1 + 4b(1-b)(\theta-1)$.
One possible approach consists in trying the substitution $u = 2b(\theta -1)$, from whence we get
\begin{align*}
I(\theta) = \frac{1}{16(\theta - 1)^{3}}\int_{0}^{2(\theta-1)}u\sqrt{1 + 2u\left(1 - \dfrac{u}{2(\theta-1)}\right)}\mathrm{d}u
\end{align*}
Can someone help me to take it from here? Any help is appreciated.
 [/INST] Rearranging
\begin{equation}
 [1+(\theta-1)2b]^{2} - 4\theta(\theta-1)b^2=(1-\theta)(2b-1)^2+\theta
\end{equation}
the integral can be written as
\begin{align}
 I(\theta) &= \frac{1}{4(\theta-1)}\int_{0}^{1}b\sqrt{[1+(\theta-1)2b]^{2} - 4\theta(\theta-1)b^{2}}\,db\\
 &=\frac{1}{4(\theta-1)}\int_{0}^{1}b\sqrt{(1-\theta)(2b-1)^2+\theta}\,db\\
 &=\frac{\sqrt \theta}{16(\theta-1)}\int_{-1}^{1}(x+1)\sqrt{1+\frac{(1-\theta)}{\theta}x^2}\,dx
\end{align}
(substitution $x=2b-1$ is used to obtain the latter expression). Due to parity reasons it can be simplified as
\begin{equation}
 I(\theta)=\frac{\sqrt \theta}{8(\theta-1)}\int_{0}^{1}\sqrt{1+\frac{(1-\theta)}{\theta}x^2}\,dx
\end{equation}
Now, with $x=\sqrt{\theta/(1-\theta)}\sinh t$,
\begin{equation}
 I(\theta)=\frac{ -\theta}{8(1-\theta)^{3/2}}\int_{0}^{\operatorname{arcsinh} \sqrt{\frac{1-\theta}{\theta}}}\cosh^2t\,dt
\end{equation}
After some simple manipulations, we find
\begin{equation}
 I(\theta)=\frac{-1}{16(1-\theta)^{3/2}}\left[\sqrt{1-\theta}+\theta\operatorname{arcsinh}\sqrt{\frac{1-\theta}{\theta}}\right]
\end{equation}
</s>