3.1.86 \(\int \cos ^{-1}(\sqrt {\frac {x}{1+x}}) \, dx\) [86]

Optimal. Leaf size=38 \[ (1+x) \left (\sqrt {\frac {1}{1+x}} \sqrt {\frac {x}{1+x}}+\cos ^{-1}\left (\sqrt {\frac {x}{1+x}}\right )\right ) \]

[Out]

(1+x)*(arccos((x/(1+x))^(1/2))+(1/(1+x))^(1/2)*(x/(1+x))^(1/2))

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 57, normalized size of antiderivative = 1.50, number of steps used = 6, number of rules used = 6, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {4925, 12, 6851, 52, 65, 209} \begin {gather*} x \text {ArcCos}\left (\sqrt {\frac {x}{x+1}}\right )-\frac {\sqrt {\frac {x}{(x+1)^2}} (x+1) \text {ArcTan}\left (\sqrt {x}\right )}{\sqrt {x}}+\sqrt {\frac {x}{(x+1)^2}} (x+1) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[ArcCos[Sqrt[x/(1 + x)]],x]

[Out]

Sqrt[x/(1 + x)^2]*(1 + x) + x*ArcCos[Sqrt[x/(1 + x)]] - (Sqrt[x/(1 + x)^2]*(1 + x)*ArcTan[Sqrt[x]])/Sqrt[x]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 52

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(a + b*x)^(m + 1)*((c + d*x)^n/(b*(
m + n + 1))), x] + Dist[n*((b*c - a*d)/(b*(m + n + 1))), Int[(a + b*x)^m*(c + d*x)^(n - 1), x], x] /; FreeQ[{a
, b, c, d}, x] && NeQ[b*c - a*d, 0] && GtQ[n, 0] && NeQ[m + n + 1, 0] &&  !(IGtQ[m, 0] && ( !IntegerQ[n] || (G
tQ[m, 0] && LtQ[m - n, 0]))) &&  !ILtQ[m + n + 2, 0] && IntLinearQ[a, b, c, d, m, n, x]

Rule 65

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 4925

Int[ArcCos[u_], x_Symbol] :> Simp[x*ArcCos[u], x] + Int[SimplifyIntegrand[x*(D[u, x]/Sqrt[1 - u^2]), x], x] /;
 InverseFunctionFreeQ[u, x] &&  !FunctionOfExponentialQ[u, x]

Rule 6851

Int[(u_.)*((a_.)*(v_)^(m_.)*(w_)^(n_.))^(p_), x_Symbol] :> Dist[a^IntPart[p]*((a*v^m*w^n)^FracPart[p]/(v^(m*Fr
acPart[p])*w^(n*FracPart[p]))), Int[u*v^(m*p)*w^(n*p), x], x] /; FreeQ[{a, m, n, p}, x] &&  !IntegerQ[p] &&  !
FreeQ[v, x] &&  !FreeQ[w, x]

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 ) \text {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.04, size = 49, normalized size = 1.29 \begin {gather*} x \cos ^{-1}\left (\sqrt {\frac {x}{1+x}}\right )+\frac {\sqrt {\frac {x}{(1+x)^2}} (1+x) \left (\sqrt {x}-\tan ^{-1}\left (\sqrt {x}\right )\right )}{\sqrt {x}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[ArcCos[Sqrt[x/(1 + x)]],x]

[Out]

x*ArcCos[Sqrt[x/(1 + x)]] + (Sqrt[x/(1 + x)^2]*(1 + x)*(Sqrt[x] - ArcTan[Sqrt[x]]))/Sqrt[x]

________________________________________________________________________________________

Maple [A]
time = 0.01, size = 45, normalized size = 1.18

method result size
default \(x \arccos \left (\sqrt {\frac {x}{1+x}}\right )-\frac {\sqrt {x}\, \sqrt {\frac {1}{1+x}}\, \left (-\sqrt {x}+\arctan \left (\sqrt {x}\right )\right )}{\sqrt {\frac {x}{1+x}}}\) \(45\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(arccos((x/(1+x))^(1/2)),x,method=_RETURNVERBOSE)

[Out]

x*arccos((x/(1+x))^(1/2))-1/(x/(1+x))^(1/2)*x^(1/2)*(1/(1+x))^(1/2)*(-x^(1/2)+arctan(x^(1/2)))

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 78 vs. \(2 (30) = 60\).
time = 1.31, size = 78, normalized size = 2.05 \begin {gather*} -\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 {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(arccos((x/(1+x))^(1/2)),x, algorithm="maxima")

[Out]

-arccos(sqrt(x/(x + 1)))/(x/(x + 1) - 1) - 1/2*sqrt(-x/(x + 1) + 1)/(sqrt(x/(x + 1)) + 1) - 1/2*sqrt(-x/(x + 1
) + 1)/(sqrt(x/(x + 1)) - 1)

________________________________________________________________________________________

Fricas [A]
time = 0.52, size = 30, normalized size = 0.79 \begin {gather*} {\left (x + 1\right )} \arccos \left (\sqrt {\frac {x}{x + 1}}\right ) + \sqrt {x + 1} \sqrt {\frac {x}{x + 1}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(arccos((x/(1+x))^(1/2)),x, algorithm="fricas")

[Out]

(x + 1)*arccos(sqrt(x/(x + 1))) + sqrt(x + 1)*sqrt(x/(x + 1))

________________________________________________________________________________________

Sympy [A]
time = 4.69, size = 63, normalized size = 1.66 \begin {gather*} x \operatorname {acos}{\left (\sqrt {\frac {x}{x + 1}} \right )} - 2 \left (\begin {cases} - \frac {\sqrt {\frac {x}{x + 1}}}{2 \sqrt {- \frac {x}{x + 1} + 1}} + \frac {\operatorname {asin}{\left (\sqrt {\frac {x}{x + 1}} \right )}}{2} & \text {for}\: \sqrt {\frac {x}{x + 1}} > -1 \wedge \sqrt {\frac {x}{x + 1}} < 1 \end {cases}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(acos((x/(1+x))**(1/2)),x)

[Out]

x*acos(sqrt(x/(x + 1))) - 2*Piecewise((-sqrt(x/(x + 1))/(2*sqrt(-x/(x + 1) + 1)) + asin(sqrt(x/(x + 1)))/2, (s
qrt(x/(x + 1)) > -1) & (sqrt(x/(x + 1)) < 1)))

________________________________________________________________________________________

Giac [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(arccos((x/(1+x))^(1/2)),x, algorithm="giac")

[Out]

Exception raised: TypeError >> An error occurred running a Giac command:INPUT:sage2:=int(sage0,sageVARx):;OUTP
UT:Warning, integration of abs or sign assumes constant sign by intervals (correct if the argument is real):Ch
eck [abs(sa

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.03 \begin {gather*} \int \mathrm {acos}\left (\sqrt {\frac {x}{x+1}}\right ) \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(acos((x/(x + 1))^(1/2)),x)

[Out]

int(acos((x/(x + 1))^(1/2)), x)

________________________________________________________________________________________