Integrating $\arcsin \left(\frac{1}{2r} \left(\left(\lambda^2+(r+t)^2\right)^{\frac{1}{2}}-\left(\lambda^2+(r-t)^2\right)^{\frac{1}{2}}\right)\right)$ In a mathematical physical problem, one has to deal with a non-trivial finite integral given by
$$  
f(r,R,\lambda) = \int_0^R \arcsin \left( \frac{1}{2r} 
\left( \left( \lambda^2+(r+t)^2\right)^{\frac{1}{2}} 
-\left( \lambda^2+(r-t)^2\right)^{\frac{1}{2}}
\right) \right) \, \mathrm{d}t \, ,
$$ 
where $0<r<R$ and $\lambda>0$ are parameters.
In particular, for $\lambda=0$, it can easily be shown that
$$
f(r,R,0) = \int_0^r \arcsin \left( \frac{t}{r} \right) \, \mathrm{d}t
+ \frac{\pi}{2} \int_r^R \mathrm{d} t
= -r+\frac{\pi R}{2} \, .
$$
Is there a way to deal with the above integral for arbitrary values of the parameter $\lambda$?
Your suggestions and inputs are most welcome.
Thank you
 A: Define
$$ g \colon [0,\infty)^3 \to [0,1] \, , \, g(r,t,\lambda) = \begin{cases} \frac{\sqrt{\lambda^2 + (r+t)^2} - \sqrt{\lambda^2 + (r-t)^2}}{2 r} &, \, r > 0 \\ \frac{t}{\sqrt{\lambda^2 + t^2}} &, \, r = 0 \, \wedge \, \lambda > 0 \\ 1 & , \, r = 0 \, \wedge \, \lambda = 0\end{cases} \, ,$$
and $A = \{(x,y,z) \in [0,\infty)^3 : x \leq y\}$. Then $g$ is continuous on $[0,\infty) \setminus (0,0,0)$ and bounded ($0 \leq g \leq 1$ follows from the mean value theorem). Therefore,
$$ f \colon A \to [0,\infty) \, , \, f(r,R,\lambda) = \int \limits_0^R \arcsin(g(r,t,\lambda)) \, \mathrm{d} t \, ,$$
is well-defined and satisfies $0 \leq f(r,R,\lambda) \leq \frac{\pi}{2} R$ for $(r,R,\lambda) \in A$. The substitution $t = R s$ shows that $f(r,R,\lambda) = R f\left(\frac{r}{R},1,\frac{\lambda}{R}\right) $ holds for $(r,R,\lambda) \in A$, so it is sufficient to compute
$$ F \colon [0,1] \times [0,\infty) \to \left[0,\frac{\pi}{2}\right] \, , \, F(r,\lambda) = f(r,1,\lambda) = \int \limits_0^1 \arcsin(g(r,t,\lambda)) \, \mathrm{d} t \, .$$

You have already derived $F(r,0) = \frac{\pi}{2} - r$ for $r \in [0,1]$, so we will assume $\lambda > 0$ from now on. Integration by parts yields
\begin{align} 
F(0,\lambda) &= \int \limits_0^1 \arcsin \left(\frac{t}{\lambda^2 + t^2}\right) \, \mathrm{d} t = \arcsin \left(\frac{1}{1 + \lambda^2}\right) - \int \limits_0^1 \frac{\lambda t}{\lambda^2 + t^2} \, \mathrm{d} t \\
&= \arcsin \left(\frac{1}{1 + \lambda^2}\right) - \frac{\lambda}{2} \log\left(1+\frac{1}{\lambda^2}\right) \, .
\end{align}
Now let $r \in (0,1]$. It is easy to see that $g$ is differentiable and strictly increasing with respect to the second variable, so we can integrate by parts again and let $u = g(r,t,\lambda)$ to obtain
\begin{align}
F(r,\lambda) &= \arcsin(g(r,1,\lambda)) - \int \limits_0^1 \frac{t}{\sqrt{1 - g(r,t,\lambda)^2}} \, \partial_2 g(r,t,\lambda) \, \mathrm{d} t \\
&= \arcsin(g(r,1,\lambda)) - \int \limits_0^{g(r,1,\lambda)} \frac{g(r,\cdot,\lambda)^{-1} (u)}{\sqrt{1 - u^2}}  \, \mathrm{d} u \, .
\end{align}
Solving $u = g(r,t,\lambda)$ for $t$ is straightforward and we find (letting $\sqrt{\lambda^2 + r^2(1-u^2)} = \lambda v$)
\begin{align}
F(r,\lambda) &= \arcsin(g(r,1,\lambda)) - \int \limits_0^{g(r,1,\lambda)} \frac{u \sqrt{\lambda^2 + r^2(1-u^2)}}{1 - u^2}  \, \mathrm{d} u \\
&= \arcsin(g(r,1,\lambda)) - \lambda \int \limits_{\sqrt{1+\frac{r^2}{\lambda^2}(1-g(r,1,\lambda)^2)}}^{\sqrt{1 + \frac{r^2}{\lambda^2}}} \frac{v^2}{v^2-1}  \, \mathrm{d} v \\
&= \arcsin(g(r,1,\lambda)) - \left[\sqrt{\lambda^2 + r^2} - \sqrt{\lambda^2 + r^2(1-g(r,1,\lambda)^2)}\right] \\
&\phantom{= ~} - \lambda \left[\operatorname{arcoth} \left(\sqrt{1+\frac{r^2}{\lambda^2}(1-g(r,1,\lambda)^2)}\right) - \operatorname{arcoth} \left(\sqrt{1 + \frac{r^2}{\lambda^2}}\right)\right] \, .
\end{align}

The final result for $0 < r < R$ and $\lambda > 0$ is
\begin{align}
f(r,R,\lambda) &= R \arcsin(g(r,R,\lambda)) - \left[\sqrt{\lambda^2 + r^2} - \sqrt{\lambda^2 + r^2(1-g(r,R,\lambda)^2)}\right] \\
&\phantom{= ~} - \lambda \left[\operatorname{arcoth} \left(\sqrt{1+\frac{r^2}{\lambda^2}(1-g(r,R,\lambda)^2)}\right) - \operatorname{arcoth} \left(\sqrt{1 + \frac{r^2}{\lambda^2}}\right)\right] \, .
\end{align}
It contains the edge cases $r = 0$ and $\lambda = 0$ as limits. Although it looks quite complicated, expansions like
$$ f(r,R,\lambda) \stackrel{\lambda \to \infty}{\sim} \frac{R^2}{2 \lambda} \left[1 - \frac{R^2 + 3 r^2}{6 \lambda^2} + \mathcal{O}\left(\frac{R^4}{\lambda^4}\right)\right] $$
are easily obtainable from CAS.
