Integration of inverse function We have to integrate the folowing

I tried and substitued x=atan$^2 \theta$
But stuck in that

Hint: integrate by parts:
$$
\int \arcsin\sqrt{\frac{x}{x+a}}\ \mathrm dx=x\arcsin\sqrt{\frac{x}{x+a}}-\int \frac{1}{2} \sqrt{\frac{a x}{(a+x)^2}}\ \mathrm dx
$$
and let $\sqrt x=u$ to integrate the second integral:
$$
\frac{1}{2} \sqrt{\frac{a x}{(a+x)^2}}\ \mathrm dx=\frac{\sqrt{a} u^2}{a+u^2}\ \mathrm du
$$
The final solution is

\begin{equation} x \sin ^{-1}\left(\sqrt{\frac{x}{a+x}}\right)+\frac{(a+x) \sqrt{\frac{a x}{(a+x)^2}} \left(\sqrt{a} \tan ^{-1}\left(\frac{\sqrt{x}}{\sqrt{a}}\right)-\sqrt{x}\right)}{\sqrt{x}}\end{equation}

which, if $a$ and $x$ are positive, simplifies to

 \begin{equation}(a+x) \tan ^{-1}\left(\sqrt{\frac{x}{a}}\right)-\sqrt{a x}\end{equation}

