Optimal. Leaf size=38 \[ (x+1) \left (\sqrt{\frac{1}{x+1}} \sqrt{\frac{x}{x+1}}+\cos ^{-1}\left (\sqrt{\frac{x}{x+1}}\right )\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0305641, antiderivative size = 57, normalized size of antiderivative = 1.5, number of steps used = 6, number of rules used = 6, integrand size = 12, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.5, Rules used = {4841, 12, 6719, 50, 63, 203} \[ \sqrt{\frac{x}{(x+1)^2}} (x+1)+x \cos ^{-1}\left (\sqrt{\frac{x}{x+1}}\right )-\frac{\sqrt{\frac{x}{(x+1)^2}} (x+1) \tan ^{-1}\left (\sqrt{x}\right )}{\sqrt{x}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4841
Rule 12
Rule 6719
Rule 50
Rule 63
Rule 203
Rubi steps
\begin{align*} \int \cos ^{-1}\left (\sqrt{\frac{x}{1+x}}\right ) \, dx &=x \cos ^{-1}\left (\sqrt{\frac{x}{1+x}}\right )+\int \frac{1}{2} \sqrt{\frac{x}{(1+x)^2}} \, dx\\ &=x \cos ^{-1}\left (\sqrt{\frac{x}{1+x}}\right )+\frac{1}{2} \int \sqrt{\frac{x}{(1+x)^2}} \, dx\\ &=x \cos ^{-1}\left (\sqrt{\frac{x}{1+x}}\right )+\frac{\left (\sqrt{\frac{x}{(1+x)^2}} (1+x)\right ) \int \frac{\sqrt{x}}{1+x} \, dx}{2 \sqrt{x}}\\ &=\sqrt{\frac{x}{(1+x)^2}} (1+x)+x \cos ^{-1}\left (\sqrt{\frac{x}{1+x}}\right )-\frac{\left (\sqrt{\frac{x}{(1+x)^2}} (1+x)\right ) \int \frac{1}{\sqrt{x} (1+x)} \, dx}{2 \sqrt{x}}\\ &=\sqrt{\frac{x}{(1+x)^2}} (1+x)+x \cos ^{-1}\left (\sqrt{\frac{x}{1+x}}\right )-\frac{\left (\sqrt{\frac{x}{(1+x)^2}} (1+x)\right ) \operatorname{Subst}\left (\int \frac{1}{1+x^2} \, dx,x,\sqrt{x}\right )}{\sqrt{x}}\\ &=\sqrt{\frac{x}{(1+x)^2}} (1+x)+x \cos ^{-1}\left (\sqrt{\frac{x}{1+x}}\right )-\frac{\sqrt{\frac{x}{(1+x)^2}} (1+x) \tan ^{-1}\left (\sqrt{x}\right )}{\sqrt{x}}\\ \end{align*}
Mathematica [A] time = 0.0594106, size = 49, normalized size = 1.29 \[ x \cos ^{-1}\left (\sqrt{\frac{x}{x+1}}\right )+\frac{\sqrt{\frac{x}{(x+1)^2}} (x+1) \left (\sqrt{x}-\tan ^{-1}\left (\sqrt{x}\right )\right )}{\sqrt{x}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.012, size = 44, normalized size = 1.2 \begin{align*} x\arccos \left ( \sqrt{{\frac{x}{1+x}}} \right ) +{\sqrt{x}\sqrt{ \left ( 1+x \right ) ^{-1}} \left ( \sqrt{x}-\arctan \left ( \sqrt{x} \right ) \right ){\frac{1}{\sqrt{{\frac{x}{1+x}}}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.42552, size = 105, normalized size = 2.76 \begin{align*} -\frac{\arccos \left (\sqrt{\frac{x}{x + 1}}\right )}{\frac{x}{x + 1} - 1} - \frac{\sqrt{-\frac{x}{x + 1} + 1}}{2 \,{\left (\sqrt{\frac{x}{x + 1}} + 1\right )}} - \frac{\sqrt{-\frac{x}{x + 1} + 1}}{2 \,{\left (\sqrt{\frac{x}{x + 1}} - 1\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.00843, size = 85, normalized size = 2.24 \begin{align*}{\left (x + 1\right )} \arccos \left (\sqrt{\frac{x}{x + 1}}\right ) + \sqrt{x + 1} \sqrt{\frac{x}{x + 1}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \operatorname{acos}{\left (\sqrt{\frac{x}{x + 1}} \right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: TypeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]